• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Swapnil Narkhede
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, Moved to an appropriate forum.
 
candid java
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i was found the exact answer please refer this link http://candidjava.com/struts-1x-lookup-dispatch-action-with-example-program-in-eclipse
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic