WebRequest.POST_METHOD);
request.addParameter("j_password", getPassword(),
WebRequest.POST_METHOD);
// Make the connection using the configured web request.
connection = helper.connect(request, theConfiguration);
// If we get back a response code of 302, it means we were
// redirected to the context root after successfully logging in.
// If we receive anything else, we didn't log in correctly.
if (connection.getResponseCode() != 302)