File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "first struts application error" Watch "first struts application error" New topic
Author

first struts application error

Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97
Hi,
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:

web.xml


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.

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

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...


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

Joined: Oct 19, 2005
Posts: 97
Hi,
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 SelectBeer.do, 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 .


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: first struts application error