Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Bean has no property named cancellable

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic