This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: InvalidCancelException in Struts 1.1
 
Similar Threads
For Struts developers
Cannot find ActionMappings or ActionFormBeans collection
Struts tags not working: html tag & bean tag
Error creating form bean of class
tag libs