• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ClassCastException on form submit

 
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear friends,

When i submit a JSP page i get the following weird exception:

java.lang.ClassCastException: java.lang.String incompatible with org.apache.struts.action.ActionForm
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:777)
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

I checked and double-checked the struts-config.xml file. All the entries are perfect. The action mappings everything are correct.

The following code is in my JSP an <html:form>, which displays a drop-down box from which user will select a value. getList(this) is a javascript which contains no errors.


onsubmit i call another action and during this time, after selecting a value from the drop down i get the above exception. The form bean variables have matching data types.

Kindly provide your help.

Regards,
Vijay
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic