Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2285

Query parameters get lost in the included JSP page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.2.26.Final, 2.3.8.Final
    • 2.2.22.Final
    • Servlet
    • None

      Since 2.2.22.Final, request parameters are not properly propagated in jsp:include pages.

      Reproducible with several nested jsp:include pages:

      main.jsp

      <jsp:include page="included.jsp?url_param1">
          <jsp:param name="jsp_param1" value="0" />
      </jsp:include> 

       
      included.jsp

      <jsp:include page="included_included.jsp?url_param2">
          <jsp:param name="jsp_param2" value="0" />
      </jsp:include>

       
      included_included.jsp

      <jsp:include page="included_included_included.jsp?url_param3">
           <jsp:param name="jsp_param3" value="0" />
      </jsp:include>
      

        
      included_included_included.jsp

      <%
         for (String p : java.util.Collections.list(request.getParameterNames())) {
           System.out.println(p);
         }
      %>
      

       

      Accessing main.jsp with

      main.jsp?mainParam
      

      Expected request parameters in innermost jsp (included_included_included.jsp):

      mainParam
      url_param1
      jsp_param1
      url_param2
      jsp_param2
      url_param3
      jsp_param3
      

      Actual parameters:

      mainParam
      url_param3
      jsp_param3
      

              rhn-engineering-lgao Lin Gao
              rhn-engineering-lgao Lin Gao
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: