You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/02/25 10:59:40 UTC
DO NOT REPLY [Bug 46764] New: Tomcat 6 and xmlValidation="false" not
working
https://issues.apache.org/bugzilla/show_bug.cgi?id=46764
Summary: Tomcat 6 and xmlValidation="false" not working
Product: Tomcat 6
Version: 6.0.18
Platform: HP
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: montesa@unizar.es
I have attached a Tomcat 6.0.18 (and TC-Native 1.1.16) with Apache 2.2 using
mod_jk 1.2.27. Tomcat is configured with multiple vhost.
Apache & Tomcat is running in Debian 4 with SUN Java 6.0.
My server.xml looks like this:
...
<Connector port="8009"
enableLookups="false" redirectPort="443" protocol="AJP/1.3"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
autoDeploy="false" unpackWARs="false"
xmlValidation="false" xmlNamespaceAware="false"/>
<Host name="other.machine.com" appBase="sharedwebapps"
autoDeploy="false" unpackWARs="false"
xmlValidation="false" xmlNamespaceAware="false"/>
...
When start up Tomcat appear in catalina.out the following errores:
[Fatal Error] loose.dtd:31:3: The declaration for the entity "HTML.Version"
must end with '>'.
My JSP code generated is like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
But I do not want to validate. Furthermore Tomcat tries to open a connection to
http://www.w3.org making the request is resolved more slowly. If activate the
firewall (DROP OUTPUT connections) will retry the connection for minutes.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 46764] Tomcat 6 and xmlValidation="false" not
working
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46764
--- Comment #2 from Sergio Montesa <mo...@unizar.es> 2009-03-05 02:52:19 PST ---
(In reply to comment #1)
> Can you please supply the simplest JSP that exhibits this error on a clean
> 6.0.18 installation.
My code is as follows:
URL urlXMLIdioma=new URL("http://machine.com/idioma.xml");
org.w3c.dom.Document docIdioma=null;
org.xml.sax.InputSource isXMLIdioma=null;
javax.xml.parsers.DocumentBuilderFactory
docbfIdioma=javax.xml.parsers.DocumentBuilderFactory.newInstance();
docbfIdioma.setNamespaceAware(false);
docbfIdioma.setValidating(false);
isXMLIdioma=new org.xml.sax.InputSource(urlXMLIdioma.openStream());
isXMLIdioma.setEncoding("ISO-8859-1");
docIdioma=docbfIdioma.newDocumentBuilder().parse(isXMLIdioma);
The last line throws the exception: org.xml.sax.SAXParseException: The
declaration for the entity "HTML.Version" must end with '>'.
If "idioma.xml" not exists then server returns a 404 error page. The 404 page
begins like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="es">
...
and then the exception occurs.
Why? I disabled all xmlValidation (tomcat, in jsp, etc.)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 46764] Tomcat 6 and xmlValidation="false" not
working
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46764
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
--- Comment #3 from Mark Thomas <ma...@apache.org> 2009-03-07 06:03:59 PST ---
I can't reproduce this. With the sample JSP code you have provided, this just
works.
There is also something odd about your configuration. A clean installation
won't even look at a JSP on start-up, let alone try and parse it.
If you still see this error on a clean Tomcat 6.0.18 installation downloaded
from the ASF (not installed via your OS's packaging system) please provide the
complete source for a single JSP that demonstrates this issue on the clean
installation so we can investigate further.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 46764] Tomcat 6 and xmlValidation="false" not
working
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46764
--- Comment #1 from Mark Thomas <ma...@apache.org> 2009-03-03 14:05:57 PST ---
Can you please supply the simplest JSP that exhibits this error on a clean
6.0.18 installation.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org