tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alla Winter" <>
Subject can not set up HelloWorldExample servlet to be called from a different directory
Date Fri, 08 Sep 2006 16:34:47 GMT

I think I am trying to do a very simple thing - to deploy my application to
TOMCAT5.5.17.  I am using j2sdk1.4.2_12, and I did install the computability
pack.  Windows 2000

I was able to start tomcat and run HelloWorldExample servlet, but I am not
able to access my application in the directory cobra_source 


To avoid any questions about my software, all I did is created another
directory under webbapps , cobra_source, and put in there
HelloWorldExample.class.  I also copied the web.xml file


Then I tried : http://localhost:8080/cobra_source/servlet/HelloWorldExample


And here it is the answer:
HTTP Status 404 - /cobra_source/servlet/HelloWorldExample


What I am doing wrong?


Thanks for your help in advance


Here are my setups : 

CLASSPATH ( environment variable)

C:\Documents and Settings\Alla>echo %CLASSPATH%




directory structure

Directory of C:\apache-tomcat-5.5.17\webapps\cobra_source\WEB-IN


9/07/2006  03:41p      <DIR>          .

9/07/2006  03:41p      <DIR>          ..

9/07/2006  03:36p      <DIR>          classes

9/07/2006  03:39p               3,356 cobra_web.xml

8/29/2006  04:53p      <DIR>          lib

9/07/2006  04:37p               1,198 web.xml

              2 File(s)          4,554 bytes

              4 Dir(s)  17,212,928,000 bytes free



Directory of C:\apache-tomcat-5.5.17\webapps\cobra_source\WEB-INF\classes


09/07/2006  03:36p      <DIR>          .

09/07/2006  03:36p      <DIR>          ..

09/06/2006  03:36p      <DIR>          com

06/28/2006  11:09a               3,609

04/14/2006  02:09p               2,056 HelloWorldExample.class

05/17/2004  02:00p                 538

               3 File(s)          6,203 bytes

               3 Dir(s)  17,212,907,520 bytes free


web.xml file

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


  Unless required by applicable law or agreed to in writing, software

  distributed under the License is distributed on an "AS IS" BASIS,


  See the License for the specific language governing permissions and

  limitations under the License.



<!DOCTYPE web-app

    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"





    <display-name>Servlet 2.4 Examples</display-name>


      Servlet 2.4 Examples.







    <!-- Define servlets that are included in the example application -->










  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message