tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Sabroff" <Mike.Sabr...@cygnusb2b.com>
Subject RE: Tomcat 5.0 HTTP 404 with hello.class
Date Tue, 03 Jan 2006 18:41:47 GMT
Try changing you mapping slightly ... this is how I do it and it works

<servlet-mapping>
        <servlet-name>Hello</servlet-name>
        <url-pattern>/hello/*</url-pattern>
    </servlet-mapping>

Mike Sabroff<servlet-mapping>
Web Services Developer
mike.sabroff@cygnusb2b.com
920-568-8379 
-----Original Message-----
From: White-Home.com [mailto:mike@white-home.com] 
Sent: Monday, January 02, 2006 8:57 PM
To: users@tomcat.apache.org
Subject: Tomcat 5.0 HTTP 404 with hello.class

As I understand it I can save Hello.class as
/usr/share/tomcat5/webapps/hello/WEB-INF/classes/com/hello/Hello.class
and address is as http://localhost:8080/hello/Hello

This results in a HTTP 404 error message.

Background....

I am running Linux FC4 and Tomcat 5.0.30

I have a hello.jsp in the /usr/share/tomcat5/webapps/hello directory
that works with http://localhost:8080/hello/hello.jsp.

I have a hello.xml in the /usr/share/tomcat5/conf/Catalina/localhost
directory pointing to the hello directory.

I restart tomcat with each update.

I have a web.xml file in the /usr/share/tomcat5/webapps/hello/WEB-INF
directory with the following:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  Copyright 2004 The Apache Software Foundation

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<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">


<!-- JSPC servlet mappings start -->

    <servlet>
        <servlet-name>Hello</servlet-name>
        <servlet-class>com.hello.Hello</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>Hello</servlet-name>
        <url-pattern>/hello</url-pattern>
    </servlet-mapping>

<!-- JSPC servlet mappings end -->

</web-app>

I have not been able to detect an error, this test is really simple.  I
build the class without errors and copy it into the directory.  The
group is set to tomcat.

Any help would be appreciated.

Mike
mike@white-home.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message