• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, Moved to an appropriate forum.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic