Re: Adherence to DTD issue
Actually, all servlet declarations must come before any servlet-mapping declarations in the 2.2 DTD as well. It's just that Tomcat 3.2.x didn't enforce this. Tomcat 3.3.x does enforce it by default, but you can turn it off (for backwards compatibility reasons). Shapira, Yoav [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Howdy, Tomcat 4.x uses the Servlet Specification v2.3 DTD. You're using the 2.2 DTD. Switch to 2.3. Among the DTD differences is the fact all servlet declarations must come before any servlet-mapping declarations. You're violating this requirement. Yoav Shapira Millennium ChemInformatics -Original Message- From: Gregory, Carlton [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 1:43 PM To: '[EMAIL PROTECTED]' Subject: Adherence to DTD issue I have altered a web.xml file in my \webapps\test\WEB-INF directory. Upon startup I get a parse error about the structure of the file. I opened the file in XML spy and it said it was an servlet tag unexpected child element. I then downloaded the DTD from sun and printed it out. I am adhering to the DTD from what it seems. ?xml version=1.0 encoding=ISO-8859-1? !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 servlet servlet-name Hello3 /servlet-name servlet-class Hello3 /servlet-class /servlet servlet-mapping servlet-name Hello3 /servlet-name url-pattern /test/Hello3 /url-pattern /servlet-mapping servlet --- IT GIVES THE ERROR AT THIS LINE servlet-name SurveyServlet /servlet-name servlet-class SurveyServlet /servlet-class /servlet servlet-mapping servlet-name SurveyServlet /servlet-name url-pattern /MedSurvey /url-pattern /servlet-mapping Any ideas? Need more info? - 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]
RE: Adherence to DTD issue
Hi All servlet must be before any servlet-mapping Do it like this: web-app servlet servlet-nameHello3/servlet-name servlet-classHello3/servlet-class /servlet servlet servlet-nameSurveyServlet/servlet-name servlet-classSurveyServlet/servlet-class /servlet servlet-mapping servlet-name Hello3 /servlet-name url-pattern /test/Hello3 /url-pattern /servlet-mapping servlet-mapping servlet-name SurveyServlet /servlet-name url-pattern /MedSurvey /url-pattern /servlet-mapping Abid -Original Message- From: Gregory, Carlton [mailto:[EMAIL PROTECTED] Sent: 17. juli 2003 19:43 To: '[EMAIL PROTECTED]' Subject: Adherence to DTD issue I have altered a web.xml file in my \webapps\test\WEB-INF directory. Upon startup I get a parse error about the structure of the file. I opened the file in XML spy and it said it was an servlet tag unexpected child element. I then downloaded the DTD from sun and printed it out. I am adhering to the DTD from what it seems. ?xml version=1.0 encoding=ISO-8859-1? !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 servlet servlet-name Hello3 /servlet-name servlet-class Hello3 /servlet-class /servlet servlet-mapping servlet-name Hello3 /servlet-name url-pattern /test/Hello3 /url-pattern /servlet-mapping servlet --- IT GIVES THE ERROR AT THIS LINE servlet-name SurveyServlet /servlet-name servlet-class SurveyServlet /servlet-class /servlet servlet-mapping servlet-name SurveyServlet /servlet-name url-pattern /MedSurvey /url-pattern /servlet-mapping Any ideas? Need more info? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adherence to DTD issue
Howdy, Tomcat 4.x uses the Servlet Specification v2.3 DTD. You're using the 2.2 DTD. Switch to 2.3. Among the DTD differences is the fact all servlet declarations must come before any servlet-mapping declarations. You're violating this requirement. Yoav Shapira Millennium ChemInformatics -Original Message- From: Gregory, Carlton [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 1:43 PM To: '[EMAIL PROTECTED]' Subject: Adherence to DTD issue I have altered a web.xml file in my \webapps\test\WEB-INF directory. Upon startup I get a parse error about the structure of the file. I opened the file in XML spy and it said it was an servlet tag unexpected child element. I then downloaded the DTD from sun and printed it out. I am adhering to the DTD from what it seems. ?xml version=1.0 encoding=ISO-8859-1? !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 servlet servlet-name Hello3 /servlet-name servlet-class Hello3 /servlet-class /servlet servlet-mapping servlet-name Hello3 /servlet-name url-pattern /test/Hello3 /url-pattern /servlet-mapping servlet --- IT GIVES THE ERROR AT THIS LINE servlet-name SurveyServlet /servlet-name servlet-class SurveyServlet /servlet-class /servlet servlet-mapping servlet-name SurveyServlet /servlet-name url-pattern /MedSurvey /url-pattern /servlet-mapping Any ideas? Need more info? - 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]
Re: Adherence to DTD issue
No, you are *not* adhering to the DTD ;-) Very easy solution: *all* servlet-tags must be first, followed by all servlet-mapping elements Your example would have to changed to: ** servlet servlet-nameHello3/servlet-name servlet-classHello3/servlet-class /servlet servlet servlet-nameSurveyServlet/servlet-name servlet-classSurveyServlet/servlet-class /servlet servlet-mapping servlet-name Hello3 /servlet-name url-pattern /test/Hello3 /url-pattern /servlet-mapping servlet-mapping servlet-name SurveyServlet /servlet-name url-pattern /MedSurvey /url-pattern /servlet-mapping * HTH, Yann I have altered a web.xml file in my \webapps\test\WEB-INF directory. Upon startup I get a parse error about the structure of the file. I opened the file in XML spy and it said it was an servlet tag unexpected child element. I then downloaded the DTD from sun and printed it out. I am adhering to the DTD from what it seems. ?xml version=1.0 encoding=ISO-8859-1? !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 servlet servlet-name Hello3 /servlet-name servlet-class Hello3 /servlet-class /servlet servlet-mapping servlet-name Hello3 /servlet-name url-pattern /test/Hello3 /url-pattern /servlet-mapping servlet --- IT GIVES THE ERROR AT THIS LINE servlet-name SurveyServlet /servlet-name servlet-class SurveyServlet /servlet-class /servlet servlet-mapping servlet-name SurveyServlet /servlet-name url-pattern /MedSurvey /url-pattern /servlet-mapping Any ideas? Need more info? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Adherence to DTD issue-RESOLVED
THANK YOU. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 1:50 PM To: Tomcat Users List Subject: RE: Adherence to DTD issue Howdy, Tomcat 4.x uses the Servlet Specification v2.3 DTD. You're using the 2.2 DTD. Switch to 2.3. Among the DTD differences is the fact all servlet declarations must come before any servlet-mapping declarations. You're violating this requirement. Yoav Shapira Millennium ChemInformatics -Original Message- From: Gregory, Carlton [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 1:43 PM To: '[EMAIL PROTECTED]' Subject: Adherence to DTD issue I have altered a web.xml file in my \webapps\test\WEB-INF directory. Upon startup I get a parse error about the structure of the file. I opened the file in XML spy and it said it was an servlet tag unexpected child element. I then downloaded the DTD from sun and printed it out. I am adhering to the DTD from what it seems. ?xml version=1.0 encoding=ISO-8859-1? !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 servlet servlet-name Hello3 /servlet-name servlet-class Hello3 /servlet-class /servlet servlet-mapping servlet-name Hello3 /servlet-name url-pattern /test/Hello3 /url-pattern /servlet-mapping servlet --- IT GIVES THE ERROR AT THIS LINE servlet-name SurveyServlet /servlet-name servlet-class SurveyServlet /servlet-class /servlet servlet-mapping servlet-name SurveyServlet /servlet-name url-pattern /MedSurvey /url-pattern /servlet-mapping Any ideas? Need more info? - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]