freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject incubator-freemarker git commit: FreeMarker's JSP support (if it's used) now requires at least JSP 2.0. Earlier it only required JSP 1.1. (Reason: The jsp-api dependency for JSP 1.x, which was needed for building, can't be legally present in the Maven Ce
Date Sat, 19 Sep 2015 12:10:27 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/2.3-gae 9c2b9c871 -> dde63a1f2


FreeMarker's JSP support (if it's used) now requires at least JSP 2.0. Earlier it only required
JSP 1.1. (Reason: The jsp-api dependency for JSP 1.x, which was needed for building, can't
be legally present in the Maven Central Repository, nor be provided by freemarker.org.)


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/dde63a1f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/dde63a1f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/dde63a1f

Branch: refs/heads/2.3-gae
Commit: dde63a1f255ca1d8563d5499ee248a4151b3f52b
Parents: 9c2b9c8
Author: ddekany <ddekany@apache.org>
Authored: Sat Sep 19 14:06:50 2015 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Sat Sep 19 14:09:57 2015 +0200

----------------------------------------------------------------------
 build.xml                                       | 17 +-------
 ivy.xml                                         |  5 ---
 .../freemarker/ext/jsp/PageContextFactory.java  |  3 +-
 .../ext/jsp/_FreeMarkerPageContext1.java        | 37 ------------------
 src/manual/book.xml                             | 41 ++++++++++----------
 5 files changed, 24 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/dde63a1f/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index e6b84cc..999c88b 100644
--- a/build.xml
+++ b/build.xml
@@ -240,35 +240,22 @@
       verify="yes" stubversion="1.2"
     />
 
-    <ivy:cachepath conf="build.jsp2.0" pathid="ivy.dep.jsp1.2" />
+    <ivy:cachepath conf="build.jsp2.0" pathid="ivy.dep.jsp2.0" />
     <javac srcdir="src/main/java" destdir="build/classes" deprecation="off" 
       debug="on" optimize="off" target="1.5" source="1.5" encoding="utf-8"
       includeantruntime="false"
-      classpathref="ivy.dep.jsp1.2"
+      classpathref="ivy.dep.jsp2.0"
       bootclasspath="${boot.classpath.j2se1.5}"
       includes="
         freemarker/ext/jsp/**,
         freemarker/ext/servlet/**,
         freemarker/cache/WebappTemplateLoader.java"
       excludes="
-        freemarker/ext/jsp/TaglibFactory.java,
-        freemarker/ext/jsp/_FreeMarkerPageContext1.java,
         freemarker/ext/jsp/_FreeMarkerPageContext21.java,
         freemarker/ext/jsp/FreeMarkerJspFactory21.java,
         freemarker/ext/jsp/FreeMarkerJspApplicationContext.java"
     />
     
-    <ivy:cachepath conf="build.jsp1.2" pathid="ivy.dep.jsp1.2" />
-    <javac srcdir="src/main/java" destdir="build/classes" deprecation="off" 
-      debug="on" optimize="off" target="1.5" source="1.5" encoding="utf-8"
-      includeantruntime="false"
-      classpathref="ivy.dep.jsp1.2"
-      bootclasspath="${boot.classpath.j2se1.5}"
-      includes="
-        freemarker/ext/jsp/TaglibFactory.java,
-        freemarker/ext/jsp/_FreeMarkerPageContext1.java"
-    />
-    
     <!-- There's no build.jsp2.0, as those classes are part of the common build subset.
-->
     
     <ivy:cachepath conf="build.jsp2.1" pathid="ivy.dep.jsp2.1" />

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/dde63a1f/ivy.xml
----------------------------------------------------------------------
diff --git a/ivy.xml b/ivy.xml
index f672bef..f4b63f8 100644
--- a/ivy.xml
+++ b/ivy.xml
@@ -25,9 +25,6 @@
         description="for building FreeMarker without dependencies that optinal dependencies"
     />
 
-    <conf name="build.jsp1.2" extends="build.base"
-        description="for building FreeMarker with JSP 1.2 support"
-    />
     <conf name="build.jsp2.0" extends="build.base"
         description="for building FreeMarker with JSP 2.0 support"
     />
@@ -93,8 +90,6 @@
       <exclude org="xml-apis" module="xml-apis" />
     </dependency>
     
-    <dependency org="javax.servlet.jsp" name="jsp-api" rev="1.2" conf="build.jsp1.2->default"
/>
-    <dependency org="javax.servlet" name="servlet-api" rev="2.3" conf="build.jsp1.2->default"
/>
     <dependency org="javax.servlet.jsp" name="jsp-api" rev="2.0" conf="build.jsp2.0->default;
example.struts-webapp->default" />
     <dependency org="javax.servlet" name="servlet-api" rev="2.4" conf="build.jsp2.0->default;
example.servlet->default" />
     <dependency org="javax.servlet.jsp" name="jsp-api" rev="2.1" conf="build.jsp2.1->default"
/>

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/dde63a1f/src/main/java/freemarker/ext/jsp/PageContextFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/ext/jsp/PageContextFactory.java b/src/main/java/freemarker/ext/jsp/PageContextFactory.java
index 2491c3f..653a805 100644
--- a/src/main/java/freemarker/ext/jsp/PageContextFactory.java
+++ b/src/main/java/freemarker/ext/jsp/PageContextFactory.java
@@ -41,7 +41,8 @@ class PageContextFactory {
                     PageContext.class.getMethod("getExpressionEvaluator", (Class[]) null);
                     return Class.forName("freemarker.ext.jsp._FreeMarkerPageContext2");
                 } catch (NoSuchMethodException e2) {
-                    return Class.forName("freemarker.ext.jsp._FreeMarkerPageContext1");
+                    throw new IllegalStateException(
+                            "Since FreeMarker 2.3.24, JSP support requires at least JSP 2.0.");
                 }
             }
         } catch (ClassNotFoundException e) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/dde63a1f/src/main/java/freemarker/ext/jsp/_FreeMarkerPageContext1.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/ext/jsp/_FreeMarkerPageContext1.java b/src/main/java/freemarker/ext/jsp/_FreeMarkerPageContext1.java
deleted file mode 100644
index 5618727..0000000
--- a/src/main/java/freemarker/ext/jsp/_FreeMarkerPageContext1.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package freemarker.ext.jsp;
-
-import freemarker.template.TemplateModelException;
-
-/**
- * Don't use this class; it's only public to work around Google App Engine Java
- * compliance issues. FreeMarker developers only: treat this class as package-visible.
- * 
- * Implementation of PageContext that contains JSP 1.1 specific methods.
- */
-public class _FreeMarkerPageContext1 extends FreeMarkerPageContext {
-
-    public _FreeMarkerPageContext1() throws TemplateModelException {
-        super();
-    }
-
-    public void include (String s, boolean b) {}
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/dde63a1f/src/manual/book.xml
----------------------------------------------------------------------
diff --git a/src/manual/book.xml b/src/manual/book.xml
index fe7ab96..a2f415f 100644
--- a/src/manual/book.xml
+++ b/src/manual/book.xml
@@ -10928,22 +10928,8 @@ ${bar?trim}</programlisting>
 
           <para>Note that you can use JSP taglibs with FreeMarker even if the
           servlet container has no native JSP support, just make sure that the
-          <literal>javax.servlet.jsp.*</literal> packages for JSP 1.2 (or
-          later) are available to your Web application. If your servlet
-          container comes with JSP 1.1, then you have to obtain the following
-          six classes (for example you can extract them from the jar-s of
-          Tomcat 5.x or Tomcat 4.x), and copy them into your webapp's
-          <literal>WEB-INF/classes/<replaceable>...</replaceable></literal>
-          directory: <literal>javax.servlet.jsp.tagext.IterationTag</literal>,
-          <literal>javax.servlet.jsp.tagext.TryCatchFinally</literal>,
-          <literal>javax.servlet.ServletContextListener</literal>,
-          <literal>javax.servlet.ServletContextAttributeListener</literal>,
-          <literal>javax.servlet.http.HttpSessionAttributeListener</literal>,
-          <literal>javax.servlet.http.HttpSessionListener</literal>. But
-          beware, since containers that come with JSP 1.1 usually use earlier
-          Serlvet versions than 2.3, event listeners will not be supported,
-          and thus JSP 1.2 taglibs that register event listeners will not work
-          properly.</para>
+          <literal>javax.servlet.jsp.*</literal> packages for JSP 2.0 (or
+          later) are available to your Web application.</para>
 
           <para>As of this writing, JSP features up to JSP 2.1 are
           implemented, except the "tag files" feature of JSP 2 (i.e., custom
@@ -25832,9 +25818,21 @@ TemplateModel x = env.getVariable("x");  // get variable x</programlisting>
 
           <itemizedlist>
             <listitem>
-              <para><emphasis role="strong">Attention!</emphasis> Raised
-              minimum required Java version from 1.4 to 1.5 (aka. Java
-              5)</para>
+              <para><emphasis role="strong">Attention!</emphasis> FreeMarker
+              now requires at least 1.5 (aka. Java 5). 2.3.24 has only
+              required Java 1.4. (Reason: Without this, new public API-s
+              couldn't use generics, which affect negatively the majority of
+              users, while old installations that are still using 1.4 are
+              unlikely to update FreeMarker anyway.)</para>
+            </listitem>
+
+            <listitem>
+              <para><emphasis>Attention!</emphasis> FreeMarker's JSP support
+              (if it's used) now requires at least JSP 2.0. Earlier it only
+              required JSP 1.1. (Reason: The <literal>jsp-api</literal>
+              dependency for JSP 1.x, which was needed for building, can't be
+              legally present in the Maven Central Repository, nor be provided
+              by freemarker.org.)</para>
             </listitem>
 
             <listitem>
@@ -36213,7 +36211,7 @@ TemplateModel x = env.getVariable("x");  // get variable x</programlisting>
         </listitem>
 
         <listitem>
-          <para>For the custom JSP taglib support, you will need JSP 1.2 API
+          <para>For the custom JSP taglib support, you will need JSP 2.0 API
           or later avilable. No JSP implementation is needed, just the API.
           This is already present in pretty much every servlet container. For
           more information please see <link linkend="pgui_misc_servlet">the
@@ -36221,7 +36219,8 @@ TemplateModel x = env.getVariable("x");  // get variable x</programlisting>
         </listitem>
 
         <listitem>
-          <para>Jython classes are needed for the Jython wrapper.</para>
+          <para>Jython 2.0 or later classes are needed for the Jython
+          wrapper.</para>
         </listitem>
 
         <listitem>


Mime
View raw message