Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Application is not running

 
umesh aum
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am new to struts,i have developed a small application but it is not running,it is displaying the index page correctly but not forwarding the request.i developed the application using my eclipse.when i checked the tomcat log file it is showing the exception that it is not able to find the ActionServlet class,where as i have configured the struts-config classs correctly in the web.xml file i m also pasting the content of the web.xml file.Please help me to find out the error.

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>


<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

Regards,
Umesh
 
roseline ruba
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you put the struts.jar file WEB-INF/lib folder?
 
umesh aum
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes this jar file is very much in the said folder.
still it is not working..
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Show us the actual exception you're getting along with the first few lines of the stack trace.
 
umesh aum
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is showing the exception ClassNotFoundException. and the class which was not found is ActionServlet.

I tried one example from the web by deployinying the war flie in tomcat it worked smmothly.but when i configured it according to my application it again show me the same Exception.

I am not able to point out what might be the cause of the Exception

AnyHelp in this regard is much appriciated.

Thanks,
Umesh
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic