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
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: include a jsp within a jsp and passing a parameter