aspose file tools*
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
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: I want to pass the parameter to the same action after submit