calling servlet as hello instead of /servlet/hello ?

Hi,

I am using tomcat 4.1.31. To call a servlet which is in abc package, I have to give url as ..../servlet/hello where I have done the following in web.xml ;

<servlet>

<servlet-name>hello</servlet-name>

<servlet-class>abc.hello</servlet-class>

</servlet>

now how can I avoid the /servlet also so that I am able to access it as;

localhost/hello

instead of

localhost/servlet/hello

Thanks.

[494 byte] By [renumehta1a] at [2007-11-26 16:00:53]
# 1

You should seriously consider upgrading Tomcat. 5.5 is as low as I would go nowadays (maybe 5.0). It appears you are using the 'invoker' Servlet or have a webapp folder named 'servlet'. You have to set-up the 'root' context. Here is a link on how to do so.

http://www.moreservlets.com/Using-Tomcat-4.html

Best of luck.

- Saish

Saisha at 2007-7-8 22:22:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...