A space in the context path causes PageFlowUtils.getActionURI() to throw a 
URISyntaxException
---------------------------------------------------------------------------------------------

         Key: BEEHIVE-1111
         URL: http://issues.apache.org/jira/browse/BEEHIVE-1111
     Project: Beehive
        Type: Bug

  Components: NetUI  
    Versions: V1, 1.0.1, v.next    
    Reporter: Carlin Rogers
 Assigned to: Carlin Rogers 
    Priority: Minor
     Fix For: v.next


If you create a NetUI web application and deploy it with a servlet context name 
that includes a space ("/test space"), then any pages that use tags that 
rewrite of an action name will throw a URISyntaxException.

The problem occurs because in our MutableURI implementation we use 
java.net.URI() to parse a string into the components of the URI. The 
java.net.URI constructor with a single argument expects the string to be 
encoded. A space in the string causes it to throw URISyntaxException.

Unfortunately, the real issue in this bug is the difference in what is returned 
from a call to request.getContextPath(). The implementation for 
HttpServletRequest method getContextPath() is not consistent across containers. 
The spec says the "container does not decode this string." However, the string 
returned in Tomcat is decoded. (See Tomcat bugzilla bug 39503) Also this method 
returns a decoded string in some containers if the request is a forward where 
the RequestDispatcher was acquired using a relative path.

We build a path based on the result of getContextPath() and the module path for 
the current page flow. When we get a decoded space in the context path, we get 
the exception described above. It seems that it is only the space character in 
the context path that causes us issues so we can check for a decoded space in 
the context path and encode it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to