Cannot run A JSP file in a WAR (Apache Tomcat 5.5.20)

satishkumar_lskin's Avatar, Join Date: Dec 2006
Newbie Member
Iam using Apache Tomcat 5.5.20.
Iam trying to deploy a web application named "ShowLifecycles".It has one JSP file named "ShowLifecycles.jsp" and a .Class file named "MyAppListener.class".
I have packaged them as follows:

2)<TOMCAT-ROOT>/webapps/ShowLifecycles/WEB- INF/classes/examples/MyAppListener.class

My web.xml looks like this:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<web-app xmlns="" xmlns:xsi="" xsi:schemaLocation="" version="2.4">

<description>An example of how to use lifecycle events</description>
<listener-class> examples.MyAppListener </listener-class>

When I point my browser to


it tells

"The requested resource(/ShowLifecycles/ShowLifecycles.jsp) is not available".

MyAppListener implements a ServletContextListener.I have typed the URL in correct case. Another Web application of a similar type was able to execute a JSP file in it.

I have tried using <jsp-file> and <servlet-mapping> in web.xml. Still it doesn't work.
I would be grateful to receive a prompt reply.
pradeep's Avatar, Join Date: Apr 2005
Team Leader
WAR stands for Web ARchive, export your project as WAR file from the IDE you are using for development, and then use the Tomact Manager to deploy the WAR file.