• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

first struts application error

 
Raj Bhandari
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, I'd like to add that I have struts.jar in WEB-INF/lib folder.
 
Shailesh Pillai
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you deployed ur web application on to the webapps folder of your Application Server?
 
Abhishek Dwaraki
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Raj Bhandari
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd suggest posting your problem on the Oracle forum for OC4j.

TryThis link .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic