File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes jsp:include  &  jsp:param Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp:include  &  jsp:param" Watch "jsp:include  &  jsp:param" New topic

jsp:include & jsp:param

riteshrr mani

Joined: Nov 09, 2005
Posts: 1
Hi all,

I have two JSPs

I have used the the follwing code in jsp1

<jsp:include page="jsp2.jsp">
<jsp:param name="para1" value="para1"/>
<jsp:param name="para2" value="para2"/>

I can access these parameters using request.getParameter() in jsp2.jsp
for the first time when the page loads.

but after I submit (to the jsp1.jsp itself), i get the value of the
parameters as null.

Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Because now you are accessing a new request object. Read about request lifecycle.
I agree. Here's the link:
subject: jsp:include & jsp:param
It's not a secret anymore!