This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:include & jsp:param

 
riteshrr mani
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"/>
<jsp:include>

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.

PLEASE Help!!
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because now you are accessing a new request object. Read about request lifecycle.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic