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 2002/04/12 18:10:46 UTC
DO NOT REPLY [Bug 8024] New: -
Can't include entities in web.xml
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8024>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8024
Can't include entities in web.xml
Summary: Can't include entities in web.xml
Product: Tomcat 4
Version: Unknown
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: szegedia@freemail.hu
Entities with relative paths are not resolved in the web.xml. I.e.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"
[
<!ENTITY webinc PUBLIC "webinc" "webinc.xml">
]
>
<web-app>
&webinc;
fails with
Exception initializing TldLocationsCache: XML parsing error on file /WEB-
INF/web.xml: (line 6, col -1): Relative URI "webinc.xml"; can not be resolved
without a base URI.
The reason for this is that Digester.parse(File) is called in
o.a.c.startup.Catalina - this method does not set the system id of the
InputSource, so relative paths can't be resolved.
I suggest using Digester.parse(InputSource) where you'd set *BOTH* the stream
*AND* the system ID (in form of "file://" + file.getAbsolutePath()) properties
of the input source to solve the problem.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>