tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Bothma" <>
Subject RE: servlets don't work in own webapp (finshed writing this time)
Date Sat, 15 Feb 2003 11:33:53 GMT

Look at the web.xml for /examples. You'll see that you need to map your
servlet, etc.

Looks something like this:



Hope this help.


-----Original Message-----
From: Jaap Duursma []
Sent: 15 February 2003 13:23
Subject: servlets don't work in own webapp (finshed writing this time)

(sorry for the first mail, i exedently pressed control-s, this time finished
writing it)

status :
succesfully installed Tomcat 4.1.18, can access the webserver tru
http://localhost:8180/ and the examples also work.

problem :
servlets don't work in my own webapp, jsp's do work.

what I did :
created own directory structure in the webapp folder (next to examples) :
with files :
webapps/pso/WEB-INF/classes/ (and .class)

in conf/server.xml added the line :
<Context path="/pso" docBase="pso" debug="0" reloadable="true">

also copied the HelloWorld to the webapps/examples/WEB-INF/classes directory
where I can access it succesfull at :

but when I go to http://localhost:8180/pso/servlets/HelloWorld it doesn't
work and gives me a 404 error, resource is not available.

http://localhost:8180/pso/Hello.jsp does work. I tried everything, looked on
the net and googled but no luck yet. Could really use some help.

also tried to put the following web.xml in webapps/pso/WEB-INF/

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

Didn't make any difference.

Probably do something wrong or overlooking something, but i cannot seem to
find what.
any help is appriciated.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message