I can give you the same answer as I gave to an our or two before:

I think you forgot the web.xml file which contains the mapping between the
URL and the servlet class file.
In web.xml which must be situated in WEB-INF directory, for each servlet
there must be a servlet-mapping entry:
<servlet>
  <servlet-name>MyServlet</servlet-name>
 
<servlet-class>subdirectory1.subdirectory2.subdirectory3.servlet1.class</ser
vlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>MyServlet</servlet-name>
  <url-pattern>/pathie/doMyServlet</url-pattern>
</servlet-mapping> 

Now calling http://localhost:8080/MyWebapp/pathie/doMyServlet will start the
servlet1.class.
The servlet1.class must be situated in
WEB-INF/classes/subdirectory1/subdirectory2/subdirectory3/ or in a jar in
the WEB-INF/lib directory.

Maybe you should read some documentation about a .war file (which is a
.jar), or open one of the examples delivered together with Tomcat.


-----Original Message-----
From: Donald Lee [mailto:[EMAIL PROTECTED]]
Sent: donderdag 17 januari 2002 12:27
To: [EMAIL PROTECTED]
Subject: Just trying to make some sense out of all this tomcat(newbie)


Ok, if anybody can explain in plain english why this is the way it is.  
while trying to download and install a servlet and being very unsuccessful, 
I started investigating the example servlets.  I went to the simplest one 
called HelloWorldExample.
It appears to be working, when I look in the browser address it's set to
http://lnxwebsvr:8080/examples/servlet/HelloWorldExample.
when I look at my directory structure.
/var/tomcat4/webapps/examples/WEB-INF/classes/HelloWorldExample.class
where is it defined in tomcat that "servlet" is to replace the actual path 
"WEB-INF/classes"?
I think this may be related to why my newly installed servlet will not run.
Thanks


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to