wood burning stoves 2.0*
The moose likes Struts and the fly likes Including Request parameters to the response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Including Request parameters to the response" Watch "Including Request parameters to the response" New topic

Including Request parameters to the response

pamir sonmez
Ranch Hand

Joined: May 31, 2010
Posts: 46
Let me explain what I wanted simply,

Firstly in 1.jsp page I have a textbox and from this page and action method is called
In this method, I can reach the value of the textbox from request, from this method 2.jsp page is called
in this jsp page an action method is called
and in this method I want to reach same textbox value

in the first action method I can put it into the session object.
Or is there some including mechanism that I can direct parameter of 1.jsp to the 2.jsp page.

in action method, I use actionMapping.findforward(....) method
Jesus Mireles
Ranch Hand

Joined: Mar 10, 2010
Posts: 122

I'm not sure what your really asking but from my understanding do you not want to use session?
pamir sonmez
Ranch Hand

Joined: May 31, 2010
Posts: 46
you are right,I dont want to use session.

In the first action method(called from 1.jsp) I can reach the textbox value
and in the second action method(called from 2.jsp), I want to reach the value of textbox in the 1.jsp page
How can I include value of textbox to the request scope of 2.jsp page?
James Peter
Ranch Hand

Joined: Sep 15, 2010
Posts: 115
1. Create textfield property in action. for example text1.

2. Action properties are exposed via public getter methods:
public String getText1() {
return getText("from.class.props");
Now, we can access the text in our JSP via the text1 action property:
<s:property value="text1"/>

So value will be passed from 1.jsp to action and to 2.jsp
I agree. Here's the link: http://aspose.com/file-tools
subject: Including Request parameters to the response
Similar Threads
Expire session and show 'invalid session' page when user press browser's back button
Using redirect from backing bean and getting IllegalStateException error
How to add error message before sendRedirect
How to pass javascript value to Java method within JSP
Problem in setting a value of drop down