tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hassan Schroeder <has...@webtuitive.com>
Subject Re: Works! RE: 2nd inquiry: how to - programmatically - authenticate oneself as Tomcat manager?
Date Thu, 10 Jun 2004 19:25:48 GMT
Jerry Miernik wrote:

>   This works! How did you come to know that?
>   Is there a doc I should have read to know?

Well, strictly speaking, if you read the doc you'll know that's
not a legal URL :-)

RFC 1738: Uniform Resource Locators (URL) shows the format:

  3.1. Common Internet Scheme Syntax

    While the syntax for the rest of the URL may vary depending on the
    particular scheme selected, URL schemes that involve the direct use
    of an IP-based protocol to a specified host on the Internet use a
    common syntax for the scheme-specific data:

         //<user>:<password>@<host>:<port>/<url-path>

*BUT* (see last sentence)

  3.3. HTTP

    The HTTP URL scheme is used to designate Internet resources
    accessible using HTTP (HyperText Transfer Protocol).

    The HTTP protocol is specified elsewhere. This specification only
    describes the syntax of HTTP URLs.

    An HTTP URL takes the form:

       http://<host>:<port>/<path>?<searchpart>

    where <host> and <port> are as described in Section 3.1. If :<port>
    is omitted, the port defaults to 80.  No user name or password is
    allowed.

Which is not to say that it won't, in some circumstances, "work"...

FWIW!

> That's not true.  You can do:
> 
> http://username:password@www.mysite.com/
> 
> so:
> 
> URL tomcatMgr =
>      new URL("http://manager:mypassword@localhost:8080/manager/undeploy?path=/any");

-- 
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message