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 <[EMAIL PROTECTED]> > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -------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)
