Mantis - Resin
Viewing Issue Advanced Details
4719 minor always 08-18-11 12:38 08-23-11 13:38
brandonkearby  
ferg  
normal  
closed 4.0.15  
fixed  
none    
none 4.0.22  
0004719: QueryString parameters are in reverse order on <jsp:include and <jsp:forward
When passing parameters in a <jsp:include, the parameter order is reversed when calling request.getParameters("foo").

For example:

<jsp:include page="/views/shared/_header.jsp">
    <jsp:param name="jsFile" value="gallery/photoUpload.js"/>
    <jsp:param name="jsFile" value="ugc/discussions.js"/>
    <jsp:param name="jsFile" value="livepipe.js"/>
    <jsp:param name="jsFile" value="widget/textArea.js"/>
    <jsp:param name="jsFile" value="webtoolkit.js"/>
</jsp:include>

After the previous include:
 request.getParameters("jsFile") is returning the values in reverse order: webtoolkit.js, widget/textArea.js, livepipe.js, ...

The desired behavior for is request.getParameters("jsFile") is: gallery/photoUpload.js, ugc/discussions, livepipe.js, ...


After looking at the source, I noticed that the code for a jsp:include is trying to push them in front of the querystring params of the top level request. Attached is a patch that will do that as well as preserve the order defined in a jsp:include.
 Preserve_QueryString_parameter_order_for_non_top_level_requests_(jsp_include_and_forwards).patch [^] (3,077 bytes) 08-18-11 12:38

Notes
(0005457)
ferg   
08-23-11 13:38   
jsp/15n4