aspose file tools*
The moose likes Struts and the fly likes ActionServlet ClassNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionServlet ClassNotFoundException" Watch "ActionServlet ClassNotFoundException" New topic
Author

ActionServlet ClassNotFoundException

Pranav Dash
Greenhorn

Joined: Feb 01, 2012
Posts: 3
I have created my first application in struts and finding the below issue

SEVERE: Error loading WebappClassLoader
context: /FirstStrutsApp
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@b8df17
org.apche.struts.action.ActionServlet
java.lang.ClassNotFoundException: org.apche.struts.action.ActionServlet


I m using eclipse Helios and tomcat 6.0.35. I have copied all the required jar file.
Any solution
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8925
    
    9

Welcome to the JavaRanch. How are you building and deploying your application? Are you sure that your JAR dependencies are getting into your WAR file?
Have a look at the Tomcat Application Developers Guide for the best practices on building and deploying.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Pranav Dash
Greenhorn

Joined: Feb 01, 2012
Posts: 3
Thank you.

I am using eclipse.
Created Dynamic webproject.
Copied all required jar files into lib.
Copied required all tlds into WEB-INF.
Created struts-config.xml in WEB-INF.
Configured ActionServlet in web.xml.

Then i am running the application in tomcat from eclipse. I am creating war and deploying
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8925
    
    9

Pranav Dash wrote:
Copied all required jar files into lib.


In a WAR, the dependencies should be in WEB-INF/lib. Where is Eclipse putting them?
Pranav Dash
Greenhorn

Joined: Feb 01, 2012
Posts: 3
Hi joe

I have copied all the following jars into WEB-INF/lib

1. commons-beanutils.jar
2. commons-collections.jar
3. commons-digester.jar
4. commons-fileupload.jar
5. commons-lang.jar
6. commons-logging.jar
7. commons-validator.jar
8. jakarta-oro.jar
9. struts.jar
10. struts-legacy.jar

Allthe following tlds into WEB-INF
1. struts-bean.tld
2. struts-html.tld
3. struts-logic.tld
4. struts-nested.tld
5. struts-template.tld
6. struts-tiles.tld

Created struts-config.xml in WEB-INF.
Configured ActionServlet in web.xml.

and I am running the application from eclipse and getting the following in eclipse Console

SEVERE: Error loading WebappClassLoader
context: /FirstStrutsApp
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@b8df17
org.apche.struts.action.ActionServlet
java.lang.ClassNotFoundException: org.apche.struts.action.ActionServlet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ActionServlet ClassNotFoundException