tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36284] New: - External Entities cannot be found in web.xml
Date Sat, 20 Aug 2005 04:25:04 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36284>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36284

           Summary: External Entities cannot be found in web.xml
           Product: Tomcat 5
           Version: 5.0.28
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: paul4christ79@yahoo.com


I am using JspC to generated my precompiled pages, but I do not like how I am
forced to manually alter my web.xml. To get around this, I have declared an
external entity reference in web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app [
<!ENTITY foo SYSTEM "generated_web.xml">
]>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"... version="2.4">
....

When I reference the entity in the servlet section, I get an exception. Tomcat
is trying to resolve to the boot directory, not the directory of my webapp. This
is an obvious error:

======
java.io.FileNotFoundException: C:\jakarta-tomcat-5.0.28\bin\generated_web.xml
(The system cannot find the file specified)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:106)
	at java.io.FileInputStream.<init>(FileInputStream.java:66)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:69)
	at
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:156)
	at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
======

The XML parser should have a pluggable entity resolver that maps to the web
application directory being loaded.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message