wood burning stoves 2.0
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
JavaRanch » Java Forums » Java » JSP
Reply locked New topic

request object is not propagated to next page

sridhar yenamandra

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 .

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

The value is : ${abc}

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.

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

Joined: Jan 10, 2002
Posts: 63865

Please do not ask the same question more than once,

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: request object is not propagated to next page
It's not a secret anymore!