jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core WhenTag.java
Date Mon, 04 Feb 2002 05:24:22 GMT
shawn       02/02/03 21:24:22

  Modified:    standard build.xml
               standard/src/org/apache/taglibs/standard/tag/common/core
                        WhenTagSupport.java
               standard/src/org/apache/taglibs/standard/tag/common/xml
                        TransformerSupport.java WhenTag.java
               standard/src/org/apache/taglibs/standard/tag/el/core
                        WhenTag.java
  Log:
  Other updates, including changes to the build process to avoid redistributing
  particular files as JARs.
  
  Revision  Changes    Path
  1.6       +34 -9     jakarta-taglibs/standard/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/build.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.xml	12 Dec 2001 02:13:16 -0000	1.5
  +++ build.xml	4 Feb 2002 05:24:22 -0000	1.6
  @@ -5,11 +5,11 @@
       <property file="../build.properties"/>
       <property file="../common.properties"/>
       <property name="js.jar"   value="lib/js.jar"/>
  -    <property name="jdbc.jar"   value="lib/jdbc2_0-stdext.jar"/>
       <property name="jaxen-full.jar"   value="lib/jaxen-full.jar"/>
       <property name="saxpath.jar"      value="lib/saxpath.jar"/>
  -    <property name="crimson.jar"      value="lib/crimson.jar"/>
  -    <property name="xalan.jar"      value="lib/xalan.jar"/>
  +    <!-- <property name="jdbc.jar"   value="lib/jdbc2_0-stdext.jar"/>-->
  +    <!-- <property name="crimson.jar"      value="lib/crimson.jar"/> -->
  +    <!-- <property name="xalan.jar"      value="lib/xalan.jar"/>-->
       <property name="classpath" value="${servlet23.jar}"/>
       <property name="taglib.name"    value="standard"/>
   
  @@ -48,17 +48,32 @@
       <!-- Make sure required dependencies are available -->
       <antcall target="checkRequiredFile">
          <param name="file" value="${servlet23.jar}"/>
  -       <param name="fail.message" value="A jar file containing the Servlet 2.3 and JSP1.2
classes is required to compile the standard taglib. please define the property servlet23.jar
in your build.properties file and ensure that the file exists."/>
  +       <param name="fail.message" value="A jar file containing the Servlet 2.3 and JSP1.2
classes is required to compile the Standard Taglib.  Please define the property servlet23.jar
in your build.properties file and ensure that the file exists."/>
       </antcall>
       <antcall target="checkRequiredFile">
  -       <param name="file" value="${jaxp.jar}"/>
  -       <param name="fail.message" value="The standard taglib required the JAXP 1.1 jaxp.jar
file, please define the property jaxp.jar in your build.properties file and ensure that the
file exists."/>
  +       <param name="file" value="${jdbc2_0-stdext.jar}"/>     
  +       <param name="fail.message" value="This build process for the Standard Taglib
requires the Sun JDBC 2.0 Optional Package (Standard Extensions).  Please define the property
jdbc2_0-stdext.jar in your build.properties file and ensure that the file exists."/>
       </antcall>
       <antcall target="checkRequiredFile">
          <param name="file" value="${crimson.jar}"/>     
  -       <param name="fail.message" value="The standard taglib required the JAXP 1.1 crimson.jar
file, please define the property crimson.jar in your build.properties file and ensure that
the file exists."/>
  +       <param name="fail.message" value="This build process for the Standard Taglib
requires a JAXP 1.1-compliant XML parser, such as crimson.jar.  Please define the property
crimson.jar in your build.properties file and ensure that the file exists."/>
  +    </antcall>
  +    <antcall target="checkRequiredFile">
  +       <param name="file" value="${xalan.jar}"/>     
  +       <param name="fail.message" value="This build process for the Standard Taglib
requires a JAXP 1.1-compliant XSLT processors, such as xalan.jar.  Please define the property
xalan.jar in your build.properties file and ensure that the file exists."/>
       </antcall>
       <!--
  +    <antcall target="checkRequiredFile">
  +       <param name="file" value="${xml-apis.jar}"/>     
  +       <param name="fail.message" value="This build process for the Standard Taglib
requires various XML APIs.  Please define the property xml-apis.jar in your build.properties
file and ensure that the file exists.  You can obtain xml-apis.jar as part of the Xalan distribution.
 These APIs are available from http://xml.apache.org."/>
  +    </antcall>
  +    <antcall target="checkRequiredFile">
  +       <param name="file" value="${jaxp.jar}"/>
  +       <param name="fail.message" value="This build process for the standard taglib
required the JAXP 1.1 jaxp.jar file, please define the property jaxp.jar in your build.properties
file and ensure that the file exists."/>
  +    </antcall>
  +    -->
  +
  +    <!--
       <antcall target="checkOptionalFile">
          <param name="file" value="${jxpath.jar}"/>
          <param name="warn.message" value="The standard taglib requires that you provide
the JXPath JAR if you desire support of the JXPath Expression Language.  Since the property
jxpath.jar in your build.properties file does not point to a valid file or is not defined,
JXPath support will not be included in the compilation or the 'example' application."/>
  @@ -115,6 +130,11 @@
       <copy todir="${build.examples}/WEB-INF/lib">
         <fileset dir="lib" includes="*.jar"/>
       </copy>
  +    <copy file="${jdbc2_0-stdext.jar}" tofile="${build.examples}/WEB-INF/lib/jdbc2_0-stdext.jar"
/>
  +    <copy file="${xalan.jar}" tofile="${build.examples}/WEB-INF/lib/xalan.jar" />
  +    <copy file="${crimson.jar}" tofile="${build.examples}/WEB-INF/lib/crimson.jar" />
  +    <!-- <copy file="${xml-apis.jar}" tofile="${build.examples}/WEB-INF/lib/xml-apis.jar"
/> -->
  +
       <!-- Copy required external API jar files -->
       <!--
       <copy file="${jaxp.jar}"
  @@ -179,9 +199,14 @@
     </target>
   -->
   
  -    <javac srcdir="${library.src}" destdir="${build.library}"
  -           classpath="${servlet23.jar}:${jxpath.jar}:${js.jar}:${jdbc.jar}:${jaxen-full.jar}:${saxpath.jar}:${crimson.jar}:${xalan.jar}"
  +<!--    <javac srcdir="${library.src}" destdir="${build.library}"
  +           classpath="${servlet23.jar}:${jxpath.jar}:${js.jar}:${jdbc2_0-stdext.jar}:${crimson.jar}:${xalan.jar}:${jaxen-full.jar}:${saxpath.jar}"
   	   debug="on"/>
  +-->
  +      <javac srcdir="${library.src}" destdir="${build.library}"
  +         classpath="${servlet23.jar}:${jxpath.jar}:${js.jar}:${jdbc2_0-stdext.jar}:${xalan.jar}:${crimson.jar}:${jaxen-full.jar}:${saxpath.jar}"
  +         debug="on"/>
  +
     </target>
   
     <!-- Compile the library as well as the associated applications -->
  
  
  
  1.2       +1 -1      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/WhenTagSupport.java
  
  Index: WhenTagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/WhenTagSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WhenTagSupport.java	21 Nov 2001 14:25:25 -0000	1.1
  +++ WhenTagSupport.java	4 Feb 2002 05:24:22 -0000	1.2
  @@ -69,7 +69,7 @@
    * <p>In particular, this base class does the following:</p>
    * 
    * <ul>
  - *  <li> overrides ComparisonTagSupport.doStartTag() to implement the
  + *  <li> overrides ConditionalTagSupport.doStartTag() to implement the
    *       appropriate semantics of subtags of &lt;choose&gt; </li>
    * </ul>
    *
  
  
  
  1.3       +1 -1      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/TransformerSupport.java
  
  Index: TransformerSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/TransformerSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransformerSupport.java	21 Nov 2001 16:17:04 -0000	1.2
  +++ TransformerSupport.java	4 Feb 2002 05:24:22 -0000	1.3
  @@ -117,7 +117,7 @@
   	    xslt = bodyContent.getString();
   
   	// get a Source and feed it to our factory
  -	Source s = TransformSupport.getSource(xslt);
  +	Source s = TransformSupport.getSource(xslt, false);
   	Transformer t = tf.newTransformer(s);
   
   	// expose the Transformer
  
  
  
  1.2       +1 -1      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/WhenTag.java
  
  Index: WhenTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/WhenTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WhenTag.java	21 Nov 2001 07:38:55 -0000	1.1
  +++ WhenTag.java	4 Feb 2002 05:24:22 -0000	1.2
  @@ -87,7 +87,7 @@
       //*********************************************************************
       // Supplied conditional logic
   
  -    protected boolean condition() throws JspException {
  +    protected boolean condition() throws JspTagException {
          try {
               XPathUtil xu = new XPathUtil(pageContext);
               return (xu.booleanValueOf(XPathUtil.getContext(this), select));
  
  
  
  1.2       +10 -6     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/WhenTag.java
  
  Index: WhenTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/WhenTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WhenTag.java	21 Nov 2001 14:25:26 -0000	1.1
  +++ WhenTag.java	4 Feb 2002 05:24:22 -0000	1.2
  @@ -88,13 +88,17 @@
       //*********************************************************************
       // Supplied conditional logic
   
  -    protected boolean condition() throws JspException {
  -       Object r = ExpressionEvaluatorManager.evaluate(
  +    protected boolean condition() throws JspTagException {
  +        try { 
  +            Object r = ExpressionEvaluatorManager.evaluate(
                   "test", test, Boolean.class, this, pageContext);
  -        if (r == null)
  -	    throw new NullAttributeException("when", "test");
  -        else
  -            return (((Boolean) r).booleanValue());
  +            if (r == null)
  +	        throw new NullAttributeException("when", "test");
  +            else
  +                return (((Boolean) r).booleanValue());
  +	} catch (JspException ex) {
  +	    throw new JspTagException(ex.toString());
  +	}
       }
   
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message