You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by AC <an...@portalwave.com> on 2001/03/01 03:14:02 UTC
alias servlet in Tomcat
Hi,
I am using Tomcat 3.1 and I need to shorten URL such that if I type in
<http://servername:port/>, it will get to the login servlet page. Basically,
I
have a servlet like com.abc.login and I was able to alias it to
<http://servername:port/login> but I can't figure out a way to alias it
further such that even "login" following the servername is not necessary.
The way I mapped the login servlet is by adding the following to web.xml,
<servlet>
<servlet-name>
sl
</servlet-name>
<servlet-class>
com.abc.login
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>
sl
</servlet-name>
<url-pattern>
/login
</url-pattern>
</servlet-mapping>
Does anyone know how to configure it so all I need is
<http://servername:port/>?
Thank you!
Re: alias servlet in Tomcat
Posted by "Brett W. McCoy" <bm...@chapelperilous.net>.
On Wed, 28 Feb 2001, AC wrote:
> Does anyone know how to configure it so all I need is
> <http://servername:port/>?
We solved this problem by having an index.jsp in the root directory that
does a little bit of validation (checking for cookie support, etc.), then
redirects to the real login servlet.
-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
Once a word has been allowed to escape, it cannot be recalled.
-- Quintus Horatius Flaccus (Horace)