Bug 37143 - Jasper precompiler didn't handle external entities
Summary: Jasper precompiler didn't handle external entities
Status: RESOLVED DUPLICATE of bug 37261
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 5.5.12
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-18 14:46 UTC by Henri Gomez
Modified: 2005-11-06 19:17 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Gomez 2005-10-18 14:46:08 UTC
Jasper has been updated sometimes ago to handle correctly external entities
included from web.xml when this entities live in the WEBAPP, but in precompiling
stage it didn't detect them.

here is a sample 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 base      SYSTEM "base-tc55.xml">
<!ENTITY jsp SYSTEM  "jsp.xml">
]>

<web-app>
  <display-name>MyApp</display-name>
  <context-param>
    <param-name>MyReleaseDate<param-name>
    <param-value>20051018</param-value>
  </context-param>

  <servlet>
    <servlet-name>startup</servlet-name>
    <servlet-class>org.domain.web.StartupServlet</servlet-class>
    <init-param>
      <param-name>myParm</param-name>
      <param-value>myValue</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

&base;
&jsp;

  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>
 </web-app>

the base.xml could be :

<?xml version="1.0" encoding="ISO-8859-1"?>

  <servlet>
    <servlet-name>login</servlet-name>
    <servlet-class>org.domain.web.LoginServlet</servlet-class>
    <init-param>
      <param-name>stand.alone</param-name>
      <param-value>true</param-value>
    </init-param>

  </servlet>
  
  <servlet>
    <servlet-name>logout</servlet-name>
    <servlet-class>org.domain.web.LogoutServlet</servlet-class>
    <init-param>
      <param-name>demo</param-name>
      <param-value>true</param-value>
    </init-param>
  </servlet>


and a sample jsp.xml :

<?xml version="1.0" encoding="ISO-8859-1"?>
Comment 1 william.barker 2005-11-07 04:17:46 UTC
AFAIK, these are the only two places where web.xml is parsed.

*** This bug has been marked as a duplicate of 37261 ***