As far as I know, servlets *must* be put in WEB-INF/classes in order to be
executed by the servlet engine. However, nothing is stopping you from
creating a nice alias for your servlet.

For instance, consider you have a servlet called Foo
(WEB-INF/classes/Foo.class).
You could then create an alias and give this servlet the name 'foo.html'
for example, so instead of having to type /servlet/Foo, you could type
just /foo.html.

This is done in the file WEB-INF/web.xml. For more information about this
file, please read Sun's specifikation.

[ Matthias Carlsson ]
[ Programmer (Java, CGI/Perl, Javascript, HTML) ] [ Web Designer ]
[ E-Mail : [EMAIL PROTECTED] ] [ ICQ: 1430647 ]

> -----Ursprungligt meddelande-----
> Fr�n: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]F�r Dennis Sasinka
> Skickat: den 25 september 2000 20:23
> Till: [EMAIL PROTECTED]
> �mne: Servlets through url
>
>
> Is it possible to call servlets through urls and have them in directories
> out side of the directory that the Web Server expects servlets to be?  In
> other words, I'm using Tomcat and I want to replace my jsp's with servlets
> but be able to call them like I do the jsp's and place them in directories
> with the html/applets.
>
> dennis
>
> __________________________________________________________________
> _________
> 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

Reply via email to