When I run this example from the Apache Jakarta Book I get the following error:
type Status report
message /apress/servlet/chapter2.login
description The requested resource (/apress/servlet/chapter2.login) is not available.
The code compiles ok, I think the problem is how I have set up by XML deployment files:
In the server.xml C:\jakarta-tomcat-5.0.19\conf
under the code:
<Host appBase="webapps" autoDeploy="true" debug="0" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
I added the following xml code:
<Context debug="0" docbase="apress" path="/apress" reloadable="true"></Context>
In the web.xml in directory C:\jakarta-tomcat-5.0.19\webapps\apress\WEB-INF
I added the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd" >
<web-app>
<
servlet>
<servlet-name>login</servlet-name>
<servlet-class>chapter2.login</servlet-class>
</servlet>
</web-app>
Under C:\jakarta-tomcat-5.0.19\webapps
I added apress which contains my
JSP file
under C:\jakarta-tomcat-5.0.19\webapps\apress\WEB-INF\classes\chapter2
I added the login.class.
Not sure what else I can do.
Thanks for any help
PS how do I stop the same jsp being loaded after changes, at the moment all I can do is stop and restart my PC.