tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fillon, Jérôme" <>
Subject Servlet Chaining a solution ?
Date Fri, 07 Apr 2000 12:28:02 GMT
Hi all,

I had some troubles with servlet chaining these days with Tomcat. My code
worked perfectly well with the web browser included in VAJ (Apache modified
by IBM i think).

I used the *classic* code :

	RequestDispatcher otherServlet =
	otherServlet.forward(req, resp);

The main problem was what to write in the MyURL string...

I have created another application in Tomcat, i modified the server.xml for
Tomcat and added a sub directory called myproject.

        <Context path="/myproject" docBase="webapps/myproject" debug="0"
reloadable="true" > 

I added that line in the file server.xml in the conf directory.

Then i can called my servlets which are in the directory Web-Inf/classes
under webapps/myproject. You will need to create a web.xml file. Mine is
minimal :

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

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"


In my browser i load my servlet with to redirect to
MyOtherServlet i need to use
MyURL="/servlet/package.MyOtherServlet" and not

Simple ?! :) (btw Absolute URL don`t seem to work...)

Hope it helps someone.


I`m using Tomcat for 2 days and i have ported my EJBs from
WebSphere/IBMApache to Jonas/Tomcat easily. The configuration of Tomcat and
Jonas was so easy... i`m really impressed.
Why companies always want to buy a brand name with bad support... they
should definetly fund those projects.

View raw message