I have added the following content to my web.xml for a servlet context listener---
<listener>
<listener-class>
com.anyaservices.log4j.ApplicationServletContextListener
</listener-class>
</listener>
I have added this immediately after the end of "welcome-file-list"
The last line of the welcome-file-list node is given below--
</welcome-file-list>
Now, I have made some changes to a servlet so that it can use the context listener... in addition to the servlet there is a "Hello.jsp" file that just displays a welcome message.
I have not made any changes to the JSP file. However after my code changes for the servlet context listener, when I try to go to Hello.jsp I get an error in Tomcat= The requested resource is not available.
What have I done wrong here? Why is the JSP file not being shown now?
EDIT-- I have posted the entire content of my web.xml below--
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>Test Web Application</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>Hello.jsp</welcome-file>
</welcome-file-list>
<listener>
<listener-class>
com.test.log4j.ApplicationServletContextListener
</listener-class>
</listener>
<servlet>
<description>Used to run a single crawl job</description>
<display-name>runsinglecrawljob</display-name>
<servlet-name>runsinglecrawljob</servlet-name>
<servlet-class>com.test.runsinglecrawljob</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>runsinglecrawljob</servlet-name>
<url-pattern>/runsinglecrawljob</url-pattern>
</servlet-mapping>
<servlet>
<description>Home page</description>
<display-name>home</display-name>
<servlet-name>home</servlet-name>
<servlet-class>home</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>home</servlet-name>
<url-pattern>/home</url-pattern>
</servlet-mapping>
<servlet>
<description>Run a single crawl job after asking users for parameters of that job</description>
<display-name>runsinglejob</display-name>
<servlet-name>runsinglejob</servlet-name>
<servlet-class>com.test.runsinglecrawljob</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>runsinglejob</servlet-name>
<url-pattern>/runsinglejob</url-pattern>
</servlet-mapping>
</web-app>
The URL I am trying to access is http ://localhost:8080/test_web_app/Hello.jsp