Servlet 2.4 (implemented by Tomcat 5) allows you to use a servlet as a welcome file. If you're
using Servlet 2.3, here is a trick:
- Create a JSP page that forwards to the servlet.
- Specify the JSP page as the welcome-file.
budi.
-------Original Message-------
> From: SH Solutions <info@sh-solutions.de>
> Subject: Servlet as Welcome File doesn't work
> Sent: 01 Dec 2003 23:58:51
>
> Hello.
>
> I'm using tomcat 4.1.29 on debian and I have the following problem:
> I need to get "/" handled by my Servlet "myPackage.Root",
but I do not want
> to change the mapping of ordinary files.
> Just as a welcome file would, but welcome-file does not apply to servlets,
> right?
>
> My solutions so far is to map "/" to my servlet an map any
other folder with
> distinct context's, what surely is'nt what it was meant to be.
>
> I did search the web and the usenet for a long time, since I assumed not to
> be the first to run into this problem. But I didn't find anything.
> Be aware that I did not enable the jsp-servlet, since I am not using jsps at
> all.
>
> If anyone can help me, I would appreciate it very much.
>
> Thanks,
>
> Steffen
>
>
> PS: No native English speaker here - sorry.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-------Original Message-------
Author of
- How Tomcat Works (sample chapters downloadable from www.brainysoftware.com)
- JavaServer Faces Programming (McGraw-Hill Osborne Media)
- Java for the Web with Servlets, JSP, and EJB (NewRiders)
- Java Web Development with Servlets, JSP, and EJB, Second Edition (Sams Publishing)
|