File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes first struts application error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "first struts application error" Watch "first struts application error" New topic

first struts application error

Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97
I get the following error while trying the simple beer application (using struts) example in head first servlet & jsp book:

Servlet error: Error instantiating servlet 'FrontController' (servlet class not found, make sure it exists at \\ny-file-02\dev\bhandarir\workspace\firststruts\WebRoot/WEB-INF/classes/org/apache/struts/action/ActionServlet.class, in a jar in \\ny-file-02\dev\bhandarir\workspace\firststruts\WebRoot/WEB-INF/lib/, in an orion-web.xml specified classpath or global server classpath)

Following are my configuration files:


Here's my struts-config.xml

Any help would be apprecaited, thanks!
Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97
Also, I'd like to add that I have struts.jar in WEB-INF/lib folder.
Shailesh Pillai
Ranch Hand

Joined: Jan 24, 2006
Posts: 78
Have you deployed ur web application on to the webapps folder of your Application Server?
Abhishek Dwaraki
Ranch Hand

Joined: Feb 13, 2006
Posts: 44
Try doing a servlet mapping for the Action Servlet instead of the Front Controller like this.


And as an afterthought, check your package hierarchy. It should be identical with the one specified in the action mapping tag. Just check these out... It was where I was making a mistake...

Abhishek Dwaraki
Dept of Electrical and Comp Engg
University of Massachusetts, Amherst
Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97
Tks Shailesh, Abhishek for trying to help out.
Abhishek, I tried 'action' instead of 'FrontController' but it gives same error: Error instantiating servlet 'action' (servlet class not found...

Just so that you know, I'm using oc4j10g standalone. So, I have pointed my application to the oc4j server in application.xml, http-web-site.xml in oc4j. The first screen (form.jsp) shows up successfully. Its only when I click on the button to submit to, I get the above mentioned error. Here is my code for form.jsp:

Also, here is the hierarchy of my application:

Someone please help me out because otherwise I'll have to start my project without struts as time is running out for me
Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97
I'm able to get this running in tomcat but not in oc4j10g standalone (I get the above mentioned error in this).
Any ideas how to achieve in oc4j10g standalone ?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'd suggest posting your problem on the Oracle forum for OC4j.

TryThis link .

Consultant, Sima Solutions
Consider Paul's rocket mass heater.
subject: first struts application error
Similar Threads
Getting error while running BeerStruts example
Trouble with Struts
problem in struts example
404 - Servlet FrontController is not available
HFSJ page 742