wood burning stoves 2.0*
The moose likes Struts and the fly likes Bean has no property named cancellable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Bean has no property named cancellable" Watch "Bean has no property named cancellable" New topic
Author

Bean has no property named cancellable

fuan guo
Greenhorn

Joined: Apr 09, 2008
Posts: 1
Hi all,
I am stuck in using the <html:cancel> button.The struts version is 1.2.7.When I am starting up tomcat 6.0,an exception occurred as following description:

1) In the JSP


code:
--------------------------------------------------------------------------------

.. <html:cancel value="CLEAR" /> ..

--------------------------------------------------------------------------------



2)In the struts-config.xml, added the below line in <action..> tag


code:
--------------------------------------------------------------------------------

<set-property property="cancellable" value="true" />

--------------------------------------------------------------------------------



3) In the Action class, the corresponding code is,

code:
--------------------------------------------------------------------------------

execute(...){ .... if(isCancelled(request)){ Sop("**** in isCancelled ****") session.setAttribute("customerSearchResults", null); return mapping.findForward( "search"); }

--------------------------------------------------------------------------------


Also Iam getting an exception :


code:
--------------------------------------------------------------------------------

007-03-06 15:51:56,435 ERROR [org.apache.struts.action.ActionServlet] - Parsing error processing resource path java.lang.NoSuchMethodException: Bean has no property named cancellableat org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)at org.apache.commons.digester.Digester.startElement(Digester.java:1276)at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)at oracle.xml.parser.v2.ValidatingParser.parseRootElement(ValidatingParser.java:1......

--------------------------------------------------------------------------------





Pls let me know how to proceed

Thanks,
Guo
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Just remove the statement:

In Struts 1.2.9 and above, you must specify callellable="true" in your action mapping in the struts-config.xml file if you want to use the cancel function. However, since you're using Struts 1.2.7, this doesn't apply to you.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Bean has no property named cancellable