tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: 2nd inquiry: how to - programmatically - authenticate oneself as Tomcat manager?
Date Thu, 10 Jun 2004 05:51:35 GMT
1)  Assuming boring system encodings, and something to do Base64 encoding:
   String creds = username+":"+password;
   String b64creds = Base64Util.encode(creds.getBytes());
   tmc.addRequestProperty("Authorization","Basic "+b64creds);

2) Not with Basic.  You might be able to rig something with Form.

"Jerry Miernik" <> wrote in message
  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: returned HTTP response code: 401

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

  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).


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message