OK, figured it out.

I changed the Character Set to

<?xml version="1.0" encoding="ISO-8859-1"?>

Instead of 

<?xml version="1.0" encoding="ISO-8851-1" ?>

I figured this out by using the tomcat.exe to start the service and saw the
dump message when it was trying to parse my xml file.

Is this not the valid way of coding this encoding?

-----Original Message-----
From: Kurt L Harless [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 05, 2008 10:14 PM
To: users@tomcat.apache.org
Subject: Newbie: Question about first Servlet

Greetings,

 

Specifics:

Window XP

TomCat 5.5

Java 1.6

 

Created webapp dirs under;

 

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\

 

Called ch1\WEB-INF\classes

 

In WEB-INF at created a web.xml file with the following contents;

 

<?xml version="1.0" encoding="ISO-8851-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">

            <servlet>

                        <servlet-name>Chapter1 Servlet</servlet-name>

                        <servlet-class>Ch1Servlet</servlet-class>

            </servlet>

            <servlet-mapping>

                        <servlet-name>Chapter1 Servlet</servlet-name>

                        <url-pattern>/Serv1</url-pattern>

            </servlet-mapping>

</web-app>

 

In the classes subdir to WEB-INF I compile the following java src
successfully

 

import javax.servlet.*;

import javax.servlet.http.*;

import java.io.*;

 

public class Ch1Servlet extends HttpServlet

{

            public void doGet(HttpServletRequest request,
HttpServletResponse response)

            throws IOException 

            {

                        PrintWriter out = response.getWriter();

                        java.util.Date today = new java.util.Date();

                        out.println("<html> " +

                                        "<body>" +

                                        "<h1 align=center>HF\'s Chapter1
Server</h1>" +

                                        "<br>" + today + 

                                        "</body>" + 

                                        "</html>");

            }

}

 

I installed TomCat 5.5 as a windows server and can successfully launch
http://localhost:8080 <http://localhost:8080/>  and get the TomCat initial
page

Under this page I can select the link for TomCat manager and see under
applications an entry for /ch1

 

However, when I try to run  <http://localhost:8080/ch1/Serv1>
http://localhost:8080/ch1/Serv1 I get HTTP Status 404 - /ch1/Serv1

 

Anyone want to help a newbie?

 

 



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to