Stan Bailes wrote:
> So then what about absolute URIs? How is the application
> supposed to determine if there was an absolute URI in the
> request, and if so, what it was?
>
You can reconstruct the absolute URL for a request by virtue of the fact that
you can identify all the component pieces with request.getScheme(),
request.getServerName(), request.getPort(), and request.getRequestURI(). There
is also a new utility method (HttpUtils.getRequestURL()) that will glue them
back together for you.
As to whether the client did their request using an absolute URL, can you
explain the circumstances under which you expect this to happen? Most browsers
I've seen send just the request URI in their GET or POST commands, and use the
"Server" HTTP header to identify the virtual host (the port number is implicit
based on where the server received this request). The only reason I can think
of to use an absolute URL in a GET or POST is if you're designing a proxy
server or something like that.
>
> Stan Bailes
> Quadcap Software
>
Craig McClanahan
___________________________________________________________________________
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