Two Laptop Bag*
The moose likes Struts and the fly likes How to call a method other than execute in jsp in struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to call a method other than execute in jsp in struts 2" Watch "How to call a method other than execute in jsp in struts 2" New topic
Author

How to call a method other than execute in jsp in struts 2

aman thind
Ranch Hand

Joined: Jun 29, 2007
Posts: 71
I have an add() method in my action other than execute method. How to direct my jsp to call add() method of my action

Thanks in advance


Aman Thind
SCJP,SCWCD
JAVA utte mar JAVA,mit JAVA
Anbarasu Aladiyan
Ranch Hand

Joined: Jun 02, 2009
Posts: 182

You need to specify it using 'method' attribute of 'action' tag in struts xml file.


A.A.Anbarasu
aman thind
Ranch Hand

Joined: Jun 29, 2007
Posts: 71
Anbarasu Aladiyan wrote:You need to specify it using 'method' attribute of 'action' tag in struts xml file.


I had done that.But i was not sure that's the only thing we needed to do.
I was giving wrong "action" attribute in s:form :p
Thanks a lot
 
Consider Paul's rocket mass heater.
 
subject: How to call a method other than execute in jsp in struts 2
 
Similar Threads
Flow of execution when there is no form
Forwarding to a different JSP on error
struts1
execute method in struts
Struts 2 and call another method != execute