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

Partial use of scriptlet expression in jsp:include does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.0.6.Final
    • 1.3.31.Final
    • Servlet
    • None
    • Hide
      1. Create one Jsp page and use jsp:include to include another page.
      2. For Page attribute, try providing combination of constant string with some variable.
        e.g. : <jsp:include page='ForwardFile.jsp?name=<%=temp%>' flush="true"/>

      Expected : it should work and page should be included.
      Actual : java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "=t"

      If we use scriptlet expression as below, it works fine:

      1. <jsp:include page='<%="ForwardFile.jsp?name="+temp%>' flush="true"/>
      2. <input type="text" name="j_<%=temp%>">
      Show
      Create one Jsp page and use jsp:include to include another page. For Page attribute, try providing combination of constant string with some variable. e.g. : <jsp:include page='ForwardFile.jsp?name=<%=temp%>' flush="true"/> Expected : it should work and page should be included. Actual : java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "=t" If we use scriptlet expression as below, it works fine: <jsp:include page='<%="ForwardFile.jsp?name="+temp%>' flush="true"/> <input type="text" name="j_<%=temp%>">

    Description

      When we use scriptlet expression in jsp:include tag for page attribute, it does not work when used partially.

      E.g. : <jsp:include page='ForwardFile.jsp?name=<%=temp%>' flush="true"/>

      Exception :
      java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "=t"
      at java.net.URLDecoder.decode(URLDecoder.java:194)
      at io.undertow.util.QueryParameterUtils.decodeParam(QueryParameterUtils.java:134)
      at io.undertow.util.QueryParameterUtils.handleQueryParameter(QueryParameterUtils.java:118)
      at io.undertow.util.QueryParameterUtils.parseQueryString(QueryParameterUtils.java:106)
      at io.undertow.util.QueryParameterUtils.mergeQueryParametersWithNewQueryString(QueryParameterUtils.java:151)
      at io.undertow.servlet.spec.RequestDispatcherImpl.includeImpl(RequestDispatcherImpl.java:328)
      at io.undertow.servlet.spec.RequestDispatcherImpl.include(RequestDispatcherImpl.java:265)
      at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:907)

      It works in JBoss EAP 6.4.x release.

      Attachments

        Issue Links

          Activity

            People

              dtikhomi@redhat.com Dmitrii Tikhomirov
              rhn-support-ivassile Ilia Vassilev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: