luehe       2003/07/28 11:47:30

  Modified:    jasper2/src/share/org/apache/jasper/compiler Compiler.java
                        PageInfo.java ParserController.java
  Log:
  Fixed Bugzilla 21823 ("Compiler uses invoking page's PageInfo for
  handling tag files")
  Patch provided by [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.66      +0 -4      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- Compiler.java     26 Apr 2003 01:15:25 -0000      1.65
  +++ Compiler.java     28 Jul 2003 18:47:30 -0000      1.66
  @@ -212,13 +212,9 @@
        // If the current uri is matched by a pattern specified in
        // a jsp-property-group in web.xml, initialize pageInfo with
        // those properties.
  -     if (jspProperty.isXml() != null) {
  -         pageInfo.setIsXmlConfigSpecified(true);
  -     }
        if (jspProperty.isELIgnored() != null) {
            pageInfo.setELIgnoredSpecified(true);
        }
  -     pageInfo.setIsXmlConfig(JspUtil.booleanValue(jspProperty.isXml()));
        pageInfo.setELIgnored(JspUtil.booleanValue(jspProperty.isELIgnored()));
        
pageInfo.setScriptingInvalid(JspUtil.booleanValue(jspProperty.isScriptingInvalid()));
        if (jspProperty.getIncludePrelude() != null) {
  
  
  
  1.34      +3 -25     
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/PageInfo.java
  
  Index: PageInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/PageInfo.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- PageInfo.java     23 Jul 2003 20:37:24 -0000      1.33
  +++ PageInfo.java     28 Jul 2003 18:47:30 -0000      1.34
  @@ -107,12 +107,6 @@
       private boolean elIgnoredSpecified = false;
       private String omitXmlDecl = null;
   
  -    // true if there is an is-xml element in the jsp-config
  -    private boolean isXmlConfigSpecified = false;    
  -
  -    // The value of the is-xml element in the jsp-config
  -    private boolean isXmlConfig = false;
  -
       // A custom tag is a tag file
       private boolean hasTagFile = false;
   
  @@ -211,22 +205,6 @@
   
       public boolean isELIgnoredSpecified() {
        return elIgnoredSpecified;
  -    }
  -
  -    public boolean isXmlConfig() {
  -     return isXmlConfig;
  -    }
  -
  -    public void setIsXmlConfig(boolean xml) {
  -     isXmlConfig = xml;
  -    }
  -
  -    public boolean isXmlConfigSpecified() {
  -     return isXmlConfigSpecified;
  -    }
  -
  -    public void setIsXmlConfigSpecified(boolean xmlSpecified) {
  -     isXmlConfigSpecified = xmlSpecified;
       }
   
       public List getIncludePrelude() {
  
  
  
  1.43      +6 -13     
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java
  
  Index: ParserController.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- ParserController.java     21 May 2003 18:09:33 -0000      1.42
  +++ ParserController.java     28 Jul 2003 18:47:30 -0000      1.43
  @@ -82,7 +82,6 @@
   
       private JspCompilationContext ctxt;
       private Compiler compiler;
  -    private PageInfo pageInfo;
       private ErrorDispatcher err;
   
       /*
  @@ -114,7 +113,6 @@
       public ParserController(JspCompilationContext ctxt, Compiler compiler) {
           this.ctxt = ctxt; 
        this.compiler = compiler;
  -     this.pageInfo = compiler.getPageInfo();
        this.err = compiler.getErrorDispatcher();
       }
   
  @@ -299,13 +297,6 @@
        * Determines the syntax (standard or XML) and page encoding properties
        * for the given file, and stores them in the 'isXml' and 'sourceEnc'
        * instance variables, respectively.
  -     *
  -     * The properties may already be specified in a JSP property group: Notice
  -     * that while the 'isXml' property applies to an entire translation unit
  -     * (and therefore needs to be checked only for the top-level file), the
  -     * 'page-encoding' property must be checked separately for the top-level
  -     * and each of its included files, unless they're in XML syntax (in which
  -     * case the page encoding is determined according to the XML spec).
        */
       private void determineSyntaxAndEncoding(String absFileName,
                                            JarFile jarFile,
  @@ -327,10 +318,12 @@
         */
        boolean revert = false;
   
  -     if (pageInfo.isXmlConfigSpecified()) {
  -         // If <is-xml> is specified in a <jsp-property-group>, it is
  -         // used.
  -         isXml = pageInfo.isXmlConfig();
  +        JspConfig jspConfig = ctxt.getOptions().getJspConfig();
  +        JspConfig.JspProperty jspProperty = jspConfig.findJspProperty(
  +                                                                absFileName);
  +        if (jspProperty.isXml() != null) {
  +            // If <is-xml> is specified in a <jsp-property-group>, it is used.
  +            isXml = JspUtil.booleanValue(jspProperty.isXml());
            isExternal = true;
        } else if (absFileName.endsWith(".jspx")
                   || absFileName.endsWith(".tagx")) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to