I've a form in my app with 2 buttons Submit and Cancel.
When I click on Submit , it works fine and I get Success.jsp (mentioned in mapping.forward).
However, When I click on Cancel, I get http 500 error with following details :-
This is my Action class :-
Below is my Struts-config.xml file :-
This is my message resource bundle file which works fine.
prompt.customer.firstname= First Name
prompt.customer.lastname = Last Name
button.save = Save
button.cancel = Cancel
error.cust.firstname.null= First name is required
This is CustomerDetails.jsp file having these buttons : -
I googled it, it was mentioned that the mentioned error pops up when the Cancel mapping is missing something.
But everything looks fine in my case i.e. mainpage and corresponding index.jsp
One thing I need to know is that how to map the Cancel button's submit event with the isCancelled method which is provided in Struts.
I think Struts automatically maps it with the method using introspection.
Am I right ?
Joined: Apr 02, 2009
I'm having the same problem (although it surfaced when I upgraded from struts 1.1 to struts 1.3). Your code looks good to me - have you found a solution?