Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-3207

problem with xml entities in web.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.3.8
    • None
    • Core
    • None

    Description

      The following doesn't work, as struts tryes to parse web.xml, but fails to resolve the path to entity file (note that web container parses web.xml fine).

      web.xml:
      <?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/dtd/web-app_2_3.dtd"
      [<!ENTITY PartWebXml SYSTEM "part-web.xml">]>

      <web-app>
      &PartWebXml;
      ...

      Error:

      2010-08-04 11:49:34,970 - [http-8091-1] ERROR (org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1787)) - The /WEB-INF/web.xml was not found.
      java.io.FileNotFoundException: /home/tomcat/part-web.xml (No such file or directory)
      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:70)
      at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
      at org.apache.commons.digester.Digester.createInputSourceFromURL(Digester.java:1938)
      at org.apache.commons.digester.Digester.resolveEntity(Digester.java:1615)
      at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
      at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
      at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digester.java:1765)
      at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1785)
      at org.apache.struts.action.ActionServlet.init(ActionServlet.java:349)
      at javax.servlet.GenericServlet.init(GenericServlet.java:212)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
      at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3228)
      at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:943)
      at org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:556)
      at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:121)

      Attachments

        Activity

          People

            Unassigned Unassigned
            rdo Radoslav Paskalev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: