Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

how to - programmatically - authenticate oneself as Tomcat manager?

Jerry Miernik

2004-06-09


The question is related to undeploying a webapplication
from a Java code. A connection to tomcat manager using
....
URL tomcatMgr =
  new URL("http://localhost:8080/manager/undeploy?path=/any");
URLConnection tmc = tomcatMgr.openConnection();
....

results in:
java.io.IOException:Server returned HTTP response code: 401

The questions:
1. Is there a way to deliver - programmatically - username
  and password for the undeploy to take effect?
X-SpamScore: 0.000


2. Could the username and password be parameters in the
  undeploy request? Or an earlier request?

3. This Java program is trying to undeploy itself, inside
  a jspInit() method. Is this technically possible?
  (do not see why not, except for the problem with user
   name and password).

Thanks,
Jerry.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.