File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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?
 
jQuery in Action, 2nd edition
 
subject: include a jsp within a jsp and passing a parameter
 
Similar Threads
how we can include one jsp page in another jsp Page?
Problems in passing parameters to the applet
problem while forwording the JSP page
Code too large for try statement
Using JSTL SQL Tag