Hi Chris,

I figured out why the code I wrote did not work(had to look into the
Authentication class inside Tomcat source code to figure it out!).
The reason was when I was setting Request Property for Authentication, I
was missing a space
setRequestProperty("Authorization","Basic"+Base64.encode(input.getBytes()))
must have been instead
setRequestProperty("Authorization","Basic "+Base64.encode(input.getBytes());
After you mentioned the Ant task for Tomcat Manager, I took a look at
their source code, and noticed this difference...
Thanks for your help,
Ram

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ram,
>
> [EMAIL PROTECTED] wrote:
> | with authentication turned
> | on, i receive a HTTP 401 error from the server when i try to undeploy.
>
> This is how it's supposed to work.
>
> | I am using standard code to access the tomcat manager, and am using
> basic
> | authentication with Base64  encoder(in catalina.jar) and wondering why I
> | am unable to obtain the authentication!
>
> Please post your code.
>
> | In case anyone knows a better method to access the Tomcat Manager
> | remotely, that would be great also.
>
> You could use the tasks built-into 'ant'... that way, you could use
> someone else's (more perfected) code to do the same thing.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkfhHd0ACgkQ9CaO5/Lv0PC+5ACeN+QYuqlLy+i09aYfgNTR29Cc
> 5icAoLwlbRiosvGLWcDgBjw7syDF/bDs
> =O7v8
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to