• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

first struts application error

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

TryThis link .
 
Yup, yup, yup. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic