Garey Mills wrote: > Mark - > > I have looked at the manager app how-to, and it doesn't describe > how connect from a script. I have this > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > private static String stop = > "http://myhost:8080/manager/stop?path=/myapp"; > > public static void main(String[] args) { > > > try { > > URL stopURL = new URL(stop); > > URLConnection cnxn = ustopURL.openConnection(); > > cnxn.setRequestProperty("username", "user"); > cnxn.setRequestProperty("password", "password"); > > cnxn.connect(); > > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > but am still getting 401. Do you have any suggestions?
This isn't how BASIC authentication works. For details see RFC 2617 or for the quick solution see the applyHttpBasicAuthentication method in http://marc2.theaimsgroup.com/?l=fop-cvs&m=114069081209918&w=2 Alternatively take a look at HTTPClient that will hide all this fun and games. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]