You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Qian <Da...@accrue.com> on 2000/04/01 02:00:58 UTC
RE: Problem with using servlet in Tomcat
Thanks Steven.
It works !
In order to customerize the directory, I have two questions.
1. If I add a directory like hello after \webApps\examples\Web-inf\classes,
so it
looks like:
\webApps\examples\Web-inf\classes\hello
I have a helloWorld servlet. I can invoke the servlet in the following
way:
http://localhost/examples/servlet/hello.helloWorld This is not
conventional.
I can not invoke it as the conventional way as :
http://localhost/examples/servlet/hello/helloWorld
Any suggestion how to configure it so that it can be invoked in the
conventional way.
2. Can I put the servlets anywhere I want ?
How do I have to configure it in the server.xml ? Can I configure it like
:
path="/servlet" docBase="anyWhere/servlets"
Any information will be very appreciated !
David
-----Original Message-----
From: Steven Maring [mailto:Steven.Maring@trcinc.com]
Sent: Friday, March 31, 2000 1:02 PM
To: 'David Qian '
Subject: RE: Problem with using servlet in Tomcat
You got the location right. Did you try
http://localhost/examples/servlet/myServlet
-----Original Message-----
From: David Qian
To: tomcat-user@jakarta.apache.org
Sent: 3/31/00 2:32 PM
Subject: Problem with using servlet in Tomcat
Hello,
I have the following installation:
Window NT + Apache 1.3.12 + Tomcat 3.1M1
The jsp and javabeans are working successfully.
I put the servlets in the directory \webApps\examples\Web-inf\classes.
The server.xml is configured to have the following context mapping as
installed:
path="examples" docBase="webApps/exmaples"
I try to invoke the servlets using
http://localhost/examples/myServlet
It shows blank in the browser, no error message.
I am able to invoke two default servlets, servletToJsp and snoop which
are both defined in the web.xml. If I configure the myServlet in
web.xml.
It still does not work.
My questions are as follows:
Where are the proper locations for servlets ?
Any configuration change or mapping to the servlet working ?
Should they defined in the web.xml file ?
Any help will be very appreciated !
Thanks !
David
------------------------------------------------------------------------
--
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org