• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

InvalidCancelException in Struts 1.1

 
pramod talekar
Ranch Hand
Posts: 366
Eclipse IDE Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Steve Dambrosio
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem got solved with cancellable="true" as shown below:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic