aspose file tools*
The moose likes Servlets and the fly likes configuring servlets on tomcat4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

configuring servlets on tomcat4

prasad hagargi
Ranch Hand

Joined: Oct 21, 2002
Posts: 36
hi,
Can anybody guide me in configuring servlets in a new context other than the examples context ,
on tomcat4.
when i try to invoke a servlet, file not found
exception is occurring.
the structure of the web.xml is like this
<servlet>
<servlet-name>HelloWorldExample</ervlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorldExample</servlet-name>
<url-pattern>/HelloWorldExample</url-pattern>
</servlet-mapping>
prasad hagargi
Ranch Hand

Joined: Oct 21, 2002
Posts: 36
the servlet mapping for "invoker" servlet in web.xml in tomcat/conf directory is uncommented
and should i add a new context tag in the server.xml,if yes where and what should be its syntax
Dinesh Ramaswamy
Greenhorn

Joined: Oct 05, 2001
Posts: 13
If u give the url as
"http://localhost:8080/myWkgFolder/servlet/HelloWorldExample",
then the <servlet> tag is enough.
There is no need for <servlet-mapping>.
Important thing is we must give in the url :
servlet/HelloWorldExample.
prasad hagargi
Ranch Hand

Joined: Oct 21, 2002
Posts: 36
i have tried that
but it still gives me
description The requested resource (/test/servlet/HelloWorldExample) is not available.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Please don't cross post

http://www.coderanch.com/t/82167/Tomcat/configuring-servlets-tomcat

And also.. *don't* use the /servlet/* mapping.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: configuring servlets on tomcat4