File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes ERROR:   No action instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ERROR:   No action instance" Watch "ERROR:   No action instance" New topic

ERROR: No action instance

Wendy Baur

Joined: Mar 01, 2005
Posts: 13
I'm getting the error: No action instance for path /Login could be created. The login .jsp is located under gui/pages/security/Login.jsp

In the Login.jsp my form action is: <html:form action="/Login">

Please tell me what I'am doing wrong!!!
Jason Menard

Joined: Nov 09, 2000
Posts: 6450
We have no way of knowing what's wrong without seeing your struts-config.xml. Please be sure to enclose it in UBB CODE tags and when you post it.
Wendy Baur

Joined: Mar 01, 2005
Posts: 13
Snips from Struts-config.xml
Jason Menard

Joined: Nov 09, 2000
Posts: 6450
Just glancing at it, and based on what you said your <html:form> tag was, I'm not seeing anything that looks blatantly out of place.
Jonathan Lehr

Joined: Oct 07, 2003
Posts: 20
Hi Wendy,

It's hard to be sure what the problem is without seeing the code for your LoginAction class, but you might want to check to make sure that it extends org.apache.struts.Action or one of its subclasses.

selumiel eliude

Joined: Apr 05, 2005
Posts: 9
hi Wendy
check out the following information, i sincerely hope it gives u a hint to solve ur problem.if it helps let me know

Exception: No action instance for path /xxxx could be created
Probable Causes: Special Note - Because so many different things can cause this error, it is recommended that you turn your error logging/debugging levels on your web server to a high level of verbosity to see the underlying problems in trying to instantiate the action class you have written and associated with the specified action xxxx through an action mapping in the struts-config.xml file.

Your Action class specified in the struts-config.xml file under the class attribute of the action mapping for action xxxx cannot be found for a variety of reasons, including (but not limited to):
Failure to place compiled .class file for the action in the classpath (needs to be under WEB-INF/classes with the appropriate directory structure underneath this that matches the package your Action class belongs to).
Package spelling or hierarchy specified in your action class itself (using the package keyword) does not match the spelling or complete package hierachy specified for your action class in the class attribute of the action in struts-config.xml.

Action class specified in the /xxxx action mapping in the struts-config.xml file (class attribute) does not extend (directly or indirectly) from the Action class. In other words, your custom Action class does not extend off the Struts-provided Action class or off of another class that eventually extends the Action class (such as DispatchAction.
Problem in your classpath, such as web server not being able to find files in the WEB-INF/classes/ directory or specified subdirectory.
Problem in struts-config.xml file with action mapping.
Problem with data-sources.xml file.

Relevant Links: Application's Action classes does not extend Struts-provided Action class

Package hierarchy/directory structure specified in struts-config.xml file differs from that hierarchy specified in the actual action class's file using the package keyword.
Action Mapping mistake in struts-config.xml:
data-sources.xml file?:
I agree. Here's the link:
subject: ERROR: No action instance
It's not a secret anymore!