tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39503] - getContextPath() returns a decoded string contrary to the servlet spec
Date Sun, 07 May 2006 17:32:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39503>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39503


carlin.rogers@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |




------- Additional Comments From carlin.rogers@gmail.com  2006-05-07 17:32 -------
Hi Remmy,

I'm not sure why you're opposed to fixing this and feel it's not obvious. The
first place a developer goes to is the API documentation such as...

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html#getContextPath()

It clearly states that the "container does not decode this string." Seems pretty
clear.

I feel the second issue is valid. Pass a relative path to
request.getRequestDispatcher(). For example,...

- create a JSP, xxx.jsp with just the following to do the forward to a second
JSP, yyy.jsp, using a relative path:
<%
    javax.servlet.RequestDispatcher rd =
            request.getRequestDispatcher("yyy.jsp");
    rd.forward(request, response);
%>

- create the second JSP, yyy.jsp, that will display the result of a call to
getRequestURI(),
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<html>
<head><title>Request Test</title></head>
<body>
request.getRequestURI() = <%= request.getRequestURI() %>
</body>
</html>

- deploy these in a web app with a context of "/test space".

The result will be that a call to request.getRequestURI() will be decoded.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message