Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet alias in context

 
TECH ZALA
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic