tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Qian" <David.Q...@accrue.com>
Subject RE: Problem with using servlet in Tomcat
Date Sat, 01 Apr 2000 00:00:58 GMT
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


Mime
View raw message