• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot cast org apache struts action.Action?

 
Yashnoo lyo
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone:
I have wrote two javabean for struts.One is LogonForm and another is LogonAction.But I really don't know whether Jdk1.3 support struts1.0.Compiler report error When I compile the LogonAction and it says:"LogonAction.java: Error #: 364 : cannot cast org.apache.struts.action.ActionForm to app.LogonForm at line 13, column 34
".It point to "String username=((LogonForm)form).getUsername();".Why this? I have already added the struts.jar to classpath and my compiler.Struts examples run successfully under Tomcat4.Can anyone help me?
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java Frameworks forum...
 
Junilu Lacar
Bartender
Pie
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you check if LogonForm extends ActionForm?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic