Thank you João,
I have found a way that works, too.
I use Apache and there you can use mod_rewrite with some regular expressions
to replace /telefon/telefon.web.* with /telefon/servlet/telefon.web.*
Your way works fine, but I need to give an alias for every servlet in the
package.
bye
-----Ursprüngliche Nachricht-----
Von: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]Im Auftrag von
João Robertson Kramer Santana
Gesendet: Mittwoch, 14. Februar 2001 11:51
An: [EMAIL PROTECTED]
Betreff: Re: tomcat mapping
I guess u have to modify your the WEB.XML file. It´s in the WEB-INF
directory.
U can give an alias to each servlet. For example , in my system
there is a servlet called 'SigaAviso.class' (it's inside a package called
'Siga') located in the WEB-INF\CLASSES directory. I changed the WEB.XML file
and added the following lines :
-----------------------
<servlet>
<servlet-name>SIGA_ALIAS01</servlet-name>
<servlet-class>siga.SigaAviso</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SIGA_ALIAS01</servlet-name>
<url-pattern>SigaAviso</url-pattern>
</servlet-mapping>
---------------------
Now I can call it with http://localhost:8080/mysitename/SigaAviso
instead of http://localhost:8080/mysitename/servlet/Siga.SigaAviso
bye
jk
Date: Tue, 13 Feb 2001 14:16:58 +0100
From: Stefan Kramp <[EMAIL PROTECTED]>
Subject: tomcat mapping
Hello,
I have tomcat up and running.
I want to map an application to URL: http://<host>/telefon/telefon.web.start
It is working if I do http://<host>/telefon/servlet/telefon.web.start
My tomcat is in /opt/tomcat
My application is in /opt/tomcat/webapps/telefon/web
I need the URL without "servlet".
Is there any way to configure tomcat to accept the URL without servlet in
it?
Thanks in advance
Stefan Kramp
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html