<DIV><FONT color=#ff0000 size=2><FONT size=2><FONT size=2>
<P><FONT color=#407f00>Hi!</FONT></P>
<P><FONT color=#407f00>I have problem when reading a web.xml (only with web-app_2_3 in the doctype : web-app_2_2 works fine).</FONT></P>
<P><FONT color=#407f00>Can somebody help me.</FONT></P>
<P><FONT color=#407f00>Here are web.xml content, some code , and the error message</FONT></P>
<P><FONT color=#407f00>Thanks</FONT></P>
<P><FONT color=#407f00>Tshitshi</FONT></P>
<P><FONT color=#407f00>WEB.XML</FONT></P>
<P><FONT color=#407f00>========</FONT></P><FONT size=2>
<P><?xml version=</FONT><FONT color=#2a00ff size=2>"1.0"</FONT><FONT size=2> encoding=</FONT><FONT color=#2a00ff size=2>"UTF-8"</FONT><FONT size=2>?></P></FONT><FONT color=#7f0055 size=2>
<P><</FONT><FONT color=#000000 size=2>!DOCTYPE web-app PUBLIC </FONT><FONT color=#2a00ff size=2>"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"</FONT><FONT color=#000000 size=2> </FONT><FONT color=#2a00ff size=2>"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"</FONT><FONT size=2><FONT color=#000000>></FONT></P></FONT><FONT color=#3f7f5f size=2>
<P><!-- Copyright (c) 2002 by ObjectLearn. All Rights Reserved. --></P></FONT><FONT color=#7f0055 size=2>
<P><web</FONT><FONT size=2><FONT color=#000000>-app></FONT></P>
<P><FONT color=#000000></FONT></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- Remove the comments below to define a servlet. --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- <servlet> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- <servlet-name>MyServlet</servlet-name> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- <servlet-class>examples.MyServlet</servlet-class> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- <init-param> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- <param-name>myparam</param-name> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- <param-value>12345</param-value> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- </init-param> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- </servlet> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- <servlet-mapping> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- <servlet-name>MyServlet</servlet-name> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- <url-pattern>/mine/*</url-pattern> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- </servlet-mapping> --></P></FONT><FONT size=2>
<P></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ --></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><context</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-name>monkeyCss</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-name></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-value>/WEB-INF/css</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-value></P>
<P></FONT><FONT color=#7f0055 size=2></context</FONT><FONT size=2>-param></P>
<P></P>
<P></FONT><FONT color=#7f0055 size=2><servlet></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><servlet</FONT><FONT size=2>-name>action</FONT><FONT color=#7f0055 size=2></servlet</FONT><FONT size=2>-name></P>
<P></FONT><FONT color=#7f0055 size=2><servlet</FONT><FONT size=2>-class>org.apache.struts.action.ActionServlet</FONT><FONT color=#7f0055 size=2></servlet</FONT><FONT size=2>-class></P>
<P></FONT><FONT color=#7f0055 size=2><init</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-name>config</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-name></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-value>/WEB-INF/struts-config.xml</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-value></P>
<P></FONT><FONT color=#7f0055 size=2></init</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><init</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-name>debug</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-name></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-value>3</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-value></P>
<P></FONT><FONT color=#7f0055 size=2></init</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><init</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-name>detail</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-name></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-value>3</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-value></P>
<P></FONT><FONT color=#7f0055 size=2></init</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><init</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-name>mapping</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-name></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-value>tknt.ecole.struts.action.EcoleActionMapping</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-value></P>
<P></FONT><FONT color=#7f0055 size=2></init</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><init</FONT><FONT size=2>-param></P>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-name>dbRelativePath</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-name></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- A AFFINER --></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><param</FONT><FONT size=2>-value>/WEB-INF/classes/tknt/ecole/ecoles.odb</FONT><FONT color=#7f0055 size=2></param</FONT><FONT size=2>-value> </P>
<P></FONT><FONT color=#7f0055 size=2></init</FONT><FONT size=2>-param> </P>
<P></FONT><FONT color=#7f0055 size=2><load</FONT><FONT size=2>-on-startup>1</FONT><FONT color=#7f0055 size=2></load</FONT><FONT size=2>-on-startup></P>
<P></FONT><FONT color=#7f0055 size=2></servlet></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><servlet</FONT><FONT size=2>-mapping></P>
<P></FONT><FONT color=#7f0055 size=2><servlet</FONT><FONT size=2>-name>action</FONT><FONT color=#7f0055 size=2></servlet</FONT><FONT size=2>-name></P>
<P></FONT><FONT color=#7f0055 size=2><url</FONT><FONT size=2>-pattern>*.do</FONT><FONT color=#7f0055 size=2></url</FONT><FONT size=2>-pattern></P>
<P></FONT><FONT color=#7f0055 size=2></servlet</FONT><FONT size=2>-mapping></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- WELCOME --></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><welcome</FONT><FONT size=2>-file-list></P>
<P></FONT><FONT color=#7f0055 size=2><welcome</FONT><FONT size=2>-file>index.jsp</FONT><FONT color=#7f0055 size=2></welcome</FONT><FONT size=2>-file></P>
<P></FONT><FONT color=#7f0055 size=2><welcome</FONT><FONT size=2>-file>login.jsp</FONT><FONT color=#7f0055 size=2></welcome</FONT><FONT size=2>-file></P>
<P></FONT><FONT color=#7f0055 size=2></welcome</FONT><FONT size=2>-file-list></P>
<P></FONT><FONT color=#3f7f5f size=2><!-- ERRORS --></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><error</FONT><FONT size=2>-page></P>
<P></FONT><FONT color=#7f0055 size=2><error</FONT><FONT size=2>-code>404</FONT><FONT color=#7f0055 size=2></error</FONT><FONT size=2>-code></P>
<P></FONT><FONT color=#7f0055 size=2><location></FONT><FONT size=2>/error.jsp</FONT><FONT color=#7f0055 size=2></location></FONT><FONT size=2> </P>
<P></FONT><FONT color=#7f0055 size=2></error</FONT><FONT size=2>-page> </P>
<P></FONT><FONT color=#3f7f5f size=2><!-- TAGLIBS --></FONT><FONT size=2> </P>
<P></FONT><FONT color=#7f0055 size=2><taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-uri>/WEB-INF/taglib/struts-html.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-uri></P>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-location>/WEB-INF/taglib/struts-html.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-location></P>
<P></FONT><FONT color=#7f0055 size=2></taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-uri>/WEB-INF/taglib/struts-logic.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-uri></P>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-location>/WEB-INF/taglib/struts-logic.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-location></P>
<P></FONT><FONT color=#7f0055 size=2></taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-uri>/WEB-INF/taglib/struts-bean.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-uri></P>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-location>/WEB-INF/taglib/struts-bean.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-location></P>
<P></FONT><FONT color=#7f0055 size=2></taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-uri>/WEB-INF/taglib/struts-nested.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-uri></P>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-location>/WEB-INF/taglib/struts-nested.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-location></P>
<P></FONT><FONT color=#7f0055 size=2></taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-uri>/WEB-INF/taglib/struts-tiles.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-uri></P>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-location>/WEB-INF/taglib/struts-tiles.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-location></P>
<P></FONT><FONT color=#7f0055 size=2></taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib></P></FONT><FONT size=2>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-uri>/WEB-INF/taglib/struts-template.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-uri></P>
<P></FONT><FONT color=#7f0055 size=2><taglib</FONT><FONT size=2>-location>/WEB-INF/taglib/struts-template.tld</FONT><FONT color=#7f0055 size=2></taglib</FONT><FONT size=2>-location></P>
<P></FONT><FONT color=#7f0055 size=2></taglib></FONT><FONT size=2> </P></FONT><FONT color=#7f0055 size=2>
<P></web</FONT><FONT size=2><FONT color=#000000>-app></FONT></P></FONT>
<P><FONT color=#407f00></FONT> </P>
<P><FONT color=#407f00>CODE</FONT></P>
<P><FONT color=#407f00>======</FONT></FONT></P>
<P><B><FONT color=#7f0055 size=2>public</B></FONT><FONT size=2> </FONT><B><FONT color=#7f0055 size=2>static</B></FONT><FONT size=2> </FONT><B><FONT color=#7f0055 size=2>void</B></FONT><FONT size=2> main(String[] args) </FONT><B><FONT color=#7f0055 size=2>throws</B></FONT><FONT size=2> JDOMException, IOException {</P>
<P>WebConfigDocument tc = WebConfigDocument.buildWebDeployDescriptorFromPath(</P>
<P></FONT><FONT color=#2a00ff size=2>"C:/Texts/JdoBase/ST_GEN/src/core/config/web/test/web.xml"</FONT><FONT size=2>);</P>
<P></P>
<P>XMLOutputter outp = </FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2> XMLOutputter();</P>
<P>outp.setIndent(</FONT><FONT color=#2a00ff size=2>" "</FONT><FONT size=2>);</P>
<P>outp.setNewlines(</FONT><B><FONT color=#7f0055 size=2>true</B></FONT><FONT size=2>);</P>
<P>outp.output(tc.getDeploymentDescriptorDocument(), System.out);</P>
<P>}</P></FONT>
<P>.........</FONT><B><FONT color=#7f0055 size=2></FONT></B></P>
<P><B><FONT color=#7f0055 size=2>public</B></FONT><FONT size=2> WebConfigDocument() {</P>
<P>deploymentDescriptorDocument = </FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2> Document(</FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2> Element(</FONT><FONT color=#2a00ff size=2>"web-app"</FONT><FONT size=2>));</P>
<P>deploymentDescriptorDocument.setDocType(</P>
<P></FONT><B><FONT color=#7f0055 size=2>new</B></FONT><FONT size=2> DocType(</P>
<P></FONT><FONT color=#2a00ff size=2>"web-app"</FONT><FONT size=2>,</P>
<P></FONT><FONT color=#2a00ff size=2>"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"</FONT><FONT size=2>,</P>
<P></FONT><FONT color=#2a00ff size=2><A href="http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">http://java.sun.com/j2ee/dtds/web-app_2_3.dtd</A></FONT><FONT size=2>));</P>
<P>}</P></FONT>
<P>...........</P>
<P><FONT color=#407f00>ERROR MESSAGE</FONT></P>
<P><FONT color=#407f00>===============</FONT></P>
<P>org.jdom.input.JDOMParseException: Error on line 1 of document http://java.sun.com/j2ee/dtds/web-app_2_3.dtd: L'entité de paramètre externe "%[dtd];" contient des caractères après le balisage.</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:377)</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:724)</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:703)</P>
<P>at core.config.web.WebConfigDocument.buildWebDeployDescriptor(WebConfigDocument.java:35)</P>
<P>at core.config.web.WebConfigDocument.buildWebDeployDescriptorFromPath(WebConfigDocument.java:98)</P>
<P>at core.config.web.test.WebXmlTest.main(WebXmlTest.java:25)</P>
<P>Caused by: org.xml.sax.SAXParseException: L'entité de paramètre externe "%[dtd];" contient des caractères après le balisage.</P>
<P>at org.apache.crimson.parser.Parser2.fatal(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.fatal(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.externalParameterEntity(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.parse(Unknown Source)</P>
<P>at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:370)</P>
<P>... 5 more</P>
<P>Caused by: org.xml.sax.SAXParseException: L'entité de paramètre externe "%[dtd];" contient des caractères après le balisage.</P>
<P>at org.apache.crimson.parser.Parser2.fatal(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.fatal(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.externalParameterEntity(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.parse(Unknown Source)</P>
<P>at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:370)</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:724)</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:703)</P>
<P>at core.config.web.WebConfigDocument.buildWebDeployDescriptor(WebConfigDocument.java:35)</P>
<P>at core.config.web.WebConfigDocument.buildWebDeployDescriptorFromPath(WebConfigDocument.java:98)</P>
<P>at core.config.web.test.WebXmlTest.main(WebXmlTest.java:25)</P>
<P>Caused by: org.xml.sax.SAXParseException: L'entité de paramètre externe "%[dtd];" contient des caractères après le balisage.</P>
<P>at org.apache.crimson.parser.Parser2.fatal(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.fatal(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.externalParameterEntity(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)</P>
<P>at org.apache.crimson.parser.Parser2.parse(Unknown Source)</P>
<P>at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:370)</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:724)</P>
<P>at org.jdom.input.SAXBuilder.build(SAXBuilder.java:703)</P>
<P>at core.config.web.WebConfigDocument.buildWebDeployDescriptor(WebConfigDocument.java:35)</P>
<P>at core.config.web.WebConfigDocument.buildWebDeployDescriptorFromPath(WebConfigDocument.java:98)</P>
<P>at core.config.web.test.WebXmlTest.main(WebXmlTest.java:25)</P>
<P>Exception in thread "main" </P></FONT></DIV><BR><BR>--------------------------------<br>Tshitshi KIA NTONI<br>91A, avenue des combattants<br>B-1340 Ottignies<br><br>GSM : 0495 / 75 48 98<br>Tel : 010 / 45 44 10<br>Fax : 010 / 75 20 69<p><hr size=1><font face="Arial" size="2">Want to chat instantly with your online friends? <a href="http://uk.rd.yahoo.com/mail/tagline_messenger/*http://uk.messenger.yahoo.com/"><b>Get the FREE Yahoo!
Messenger</b></a></font>