How to handle dispatch action functionality in Struts 2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to handle dispatch action functionality in Struts 2

Prabodh Reddy
Can any one have the samples of work around for creating dispatch action functionality in struts 2.
Reply | Threaded
Open this post in threaded view
|

Re: How to handle dispatch action functionality in Struts 2

venkuk
Hi Prabodh,

In your form add submit button like <s:submit value="Submit" align="center" method="updateSub">

In your action class add method named updateSub

public String updateSub(){
/* TODO
*
*/
return SUCCESS;
}

Thanks
Venkuk
Reply | Threaded
Open this post in threaded view
|

Re: How to handle dispatch action functionality in Struts 2

Vijay_Java
but how to map this method name in Struts.xml file?? can u give me the sample code??
Reply | Threaded
Open this post in threaded view
|

Re: How to handle dispatch action functionality in Struts 2

dynamicd


<action name="updateSub" class="com.something.something.watever.classname" method="updateSub">

Look at some basic tutorials
http://struts.apache.org/2.x/docs/hello-world.html