Hi, I hope ui.html is a directory and not a file, because otherwise your Context docBase is invalid.
Specify a DTD (or schema) for your web.xml, and make sure it's valid according to that DTD (or schema). For example, in the 2.3 servlet spec DTD, welcome-file-list can only come after servlets and servlet mappings. You will need to define the servlet as a servlet tag, map it, and put a welcome file entry for the servlet mapping. Yoav Shapira Millennium Research Informatics >-----Original Message----- >From: Brad Taylor [mailto:[EMAIL PROTECTED] >Sent: Wednesday, September 01, 2004 3:17 PM >To: [EMAIL PROTECTED] >Subject: How do I make my servlet the welcome page > >I am running tomcat 5.0.9. I currently enter a url like >http://localhost:8080/myapp. This causes a "redirect" page to be >briefly displayed followed by my servlet getting invoked and serving the >"real" page. I would like to bypass this redirect, but can not seem to >get it to work. I have tried changing my welcome-file-list to mypage.do >and I have tried creating a servlet-mapping specifying index.html. > >Content of ....\conf\Catalina\localhost\myapp.xml > ><Context path="/myapp" > docBase="C:\eclipse\workspace\com.mycom\myapp\ui.html" > debug="0" > privileged="true"/> > >Index.html exists in the above directory > >This is the essential contents of WEB-INF\web.xm in above directory > ><?xml version="1.0" encoding="ISO-8859-1" ?> ><web-app> > <display-name>Myapp</display-name> > <description>Myapp desc</description> > <welcome-file-list>index.html</welcome-file-list> > <!-- > Define myservlet > --> > <servlet> > <servlet-name>myapp</servlet-name> > <servlet-class>com.myapp.ui.MyServlet</servlet-class> > <load-on-startup>1</load-on-startup> > </servlet> > <servlet-mapping> > <servlet-name>myapp</servlet-name> > <url-pattern>*.do</url-pattern> > </servlet-mapping> > >Contents of index.html > ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ><html> > <head> > <meta http-equiv="refresh" content="0;url=mypage.do"/> > <title>My page</title> > </head> > <body> > Redirecting to actual navigation page > </body> ></html> > >Any help appreciated > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
