Wrox Home  
Search P2P Archive for: Go

  Return to Index  

j2ee thread: tomcat web.xml error


Message #1 by "Rudi Doku" <rudidoku@h...> on Wed, 9 Jan 2002 04:15:28
Hey Rudi:

Believe it or not, the deployment descriptor requires a special order for 
its attributes.  Your error message gives the order:

icon
display-name
description
distributable
context-param
servlet
servlet-mapping
session-config
mime-mapping
welcome-file-list
error-page
taglib
resource-ref
security-constraint
login-config
security-role
env-entry
ejb-ref

So...try putting your welcome file entries AFTER the servlet definitions.

- Andy
> Hello,
> 
> I get the following eror when I start tomcat :
>  
>  
>  
> Exception initializing TldLocationsCache: XML parsing error on file /WEB-
> INF/web.xml: (line 21, col 12): The content of element type "web-app" 
must 
> match "(icon?,display-name?,description?,distributable?,context-
> param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-
> file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-
> config?,security-role*,env-entry*,ejb-ref*)".
>  
>  
>  
> This is what my web.xml file looks like.
>  
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
> 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> <web-app>
>  
>   <welcome-file-list>
>     <welcome-file>/JSP/login.jsp</welcome-file>
>   </welcome-file-list>    
> 
>   <servlet>
>     <servlet-name>
>       loginServlet
>     </servlet-name>
>     <servlet-class>
>       com.doku.rudi.loginServlet
>     </servlet-class>                   
>   </servlet>
> 
>   <servlet-mapping>
>     <servlet-name>
>       loginServlet
>     </servlet-name>
>     <url-pattern>
>       /loginServlet
>     </url-pattern>
>   </servlet-mapping>
> </web-app>
>  
>  
> I would really appreciate it if anyone could help me resolve this 
problem.
>  
> Cheers,
>  
> Rudi
> 

  Return to Index