https://bz.apache.org/bugzilla/show_bug.cgi?id=69382

--- Comment #4 from John Engebretson <jeng...@amazon.com> ---
I've added a sample patch that does the following:

1. If the include contains zero params, no change
2. If the include contains 1+ params:
  a. Create a local variable, set to the evaluation of the url
  b. Create a local variable, set to the request encoding
  c. Substitute in the local variables as necessary


Post-change, this JSP snippet:

<jsp:include page="${myPageName}">
  <jsp:param name="param1" value="${'1'}"/>
  <jsp:param name="param2" value="${'2'}"/>
</jsp:include>

is translated into this Java:

      String _jspx_temp0_url = (java.lang.String)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${myPageName}",
java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context,
null);
      String _jspx_temp0_requestEncoding = request.getCharacterEncoding();
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response,
_jspx_temp0_url + ((_jspx_temp0_url).indexOf('?') > 0 ? '&': '?') +
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("param1",
_jspx_temp0_requestEncoding)+ "=" +
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("1",
_jspx_temp0_requestEncoding) + "&" +
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("param2",
_jspx_temp0_requestEncoding)+ "=" +
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("2",
_jspx_temp0_requestEncoding), out, false);

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to