I have a question about the HttpServletRequest methods getRequestURI()
and getContextPath().
According to the Servlet API spec, it is always supposed to be
true that:
requestURI = contextPath + servletPath + pathInfo
It also says that the contextPath is "the empty string" if the
context is the "default" root context, and starts with a '/'
otherwise.
But what about about absolute URLs in requests?
For example, if the request line looks like:
GET http://java.sun.com:80/index.html HTTP/1.1
The documentation for getRequestURI() specifies that the value
returned contains the protocol part up until the start of the query
string, which seems to be in conflict with the other requirements
specified above.
Can somebody clarify this? What should getRequestURI() and
getContextPath() return in this case?
Stan Bailes
Quadcap Software
http://www.quadcap.com
___________________________________________________________________________
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