This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes ClassCastException on form submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ClassCastException on form submit" Watch "ClassCastException on form submit" New topic

ClassCastException on form submit

Vijay Chandran
Ranch Hand

Joined: Jan 07, 2007
Posts: 186

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

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.

I agree. Here's the link:
subject: ClassCastException on form submit
It's not a secret anymore!