• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Help please-Exception thrown by the execute method

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand why i get a classcastException when i cast the ActionForm.
I am a newbie to structs and hence i have given all my code except ce
Here is my code



Here is my LoginForm.java



Here is my page where i redirect to this Action Class

I have just added the <form> tag alone



Here is my Web.xml



Here is my structs-config.xml

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why aren't you using the Struts form tags?
 
sree visu
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is because i have completely checked for errors at the client side using java script and have validated it.I am using structs to make a the front controller so that the redirection could be easy.So i have not used the validate method too
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you access the form page through an action?

(btw, your "reset" method is named "Reset", which probably won't work.)
 
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!