Bookmark Topic Watch Topic
  • New Topic

request object is not propagated to next page

 
sridhar yenamandra
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Report post to moderator
In a jsp If I have a submit button that takes me to another page,will the request object still be available in that next page. Iam facing the following issue .

First.jsp
---------
<form method=post action="Second.jsp" >
<% String st="abc";
request.setAttribute("abc",st) ;
%>
<input type=submit name="GO" value="GO"/>

Second.jsp
---------
The value is : ${abc}

Output:
------
The value is : (nothing is being printed)

Note: Iam Using Tomcat 5.5 and El is enabled and is working fine.

My Doubt: Is Clicking the button Go is Making me to go to Client and request is being lost?

Please provide solution for this.Thanks.

Regards,
Sridhar.
 
Darren Edwards
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Report post to moderator
When the button is clicked the client is making a new request, so yes, the original request is lost. What you are trying to do needs parameters (you cannot set request parameters programatically);

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not ask the same question more than once,
 
    Bookmark Topic Watch Topic
  • New Topic