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? I have a complex app that does a number of things before stopping and starting a web app, and I don't want to have to cram the whole thing int Ant. Any help appreciated; Garey Mills Library Systems Office UC Berkeley The brain is not where you think On Tue, 18 Apr 2006, Mark Thomas wrote: > Marc Farrow wrote: > > You have to use the webdav application provide from tomcat. Check under > > $tomcat_home/webapps/webdav/web.xml. there is a line commented out that > > states some property of read-only = false. by default it is read-only and > > you have to manually turn it on. > > What on earth has webdav got to do with this? > > > On 4/18/06, Garey Mills <[EMAIL PROTECTED]> wrote: > >> Hello - > >> > >> I want to stop and start a context from a Java program running as > >> a cron job. I have tried > >> > >> http://<host>:<port>/manager/stop? > >> username=<manager-role username>& > >> password=<password>& > >> path=/<context path> > >> > >> (without the carriage returns, of course). This yields me a 401. Reading > >> the manager app documentation, it doesn't actually explain how to > >> authenticate from a script. How do I do it? > > The user name and password get passed as HTTP headers. The easiest way > is probably to use the provided ant tasks. See the bottom of > http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html for details. > > > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]