This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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.
Don't get me started about those stupid light bulbs.
subject: jsp:include & jsp:param
jQuery in Action, 3rd edition