Alex Kachanov wrote:
> Hello!
>
>
> This is a page:
>
> <%@ page contentType="text/html;charset=Shift_JIS"%>
> <%@page session="true"%>
>
> <a href="<%= response.encodeURL("index.jsp")%>">Check this</a>
>
> <p><%= request.getRequestURI() %></p>
>
> <p><%= session.getId() %></p>
>
>
> So, guys, what do you think "request.getRequestURI()" method should return
> when cookies are switched of in browser and you clikc on "Check this" link?
>
>
> JRun 3.1 and Jrun 4.0 are sure it should return
> /index.jsp;jsessionid=384975938475
>
>
> While all other Application servers return just:
> /index.jsp
>
>
>
> Who is right?AFAIK, the servlet spec is a bit vague on this, but that usually means that whatever the reference implementation (Tomcat) does is right, so JRun is arguably wrong. In addition, as I recall, the intention of the spec is that the path parameter that holds the session ID should be stripped off from all URIs that the API provides access to through methods like getRequestURI(). Otherwise it's very likely that a URI ends up with multiple path parameters when passed to methods like encodeURL() or leads to other errors when used as an argument to methods like getRequestDispatcher(). Just my 2 cents ... To resolve it, send a suggestion for clarification to [EMAIL PROTECTED] The Servlet 2.4 spec is currently being defined, so it could potentially be fixed there. Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com JavaServer Pages http://TheJSPBook.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
