tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milt Epstein <mepst...@uiuc.edu>
Subject Re: tomcat-4.0.4/Apache-1.3.26 and mod_jk
Date Mon, 09 Sep 2002 16:07:13 GMT
On Tue, 10 Sep 2002, damar thapa wrote:

> Hi,
>
> I would like to add one more query here.
>
> I created one servlet called AddDispServlet.class, which I copied to
> /webapps/examples/WEB-INF/classes directory.
>
> And to deploy that, I added the following lines in /WEB-INF/web.xml file:
>
>     <servlet>
>         <servlet-name>AddDispServlet</servlet-name>
>         <servlet-class>AddDispServlet</servlet-class>
>     </servlet>
>
>     <servlet-mapping>
>         <servlet-name>AddDispServlet</servlet-name>
>         <url-pattern>AddDispServlet</url-pattern>
>     </servlet-mapping>
>
> Reran apache, and tomcat, and tried to access that servlet with

Note that you shouldn't need to restart Apache with such a change
(i.e. something that's within an already existing context).

> "localhost:8080/examples/servlet/AddDispServlet", it did not work.

Note that when you specify the port 8080, you're calling Tomcat as a
standalone web server, and not going through Apache at all.

> After updating web.xml file with the above lines, I even cannot run
> "localhost:8080/examples".
>
> Have I missed some points in deploying the servlet? Any pointers would
> be highly appreciated.
[ ... ]

One very important thing to do when things aren't working is to look
at the logs -- both Apache's and Tomcats's.  Do you see anything there
related to the above?

If you say that examples no longer works at all, the first thing that
I think of is that you messed up your web.xml so that it's no longer
compliant with the DTD, and Tomcat can't parse it -- an error related
to this will show up in Tomcat's logs (don't recall which one).  Note
that things like the order of tags in the web.xml is specified by the
DTD, so by making changes/additions  to it, you might have gotten
things out of the required order.  The spec mentions the required
order.

Another question I think of is, is AddDispServlet in a package.  The
way you have it set up above should work if it isn't.  But either way,
this should only affect whether AddDispServlet works, not examples
overall.

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message