Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-22-2006, 12:39 PM   PM User | #1
satishkumar
New to the CF scene

 
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
satishkumar is an unknown quantity at this point
Cannot run A JSP file in a WAR (Apache Tomcat 5.5.20)

Hi,
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:

1)<TOMCAT-ROOT>/webapps/ShowLifecycles/ShowLifecycles.jsp
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="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

<display-name>ShowLifecycles</display-name>
<description>An example of how to use lifecycle events</description>
<listener>
<listener-class> examples.MyAppListener </listener-class>
</listener>
</web-app>

When I point my browser to

http://localhost:8080/ShowLifecycles/ShowLifecycles.jsp

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.
satishkumar is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:58 AM.


Advertisement
Log in to turn off these ads.