Thanks for the replies. I've decided to go with the
following technique.
HttpClient client = new HttpClient();
PostMethod method = new PostMethod(url);
PostMethod method = new PostMethod(url);
client.getParams().setAuthenticationPreemptive(true);
//Preemptive authentication mode also requires default Credentials
//to be set for the target or proxy host against which preemptive
authentication is to be attempted.
//Failure to provide default credentials will render the preemptive
authentication mode ineffective.
Credentials defaultcreds = new UsernamePasswordCredentials(username, password);
client.getState().setCredentials(new AuthScope(ip, port, AuthScope.ANY_REALM), defaultcreds);
Credentials defaultcreds = new UsernamePasswordCredentials(username, password);
client.getState().setCredentials(new AuthScope(ip, port, AuthScope.ANY_REALM), defaultcreds);
try
{
int result = client.executeMethod(method);
System.out.println (result);
}
catch (IOException ioe)
{
System.out.println (ioe.getMessage());
}
{
int result = client.executeMethod(method);
System.out.println (result);
}
catch (IOException ioe)
{
System.out.println (ioe.getMessage());
}
On 9/6/06, Yusuf
Jakoet <[EMAIL PROTECTED]>
wrote:
Then Cargo is the way to go.Have you looked at the API ?It's really easy to use.I've used it myself to do remote deployments/re-deployments to TomcatThanks Jeff and SorenThe server's running on a Windows box.I need to be able to do a webapp reload from a Java application.
--
Jeff Mutonho
GoogleTalk : ejbengine
Skype : ejbengine
Registered Linux user number 366042
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---
