This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes include a jsp within a jsp and passing a parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "include a jsp within a jsp and passing a parameter" Watch "include a jsp within a jsp and passing a parameter" New topic
Author

include a jsp within a jsp and passing a parameter

Pinda Ros
Ranch Hand

Joined: Apr 14, 2003
Posts: 65
Hello,
I know it is possible to use the tag jsp:forward="filename.jsp?param" and call another jsp page passing a parameter...
Is it possible to include a jsp within another jsp and passing a parameter to the included jsp?
for example
<%@ include file="filename.jsp?param"%> ?something similar to this?

Thank you in advance


NanoAgent is an Artificial intelligence RoBot of microscopic proportions built by means of nanotechnology
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
No, it's not. The <%@ include %> tag is a static include, like a C #include.
It should (I think) work if you use <jsp:include > which does a dynamic include.


42
Pinda Ros
Ranch Hand

Joined: Apr 14, 2003
Posts: 65
Hello and thank you for your reply.
So one of the main differences between <%include file=".."%>
and <%jsp:ionlcude=".."%> is that the one is static and the other is dynamic?
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: include a jsp within a jsp and passing a parameter
 
jQuery in Action, 3rd edition