if ( sWikiUser != null && sWikiPass != null && xContext != null )
{
HostConfiguration aNewHostConfig = new HostConfiguration();
URI aURI = new URI( aMainURL.toString() + "index.php?title=Special:Userlogin" );
GetMethod aGetCookie = new GetMethod( aURI.getEscapedPathQuery() );
ExecuteMethod( aGetCookie, aNewHostConfig, aURI, xContext, true );
int nResultCode = aGetCookie.getStatusCode();
aGetCookie.releaseConnection();
if ( nResultCode == 200 )
{
PostMethod aPost = new PostMethod();
URI aPostURI = new URI( aMainURL.getPath() + "index.php?title=Special:Userlogin&action=submitlogin" );
aPost.setPath( aPostURI.getEscapedPathQuery() );
aPost.addParameter( "wpName", sWikiUser );
aPost.addParameter( "wpRemember", "1" );
aPost.addParameter( "wpPassword", sWikiPass );
String[][] pArgs = GetSpecialArgs( xContext, aMainURL.getHost() );