IntelliJ Java IDE
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
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply 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: 427

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
Bartender

Joined: Jan 28, 2008
Posts: 4503

So, Moved to an appropriate forum.


Not everything that counts can be counted, and not everything that can be counted counts-Albert Einstein
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
 
IntelliJ Java IDE
 
subject: I want to pass the parameter to the same action after submit
 
Threads others viewed
struts 2 passing parameter to interceptor
Cannot set attribute in request in jsp
struts 2 passing parameter to interceptor
how to access the <param> in jsp which are set from struts.xml
Struts 2 - passing request parameters on the fly during redirectAction result type
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com