Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10632

After RewriteValve has rewritten the context path, HttpServletRequest.getRequestURI() still returns the original URI.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.3.0.ER1
    • EAP_EWP 5.2.0
    • Web
    • None
    • Hide

      Add this to $JBOSS_HOME/server/$PROFILE/conf/jboss.web/rewrite.properties:

      RewriteCond %{REQUEST_URI}      ^/.*rewrite-me.*$
      RewriteRule ^/rewrite-me/(.*)    /echoUriServlet/$1
      

      Add this valve under the Engine element in $JBOSS_HOME/server/$PROFILE/deploy/jbossweb.sar/server.xml:

      <Valve className="org.jboss.web.rewrite.RewriteValve"/>
      
      Show
      Add this to $JBOSS_HOME/server/$PROFILE/conf/jboss.web/rewrite.properties : RewriteCond %{REQUEST_URI} ^/.*rewrite-me.*$ RewriteRule ^/rewrite-me/(.*) /echoUriServlet/$1 Add this valve under the Engine element in $JBOSS_HOME/server/$PROFILE/deploy/jbossweb.sar/server.xml : <Valve className= "org.jboss.web.rewrite.RewriteValve" />
    • Previously when using the RequestDumperValve to rewrite the context path, the original context path would be returned when calling HTTPServletRequest.getRequestURI(). This release changes the value so the rewritten context path is returned instead.
    • Documented as Resolved Issue
    • NEW

      When the rewrite valve is used to modify the context path, this modification is not updated in HttpServletRequest.getRequestURI().

              rh-ee-klape Kyle Lape
              rh-ee-klape Kyle Lape
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: