This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes InvalidCancelException in Struts 1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "InvalidCancelException in Struts 1.1" Watch "InvalidCancelException in Struts 1.1" New topic
Author

InvalidCancelException in Struts 1.1

pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Hello,

I'm using Struts 1.1 and Tomcat 6.

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 ?
Please advise.


Thanks,
Pramod
Steve Dambrosio
Greenhorn

Joined: Apr 02, 2009
Posts: 28
Pramod,
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?
Francisco Jimenez
Greenhorn

Joined: Oct 03, 2012
Posts: 2

My problem got solved with cancellable="true" as shown below:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: InvalidCancelException in Struts 1.1
 
Similar Threads
Error creating form bean of class
Cannot find ActionMappings or ActionFormBeans collection
For Struts developers
tag libs
Struts tags not working: html tag & bean tag