This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes I want to pass the parameter to the same action after submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "I want to pass the parameter to the same action after submit" Watch "I want to pass the parameter to the same action after submit" New topic
Author

I want to pass the parameter to the same action after submit

Swapnil Narkhede
Greenhorn

Joined: Feb 26, 2011
Posts: 1
I want to pass the parameter to the same action after submit .how can i,...

I tried this but it s not working ...
<s:submit value="Add Contact" align="center" action="add?firstName=<s:property value="website"/> "/>

Also I m tried to pass the parameter through struts.xml like ,

<action name="index">
<result name="success">
<param name="nm">${userName}</param> -->
</result>
</action>

this code passes the parameter action class is also called but wher i can give the jsp path to that action
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Hi Swapnil, welcome to javaranch.

Follow this example http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect

@Moderator please move the thread to struts forum.

ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

So, Moved to an appropriate forum.
candid java
Greenhorn

Joined: Jan 13, 2012
Posts: 14
i was found the exact answer please refer this link http://candidjava.com/struts-1x-lookup-dispatch-action-with-example-program-in-eclipse
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I want to pass the parameter to the same action after submit
 
Similar Threads
struts 2 passing parameter to interceptor
Cannot set attribute in request in jsp
how to access the <param> in jsp which are set from struts.xml
struts 2 passing parameter to interceptor
Struts 2 - passing request parameters on the fly during redirectAction result type