>>> Mick McRae <[EMAIL PROTECTED]> 19-Jan-01 5:00:33 AM >>>

>The above form defines an action attribute with some
>servlet ie.  http://host:8080/servlets/someServlet
>Because this servlet is using a different base URI to
>that of the original form, the browser doesn't send the
>currently cached authentication header.

The base uri has nothing to do with basic authentication (except in
common webserver configuration terms).

The question is whether the servlet sends the authentication
challenge with the same realm name to the browser.


>Is there anyway for the servlet, running under a
>particular URI, to request the authentication header
>from the browser, for a different URI?

No. But there is a way for the servlet to ask the browser to
authenticate against an arbritary relam name. That should force the
browser to send the details in recorded for the cgi program.

See my authentication FAQ which I seem to mention here everyday:
  http://www.tapsellferrier.co.uk/Servlets/FAQ/authentication.html


>In this servlet I do some processing, create a
>HttpURLConnection object, and forward some
>of the form parameters onto another program
>which is in the same realm/URI as the original
>application.  The program want's to send a
>WWW-authenticate back to my HttpURLConnectionObject.
>Of course, I don't have the authentication field from
>the original request, to forward in the HttpURLConnection
>object.

Once you have the authentication details you can pass them through
the HttpURLConnection as a header withiut even decoding them. You
don't need to recieve the WWW-Authenticate challenge first.


>Hope that makes some sense.

Hope you get on allright.


Nic

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to