Passing parameters to included JSP files
Ionut Prunache <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <CANTG556oJ1hUFtr5QKFxNRSSZbDW2Dxud1hhfFX=hrkeUSc2xw@mail.gmail.com> |
I'm working on a project for replacing an existing JSP code base with
Freemarker. I'm trying to do it progressively, that is I still want to be
able to include some JSP files from my new Freemarker templates.
The JSP pages that I include directly from .ftl files work fine, but there
is a problem when a JSP page included from an ftl tries to include another
JSP page and pass it some parameters. The second JSP file loads but doesn't
receive the parameters from the calling JSP, it only gets the parameters
that the .ftl passed to the first JSP.
Here is a short example of the flow:
page1.ftl
...
<@include_page path="/WEB-INF/jsp/page2.jsp" inherit_params=true
params={"param1": "param1"}/>
...
page2.jsp
...
<jsp:include page="/WEB-INF/page3.jsp">
<jsp:param name="param2" value="${someVar}"/>
</jsp:include>
...
request.getParameterNames() only contains param1 for both page2.jsp and
page3.jsp. I expect page3.jsp to see both param1 and param2.
Is there a way for this to work? If so, what am i doing wrong?
Thanks
Ionut
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user