File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Cancel problem in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Cancel problem in struts" Watch "Cancel problem in struts" New topic

Cancel problem in struts

Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344
Why I am getting this error when I am clikcing the cancel button in the form.

I am using as follows:


Whether I have to configure action mapping for cancel button also. Struts don't have any in-built cancelling facility?

Error I am getting::

Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In Struts versions 1.2.8 and above you must specify cancellable="true" in your action mapping to enable the cancel button. In a normal action, you can simply call isCancelled(request) in order to determine whether the cancel button was pressed or not. If your action is a subclass of DispatchAction you must code a cancelled method in the Action class.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Cancel problem in struts
It's not a secret anymore!