tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rune Elvemo <relv...@grm.hia.no>
Subject servlet related problem
Date Tue, 12 Feb 2002 22:12:08 GMT
As I understands it, all your classes/servlets are supposed to be put in
<mydir>/WEB-INF/classes/ .

I found out that in order for <mydir> to be "seen" by the tomcat server I
had to add it to the conf/server.xml file:
        <Context path="/klient" docBase="klient"
         debug="0" reloadable="true"/>

It also seemed like I had to make a web.xml file in /klient/WEB-INF :
<?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/dtd/web-app_2_3.dtd">

<web-app>
   <!-- Define the servlets -->

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

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

I tried with/without the <servlet-mapping> part, but with no success, I
get the same message : HTTP Status 404 (The requested resouce is not available)

The actual url I tried was http://localhost:8080/klient/servlet/SimpleServlet
, also the same but without the "servlet" part (when I didn't have the
servlet-mapping part.

With the servlet-mapping it was the same but with SimpleServlet replaced
with "simple".

Obviously I did something wrong here, but I'm not sure what.

btw: the "klient" dir is placed under the $CATALINA_HOME/webapps/ dir.

I would be very grateful if someone out there would be so kind and help me.

Thank you very much in advance!

---
Rune Elvemo	---	Octagon / Digital Minds
relvemo@grm.hia.no
http://home.c2i.net/elvemo


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message