Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

InvalidCancelException in Struts 1.1

 
Ranch Hand
Posts: 367
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 2
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My problem got solved with cancellable="true" as shown below:
reply
    Bookmark Topic Watch Topic
  • New Topic