Why ask on every list? For those of us who are on several lists, this just
turns up as rubbish. Can you ask on one list first and then try the others
IF YOU DONT GET an answer?
chanoch
----- Original Message -----
From: "Edward" <zhangsc@n...>
To: "Professional Java" <pro_java@p...>
Sent: Friday, May 31, 2002 9:29 AM
Subject: [pro_java] Why my web.xml is error in servlet?
> I have a question about servlet's web.xml file,I put my files into follows
directories:
> D:\Apache Tomcat 4.0\webapps\login\WEB-INF\classes\GetUserIdentity.class
> D:\Apache Tomcat 4.0\webapps\login\WEB-INF\web.xml
> D:\Apache Tomcat 4.0\webapps\login\servlets\index.html
>
> My web.xml is follows:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> <web-app>
> <session-config>
> <session-timeout>
> 30
> </session-timeout>
> </session-config>
> <welcome-file-list>
> <welcome-file>
> index.html
> </welcome-file>
> </welcome-file-list>
> <servlet>
> <servlet-name>
> GetUserIdentity
> </servlet-name>
> <servlet-class>
> GetUserIdentity
> </servlet-class>
> </servlet>
> </web-app> //---------Here is 24 line---------
>
> When I start Tomcat4.0,I got error:
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.1
> PARSE error at line 24 column 12
> org.xml.sax.SAXParseException: The content of element type "web-app" must
match
>
"(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-
>
mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,w
elco
>
me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-c
onst
> raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.1
>
> I don't know why my web.xml is error,how to correct it?
> Thanks!
> Edward
>