This is the response from Macromedia about this topic: ========== cut here ============================================== both the servlet 2.2 and servlet 2.3 require the URL to remain encoded when calling request.getRequestURI.
The Tomcat folks have struggled with this (search their main archives for getRequestURI and encoding) problem in the Tomcat RI. I still don't see where JRun is not conforming to the spec. I understand that other containers are returning different values, but as I read the spec they are also doing it wrong. The spec is really clear on this topic. Do you agree -- that the spec is clear on whether encoded URLs should be returned? The following should clear things: "By default, JRun uses cookies to track sessions, but it can track sessions using URL rewriting, hidden form fields, or a custom method. The cookies themselves only contain an identification number (called the session ID) that matches a request to a session object on the server-side. When you use URL rewriting or hidden form fields, the session ID is passed not as a value of a cookie but as extra path information or a form field. " When you turn the cookies off, JRun uses URL rewriting to track sessions, hence appending JSESSIONID as extra path info. Now, the question is if <%= request.getRequestURI() %> should return the extra path info. From the spec we can see getRequestURI() should return "the part of this request's URL from the protocol name up to the query string" , which means including any extra path info. So HttpSerlvetRequest.getRequestURI() should return the JSESSIONID. So now the question becomes whether HttpSerlvetRequest.getRequestURI() and request.getRequestURI() return the same thing. What do you think? "getRequestURI() - remain encoded " means if you have string like m%fcman in the URL, it should return m%fcman, not decode to /m�mchen. (%fc is the encoding for the german character �). ========== cut here ============================================== with best wishes Alexander Kachanov -----Original Message----- From: Christopher Martin [mailto:[EMAIL PROTECTED]] Sent: 10 ???? 2002 ?. 18:33 To: [EMAIL PROTECTED] Subject: Re: getRequestURI() Sounds like JRun 3.1 and Jrun 4.0 are jacked beyond belief. -----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Kachanov Sent: Tuesday, July 09, 2002 10:35 PM To: [EMAIL PROTECTED] Subject: getRequestURI() 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? with best wishes Alexander Kachanov ========================= 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 ==========================================================================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
