aspose file tools*
The moose likes JSP and the fly likes request  object is not propagated to next page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

request object is not propagated to next page

sridhar yenamandra
Greenhorn

Joined: Jul 27, 2004
Posts: 19
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

Joined: Aug 17, 2005
Posts: 69
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

Joined: Jan 10, 2002
Posts: 61426
    
  67

Please do not ask the same question more than once,


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: request object is not propagated to next page