It's not a secret anymore!
The moose likes Struts and the fly likes  cannot cast org apache struts action.Action? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply 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: 4115
    
    2

Did you check if LogonForm extends ActionForm?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: cannot cast org apache struts action.Action?
 
Similar Threads
Struts 1.0 issue with ActionForm
populating the databse
primitive types in collections
Validator Problems
struts.action.PlugIn Class cast issue in Struts on JBoss server