Solved

Tomcat / java servlet help

Posted on 2004-04-16
21
2,257 Views
Last Modified: 2013-11-24
I have the following java servlet I got from a book. I compile it and I get 12 errors. The main errors stim from the fact that my compiler is saying javax.servlet and javax.servlet.http do not exist. This is, like I said, a servlet that I am trying to run in an endeavor to learn java/jsp/serlets/etc...I haven't found any great tutorial that begins with a detailed description of how to set things up server wise (I am using apache tomcat 5.19 ). I do have tomcat up and running as a webserver (i.e. the welcome page / http://127.0.0.1:8080/ works) so I believe it to be operational at least. However the code below does not compile and my java skills are not honed enough to know why (save for the obvious error that the first two import files do not exist, but I do not know where to get them or why they don't exist). I have installed the java sdk ver 1.4.2_3. I added a path to the bin directory to the environment variable: PATH. The book I am using (Professional Jakarta Struts ) conveys that this code should compile fine.

Bottom line: what do I need to do to get the code below to compile, and then to set up the servlet so I can run it via Apache Tomcat 5.19? The web.xml reads as follows:

<servlet>
<servlet-name>SimpleServlet</servlet-name>
<servlet-class>chapter2.SimpleServlet </servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SimpleServlet</servlet-name>
<url-pattern>simple</url-pattern>
</servlet-mapping>



//************BEGIN CODE THAT NEEDS DEBUGGING ********************//

package chapter2;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class SimpleServlet extends HttpServlet {

      public void init(SeviceConfig config ) throws ServletException {

      //Always pass the ServletConfig object to the super class
      super.init(config);

      }

      public void doGet(HttpServletRequest request,
                    HttpServletResponse response ) throws ServletException, IOException {

            doPost(request, response);
      }

      //Process the HTTP Post request
      public void doPost( HttpServletRequest request,
                      HttpServletResponse response) throws ServletException, IOException {

            response.setContentType("text/html");
            PrintWriter out = response.getWriter();

            out.println("<HTML>");
            out.println("<head><title>Simple Servlet</title></head>");
            out.println("<body>");

            //outputs the address of the calling client
            out.println("Your address is " + request.getRemoteAddr() + "\n" );

            out.println("</body></html>");

            out.close();

      }

}

//*********************END CODE THAT NEEDS DEBUGGING ******************/
0
Comment
Question by:jbaisden
  • 8
  • 6
  • 4
  • +1
21 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10843848
You need to download the servlet classes

http://java.sun.com/products/servlet/download.html
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10843855
...although if you have Tomcat, you'll have this library. Add it to your classpath
0
 
LVL 3

Expert Comment

by:int_20h
ID: 10843906
the jar is located in the following directory: <tomcatdir>/common/lib/servlet.jar
0
 
LVL 4

Expert Comment

by:john-at-7fff
ID: 10843928
If you're on Windows, the default Tomcat install puts the servlet libraries here:

C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar

So your command would be (all on one line):

javac -classpath "C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar" SimpleServlet.java

By the way, there's a typo in your code. You say:

    public void init(SeviceConfig config ) throws ServletException

But it should be:

    public void init(ServletConfig config) throws ServletException

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10843952
>>
So your command would be (all on one line):

javac -classpath "C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar" SimpleServlet.java

>>

In that case the command should be

javac -classpath %CLASSPATH%;.;"C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar" SimpleServlet.java

0
 
LVL 4

Expert Comment

by:john-at-7fff
ID: 10843995
Last things:

Under the Tomcat webapps/ dir, create a directory called, say, myproj
Then within that, create a directory called WEB-INF    -- put your web.xml there (was there more to your web.xml ? There should be a DTD declaration and stuff like that at the top).
Then within WEB-INF, create a directory called classes/
Put your whole class tree in there.

Then browse to http://localhost:8080/myproj/simple

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10844020
>>In that case the command should be...

Actually that's still not right. It should be

javac -classpath %CLASSPATH%;.;"C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar" chapter2\SimpleServlet.java

0
 
LVL 4

Expert Comment

by:john-at-7fff
ID: 10844062
The command I originally gave should be fine.
0
 

Author Comment

by:jbaisden
ID: 10844108
Actually there wasn't anything else listed in the web.xml from the book. Could you tell me what I am missing please?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 4

Expert Comment

by:john-at-7fff
ID: 10844292
Sure. See below.

The first line says: It's XML
The second line says: Use this DTD at Sun to say what elements can be in the document.

Then you need to enclose your stuff in <web-app>

The display-name is just one among MANY directives you can put in here. Unfortunately, this is not documented as well as it should be. One place where you can get the full info is to download the Servlet specification: http://java.sun.com/products/servlet/download.html

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>

<web-app>
 <display-name>Example</display-name>
<servlet>
<servlet-name>SimpleServlet</servlet-name>
<servlet-class>chapter2.SimpleServlet </servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SimpleServlet</servlet-name>
<url-pattern>simple</url-pattern>
</servlet-mapping>

</web-app>




0
 

Author Comment

by:jbaisden
ID: 10844892
Alright I have the directory structure set up.

I made a folder in the web-apps (of the tomcat directory) folder titled ch02app. I then made the web-INF folder. I put my web.xml in that folder. I also created a classes folder and a lib folder in the WEB-INF folder. I put my class file (SimpleServlet.class) in the class folder and the servlet-api.jar in the lib folder. However when I navigate to:

http://localhost:8080/ch02app/SimpleServlet , Tomcat says it can't find anything there

Any suggestions?
0
 
LVL 4

Expert Comment

by:john-at-7fff
ID: 10846534
You're getting there.

Note that the servlet-mapping is: /simple

So try browsing to:

    http://localhost:8080/ch02app/simple

0
 

Author Comment

by:jbaisden
ID: 10859570

CATALINA_HOME
      -- webapps
            -- ch02app
                  --WEB-INF
                        -- classes
                              SimpleServlet.class
                              -- chapter2 ( thought it might work...)
                                    SimpleServlet.class
                        -- lib
                              servlet-api.jar
                        web.xml
                        
                        
Given the above, note that the Tomcat icon with the green arrow, which indicates it is running
is displayed in my sys tray. I have tried the following urls:

http://localhost:8080/ch02app/simple
http://localhost:8080/ch02app/chapter2/simple
http://localhost:8080/ch02app/simpleservlet
http://localhost:8080/ch02app/
http://localhost:8080/simple/


For all of the above, Tomcat says the requested resource cannot be found (404 file not found error)

I am the admin on my machine so I don't think privelleges is the problem.

I am running tomcat 5.018
JSDK: 1.4.2_03
J2RE: 1.4.2_03


Any ideas? I have also tried copying the structure and renameing ch02app to just app. So far it still hasn't worked.
0
 
LVL 4

Expert Comment

by:john-at-7fff
ID: 10859630
You're getting there.

I think your problem is that your URL mapping (in web.xml) should be /simple not simple (I just double-checked something I have deployed to Tomcat, and it has the leading slash).

After you make this fix, try again (after waiting a few minutes). If that doesn't work, stop and start Tomcat. Then if THAT doesn't work, write again. Also, you might double-check the server log (what Tomcat displays in its window when it starts).

Also:

--you're right to put SimpleServlet.class in WEB-INF/classes/chapter2

--You don't need to put servlet-api.jar in the app's lib/ -- it's loaded by Tomcat.

0
 

Author Comment

by:jbaisden
ID: 10859940

Alright your suggestion did help. I checked the console log and apparently there are a slew of erros that are generated, though, when tomcat is starting up it doesn't display any error and the icon still appears in the sys tray. Here is the console log from my most recent start up. It's a mess of stuff to go through and I'm still looking myself...


Apr 19, 2004 9:18:32 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
Apr 19, 2004 9:18:32 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1141 ms
Apr 19, 2004 9:18:32 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 19, 2004 9:18:32 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.18
Apr 19, 2004 9:18:33 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Apr 19, 2004 9:18:33 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Apr 19, 2004 9:18:33 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina\localhost\admin.xml
Apr 19, 2004 9:18:33 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Apr 19, 2004 9:18:33 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Apr 19, 2004 9:18:34 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
Apr 19, 2004 9:18:35 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina\localhost\balancer.xml
Apr 19, 2004 9:18:35 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina\localhost\manager.xml
Apr 19, 2004 9:18:35 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /struts-blank from URL file:C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/struts-blank
Apr 19, 2004 9:18:36 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Apr 19, 2004 9:18:36 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Apr 19, 2004 9:18:36 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='resources.application', returnNull=true
Apr 19, 2004 9:18:36 AM org.apache.struts.tiles.TilesPlugin init
INFO: Tiles definition factory loaded for module ''.
Apr 19, 2004 9:18:36 AM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Apr 19, 2004 9:18:37 AM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Apr 19, 2004 9:18:37 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /struts-example from URL file:C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/struts-example
Apr 19, 2004 9:18:38 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Apr 19, 2004 9:18:38 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Apr 19, 2004 9:18:38 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.webapp.example.AlternateApplicationResources', returnNull=true
Apr 19, 2004 9:18:38 AM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.webapp.example.ApplicationResources', returnNull=true
Apr 19, 2004 9:18:38 AM org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn init
INFO: Initializing memory database plug in from '/WEB-INF/database.xml'
Apr 19, 2004 9:18:39 AM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Apr 19, 2004 9:18:39 AM org.apache.struts.validator.ValidatorPlugIn initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Apr 19, 2004 9:18:39 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /struts-simple from URL file:C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/struts-simple
addRuleSet() with namespace URI http://jakarta.apache.org/commons/workflow/base
addRuleSet() with namespace URI http://jakarta.apache.org/commons/workflow/core
addRuleSet() with namespace URI http://jakarta.apache.org/commons/workflow/io
addRuleSet() with namespace URI http://jakarta.apache.org/commons/workflow/web
setDocumentLocator(org.apache.crimson.parser.Parser2$DocLocator@167e3a5)
startDocument()
addRuleSet() with namespace URI http://jakarta.apache.org/commons/workflow/base
addRuleSet() with namespace URI http://jakarta.apache.org/commons/workflow/core
addRuleSet() with namespace URI http://jakarta.apache.org/commons/workflow/io
addRuleSet() with namespace URI http://jakarta.apache.org/commons/workflow/web
setDocumentLocator(org.apache.crimson.parser.Parser2$DocLocator@b20352)
startDocument()
register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'file:/C:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/struts-simple/loader/org/apache/struts/resources/struts-config_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'file:/C:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/struts-simple/loader/org/apache/struts/resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'file:/C:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/struts-simple/loader/org/apache/struts/resources/web-app_2_3.dtd'
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
 Resolving to alternate DTD 'file:/C:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/struts-simple/loader/org/apache/struts/resources/struts-config_1_0.dtd'
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[simpleForm])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[nestedForm])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[emptyForm])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[act1Form])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[act2Form])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[DemoBean])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[welcome])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[error])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[help])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[cancel])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[simple])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[nested])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[wizard])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[wizard-demo])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[struts-demo])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity1])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity1.0])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity1.1])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity1.2])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity1.3])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity1.4])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity2])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity2.0])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity2.1])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity2.2])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[activity2.3])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/act1/Input, type=simple.Activity1])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[continue])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/act1/Insert, type=simple.Activity1])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/act2/Input, type=simple.Activity2])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[continue])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/act2/Insert, type=simple.Activity2])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/welcome])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/help])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/start])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/demo, type=simple.ActivityAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[continue])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/simple/Input, type=simple.Access])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[cancel])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[continue])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/simple/Insert, type=simple.Access])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[continue])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/nested/Input, type=simple.Access])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[cancel])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[continue])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/nested/Insert, type=simple.Access])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin/Reload, type=org.apache.struts.actions.ReloadAction])
Pop org.apache.struts.action.ActionMapping
register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'file:/C:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/struts-simple/loader/org/apache/struts/resources/struts-config_1_0.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'file:/C:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/struts-simple/loader/org/apache/struts/resources/web-app_2_2.dtd'
register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'file:/C:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/struts-simple/loader/org/apache/struts/resources/web-app_2_3.dtd'
resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd')
 Resolving to alternate DTD 'file:/C:/Program Files/Apache Software Foundation/Tomcat 5.0/work/Catalina/localhost/struts-simple/loader/org/apache/struts/resources/web-app_2_2.dtd'
Call org.apache.struts.action.ActionServlet.addServletMapping(wizard/java.lang.String,/wizard/java.lang.String)
Call org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.String,/do/*/java.lang.String)
FormSet: language=null  country=null  variant=null
   Form: act2Form
      Field:
            property=   phone
            depends=   required,mask
            Vars:
                  mask=Var: name=mask  value=^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$  jsType=null


      Field:
            property=   zip
            depends=   required,mask
            Vars:
                  mask=Var: name=mask  value=^\d{5}\d*$  jsType=null



   Form: act1Form
      Field:
            property=   integer
            depends=   required,range,integer
            Vars:
                  min=Var: name=min  value=1  jsType=null

                  max=Var: name=max  value=9999  jsType=null


      Field:
            property=   date
            depends=   required,date
            Vars:

      Field:
            property=   email
            depends=   required,mask
            Vars:
                  mask=Var: name=mask  value=^\w+@\w+.\w{3}$  jsType=null



   Form: simpleForm
      Field:
            property=   integer
            depends=   required,range,integer
            Vars:
                  min=Var: name=min  value=1  jsType=null

                  max=Var: name=max  value=9999  jsType=null


      Field:
            property=   date
            depends=   required,date
            Vars:

      Field:
            property=   phone
            depends=   required,mask
            Vars:
                  mask=Var: name=mask  value=^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$  jsType=null


      Field:
            property=   zip
            depends=   required,mask
            Vars:
                  mask=Var: name=mask  value=^\d{5}\d*$  jsType=null


      Field:
            property=   email
            depends=   required,mask
            Vars:
                  mask=Var: name=mask  value=^\w+@\w+.\w{3}$  jsType=null



   Form: nestedForm
      Field:
            property=   values.integer
            depends=   required,range,integer
            Vars:
                  min=Var: name=min  value=1  jsType=null

                  max=Var: name=max  value=9999  jsType=null


      Field:
            property=   values.date
            depends=   required,date
            Vars:

      Field:
            property=   values.phone
            depends=   required,mask
            Vars:
                  mask=Var: name=mask  value=^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$  jsType=null


      Field:
            property=   values.zip
            depends=   required,mask
            Vars:
                  mask=Var: name=mask  value=^\d{5}\d*$  jsType=null


      Field:
            property=   values.email
            depends=   required,mask
            Vars:
                  mask=Var: name=mask  value=^\w+@\w+.\w{3}$  jsType=null




Add Global Constant: phone,^\(?(\d{3})\)?[-| ]?(\d{3})[-| ]?(\d{4})$
Add Global Constant: zip,^\d{5}\d*$
Add ValidatorAction: required,com.wintecinc.struts.validation.Validator
Add ValidatorAction: mask,com.wintecinc.struts.validation.Validator
Add ValidatorAction: integer,com.wintecinc.struts.validation.Validator
Add ValidatorAction: date,com.wintecinc.struts.validation.Validator
Add ValidatorAction: range,com.wintecinc.struts.validation.Validator
Add ValidatorAction: email,com.wintecinc.struts.validation.Validator
Apr 19, 2004 9:18:42 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /app from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\app
Apr 19, 2004 9:18:42 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\app\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Apr 19, 2004 9:18:42 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 2 column 6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
      at org.apache.xerces.impl.XMLScanner.scanPIData(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknown Source)
      at org.apache.xerces.impl.XMLScanner.scanPI(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digester.java:1548)
      at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:301)
      at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:643)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:253)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4224)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
      at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
      at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
      at org.apache.catalina.core.StandardService.start(StandardService.java:519)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Apr 19, 2004 9:18:42 AM org.apache.catalina.startup.ContextConfig applicationConfig
SEVERE: Parse error in application web.xml
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digester.java:1548)
      at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:301)
      at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:643)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:253)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4224)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
      at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
      at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
      at org.apache.catalina.core.StandardService.start(StandardService.java:519)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Apr 19, 2004 9:18:42 AM org.apache.catalina.startup.ContextConfig applicationConfig
SEVERE: Occurred at line 2 column 6
Apr 19, 2004 9:18:42 AM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Apr 19, 2004 9:18:42 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Apr 19, 2004 9:18:42 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Apr 19, 2004 9:18:42 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /ch02app from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ch02app
Apr 19, 2004 9:18:42 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ch02app\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Apr 19, 2004 9:18:42 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 2 column 6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
      at org.apache.xerces.impl.XMLScanner.scanPIData(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknown Source)
      at org.apache.xerces.impl.XMLScanner.scanPI(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digester.java:1548)
      at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:301)
      at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:643)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:253)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4224)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
      at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
      at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
      at org.apache.catalina.core.StandardService.start(StandardService.java:519)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Apr 19, 2004 9:18:42 AM org.apache.catalina.startup.ContextConfig applicationConfig
SEVERE: Parse error in application web.xml
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digester.java:1548)
      at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:301)
      at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:643)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:253)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4224)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
      at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
      at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:727)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
      at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
      at org.apache.catalina.core.StandardService.start(StandardService.java:519)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:598)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Apr 19, 2004 9:18:42 AM org.apache.catalina.startup.ContextConfig applicationConfig
SEVERE: Occurred at line 2 column 6
Apr 19, 2004 9:18:42 AM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Apr 19, 2004 9:18:42 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Apr 19, 2004 9:18:42 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Apr 19, 2004 9:18:42 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /jsp-examples from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\jsp-examples
Apr 19, 2004 9:18:43 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path  from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT
Apr 19, 2004 9:18:43 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /servlets-examples from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\servlets-examples
Apr 19, 2004 9:18:43 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /tomcat-docs from URL file:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\tomcat-docs
Apr 19, 2004 9:18:43 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Apr 19, 2004 9:18:44 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Apr 19, 2004 9:18:44 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/80  config=C:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\jk2.properties
Apr 19, 2004 9:18:44 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 11216 ms
0
 
LVL 4

Expert Comment

by:john-at-7fff
ID: 10860027
Post your complete web.xml.

It should look a lot like this (maybe you have <xxml . . .> or some such to start):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>

<web-app>

  <servlet>
    <servlet-name>SimpleServlet</servlet-name>
    <servlet-class>chapter2.SimpleServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>SimpleServlet</servlet-name>
    <url-pattern>/simple</url-pattern>
  </servlet-mapping>
 
</web-app>

I'll be out for a day; I'm sure someone else will help you to the finish line in the next few hours.
0
 

Author Comment

by:jbaisden
ID: 10860138

here is my web.xml


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>

<web-app>
 <display-name>Example</display-name>
<servlet>
<servlet-name>SimpleServlet</servlet-name>
<servlet-class>chapter2.SimpleServlet </servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>SimpleServlet</servlet-name>
<url-pattern>/simple</url-pattern>
</servlet-mapping>

</web-app>

0
 

Author Comment

by:jbaisden
ID: 10864099
Despite the numerous severe failures that occur during the Tomcat 5.0.19 startup, when I goto
http://localhost:8080/ i can run the jsp and servlet examples. I really have no clue as to what I'm doing wrong. What am I missing?

Any help would be appreciated.


0
 
LVL 4

Accepted Solution

by:
john-at-7fff earned 175 total points
ID: 10874648
Just going over the log again, I notice this:

INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ch02app\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

So delete webapps/ch02app/WEB-INF/lib/servlet-api.jar

Double-check: are there any other .xml files (besides web.xml) under webapps/ch02app, anywhere in the tree?

Finally: If you're still stuck, ZIP up the directory tree at ch02app and e-mail it to xertroyt@yahho.com and I'll take a look at it.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now