tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Moore" <tmo...@blackboard.com>
Subject RE: Error with THIS web.xml file:
Date Tue, 10 Dec 2002 00:05:54 GMT
According to the official DTD, the order of elements in web.xml matters.
If you move your welcome-file-list after the servlet-mapping, it should
work ok.  You can find the correct order by reading the DTD at the URL
in the DOCTYPE, but here it is for convenience:

<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
context-param*, filter*, filter-mapping*, listener*, servlet*,
servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
error-page*, taglib*, resource-env-ref*, resource-ref*,
security-constraint*,
login-config?, security-role*, env-entry*, ejb-ref*,  ejb-local-ref*)>

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -----Original Message-----
> From: Johnson, Garrett [mailto:JohnsonG@cbsnews.com] 
> Sent: Monday, December 09, 2002 7:03 PM
> To: 'Tomcat Users List'
> Subject: Error with THIS web.xml file:
> 
> 
> This is my web.xml file:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>     "http://java.sun.com/dtd/web-app_2_3.dtd">
> 
> <web-app>
> 
> 	<display-name>Carpool Database</display-name>
> 	<description>Utility to mitigate the impact of the 
> impending transit strike</description>
> 	
> 	<welcome-file-list>
> 		<welcome-file>start.jsp</welcome-file>
> 		<welcome-file>start.html</welcome-file>
> 		<welcome-file>index.html</welcome-file>
> 		<welcome-file>index.htm</welcome-file>
> 		<welcome-file>index.jsp</welcome-file>
> 	</welcome-file-list>
> 	
> 	<servlet>
> 		<servlet-name>DisplayServlet</servlet-name>
> 		<display-name>DisplayServlet</display-name>
> 		<servlet-class>DisplayServlet</servlet-class>
> 	</servlet>
> 	
> 	<servlet-mapping>
> 		<servlet-name>DisplayServlet</servlet-name>
> 		<url-pattern>/DisplayServlet</url-pattern>
> 	</servlet-mapping>
> 
> </web-app>
> 
> For the life of me, I can't figure out why there's a problem, 
> but Tomcat refuses to parse this!  I keeps complaining about 
> line 20, column 11, which is where my first <servlet> tag 
> starts.  Is there something stupid I'm missing here?

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message