*
The moose likes Struts and the fly likes  cannot cast org apache struts action.Action? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark " cannot cast org apache struts action.Action?" Watch " cannot cast org apache struts action.Action?" New topic
Author

cannot cast org apache struts action.Action?

Yashnoo lyo
Ranch Hand

Joined: Feb 17, 2003
Posts: 152
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?


When I face C# and Java I choose Java.
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Moving to Java Frameworks forum...


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4447
    
    5

Did you check if LogonForm extends ActionForm?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot cast org apache struts action.Action?
 
Similar Threads
primitive types in collections
Struts 1.0 issue with ActionForm
Validator Problems
struts.action.PlugIn Class cast issue in Struts on JBoss server
populating the databse