[ 
https://issues.apache.org/jira/browse/SLING-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529745
 ] 

Felix Meschberger commented on SLING-20:
----------------------------------------

The problem actually is, that the servlet-api 2.3 contains two jsp packages, 
which IIRC are JSP 1.2 while the JSP compiler supplied in the 
sling-jasper-sling bundle is JSP 2.0 and expects more methods in the JSP 
packages. As the servlet bundle is loaded earlier than the JSP API bundle and 
the JSP packages in the servlet bundle are tagged with the wrong version, the 
servlet bundle's jsp packages are used instead of the JSP API bundle packages 
...

Fixed sling-app project to refer to servlet-api 2.4.0-0002-SNAPSHOT (also have 
deployed the respective snapshot in the felix project) in Rev. 578576.



> jsp scripting depends on servlet api 2.4 but the 2.3 version is declared in 
> the parent pom
> ------------------------------------------------------------------------------------------
>
>                 Key: SLING-20
>                 URL: https://issues.apache.org/jira/browse/SLING-20
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Edgar Poce
>            Assignee: Felix Meschberger
>            Priority: Minor
>
> Jsp scripting doesn't work out of the box because sling app includes the 
> servlet 2.3 osgi bundle. With the current configuration the servlet 2.4 
> bundle must be deployed later and the server must be restarted because the 
> jsp scripting bundle keeps bound to the 2.3 version.
> proposed patch
> Index: /home/epoce/hd2/projects/sling/trunk/parent/pom.xml
> ===================================================================
> --- /home/epoce/hd2/projects/sling/trunk/parent/pom.xml       (revision 
> 578464)
> +++ /home/epoce/hd2/projects/sling/trunk/parent/pom.xml       (working copy)
> @@ -366,7 +366,13 @@
>              <dependency>
>                  <groupId>javax.servlet</groupId>
>                  <artifactId>servlet-api</artifactId>
> -                <version>2.3</version>
> +                <version>2.4</version>
> +                <scope>provided</scope>
> +            </dependency>
> +            <dependency>
> +                <groupId>javax.servlet</groupId>
> +                <artifactId>jsp-api</artifactId>
> +                <version>2.0</version>
>                  <scope>provided</scope>
>              </dependency>
>  
> Index: /home/epoce/hd2/projects/sling/trunk/sling-app/pom.xml
> ===================================================================
> --- /home/epoce/hd2/projects/sling/trunk/sling-app/pom.xml    (revision 
> 578464)
> +++ /home/epoce/hd2/projects/sling/trunk/sling-app/pom.xml    (working copy)
> @@ -207,7 +207,7 @@
>          <dependency>
>              <groupId>org.apache.felix.commons</groupId>
>              <artifactId>org.apache.felix.commons.servlet-api</artifactId>
> -            <version>2.3.0-0001-SNAPSHOT</version>
> +            <version>2.4.0-0002-SNAPSHOT</version>
>          </dependency>
>          <dependency>
>              <groupId>org.apache.sling</groupId>
> Index: /home/epoce/hd2/projects/sling/trunk/scripting-jsp-taglib/pom.xml
> ===================================================================
> --- /home/epoce/hd2/projects/sling/trunk/scripting-jsp-taglib/pom.xml 
> (revision 578464)
> +++ /home/epoce/hd2/projects/sling/trunk/scripting-jsp-taglib/pom.xml 
> (working copy)
> @@ -104,6 +104,10 @@
>              <artifactId>servlet-api</artifactId>
>          </dependency>
>          <dependency>
> +            <groupId>javax.servlet</groupId>
> +            <artifactId>jsp-api</artifactId>
> +        </dependency>
> +        <dependency>
>              <groupId>commons-collections</groupId>
>              <artifactId>commons-collections</artifactId>
>          </dependency>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to