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

Servlet Exception

 
trinity jecob
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am getting the following exception while loading a JSP page.
(The application is using the Struts Frame work)

 
Sivaraman Lakshmanan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi trinity,
There is a seperate forum for struts. This exception is caused because struts could not find the action mapping in the struts-config.xml file.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65110
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to post Struts questions in the Struts forum. I have moved this post there for you.
 
trinity jecob
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all sorry for posting the question in a wrong forum and thanks for forwarding it to the correct one

I have a Login.jsp, in which the form tag is specified as follows

struts-config.html contains -


I am using Tomcat5.0. Dir. structure as follows
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This error occurs when the Struts ActionServlet has not been initialized prior to your calling a Struts JSP. There are generally two possible reasons for this:

1. You didn't put <load-on-startup>1</load-on-startup> in the ActionServlet's definition in your web.xml file.

2. The ActionServlet is throwing an exception when it tries to initialize. If this is the case, you will see a stack trace indicating what the problem is in the Application server's log when the application first starts up. The most common reason it might throw an exception is that your XML is not well-formed in the struts-config.xml file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic