aspose file tools*
The moose likes Servlets and the fly likes servlet alias in context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet alias in context" Watch "servlet alias in context" New topic
Author

servlet alias in context

TECH ZALA
Greenhorn

Joined: May 03, 2004
Posts: 5
hay friends, i m using tomcat 4 on win 2k system.
i have created context in tomcat named world.
i mapped servlet name helloworld in it such that when i hit
http://localhost:8080/world/servlet/helloworld my servlet runs.
is it possible to give an alias name to my servlet "helloworld" to
"helloweb" ???
what modification i required in web.xml ??? or other ???
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

"TECH ZALA"- This is your second notice.
Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
Thanks! and welcome to the JavaRanch!
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
Use following tags in Web.xml
<servlet>
<servlet-name>helloworld</servlet-name>
<servlet-class>test.HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>helloword</servlet-name>
<url-pattern>/servlet/helloweb</url-pattern>
</servlet-mapping>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet alias in context
 
Similar Threads
problem in running servlet
Error 500- Internal servlet error
straing servlet URL
Installing servlet
Simple Tapestry hello world example fails