You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Achim Hügen (JIRA)" <de...@myfaces.apache.org> on 2007/08/01 11:23:53 UTC

[jira] Created: (MYFACES-1693) Make JSP 2.1 optional

Make JSP 2.1 optional 
----------------------

                 Key: MYFACES-1693
                 URL: https://issues.apache.org/jira/browse/MYFACES-1693
             Project: MyFaces Core
          Issue Type: Improvement
          Components: JSR-252
    Affects Versions:  1.2.0
            Reporter: Achim Hügen


Myfaces 1.2.0 requires JSP 2.1 to be present. Otherwise the StartupServletContextListener fails with this error:

Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
        at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
        at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57) 

JSP version 2.1 or better JSP in general should be an optional dependency, like discussed here and implemented in Sun RI too:
http://www.nabble.com/Does-MyFaces-1.2-require-JSP-2.1--tf4112432.html#a11693501

Use cases: 
- Run Myfaces 1.2.0 in JEE 1.4 environment (Tomcat 5.x). 
- Easier setup and smaller distributions when running Myfaces in an embedded servlet container (jetty) with facelets. For example I'm using jetty for junit tests. I haven't found a working setup which solves the jsp problems.






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


[jira] Commented: (MYFACES-1693) Make JSP 2.1 optional

Posted by "Bernhard Huemer (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520540 ] 

Bernhard Huemer commented on MYFACES-1693:
------------------------------------------

I'll attach a patch whitch enables you to run MyFaces in a J2EE 1.4 environment using facelets. There's only two things you have to do: Provide a context-param that specifies the ExpressionFactory implementation of your EL implementation (for example, "com.sun.el.ExpressionFactoryImpl", if you're using the el-ri) and provide the EL implementation itself as it's not part of the container (for example, when using maven you have to declare an additional dependency). Actually, if you're using the Tomcat EL implementation or Sun's RI, you don't have to specify the ExpressionFactory implementation (i.e. there is no need for an additional context-param if you're using a common EL implementation). 

Additionally, I'll attach a small sample application (in fact it's quite inane) that demonstrates how to use MyFaces in a J2EE 1.4 environment. I've tested my patch using the facelets-demos (hangman and numberguess, see https://facelets.dev.java.net/). I'd appreciate if someone else tests my patch (other feedback is also welcome), but if you encounter problems, you'll have to be patient as I'm occupied for the next three days. 



> Make JSP 2.1 optional 
> ----------------------
>
>                 Key: MYFACES-1693
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1693
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-252
>    Affects Versions:  1.2.0
>            Reporter: Achim Hügen
>
> Myfaces 1.2.0 requires JSP 2.1 to be present. Otherwise the StartupServletContextListener fails with this error:
> Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
> java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
>         at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
>         at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57) 
> JSP version 2.1 or better JSP in general should be an optional dependency, like discussed here and implemented in Sun RI too:
> http://www.nabble.com/Does-MyFaces-1.2-require-JSP-2.1--tf4112432.html#a11693501
> Use cases: 
> - Run Myfaces 1.2.0 in JEE 1.4 environment (Tomcat 5.x). 
> - Easier setup and smaller distributions when running Myfaces in an embedded servlet container (jetty) with facelets. For example I'm using jetty for junit tests. I haven't found a working setup which solves the jsp problems.

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


[jira] Resolved: (MYFACES-1693) Make JSP 2.1 optional

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf resolved MYFACES-1693.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.1-SNAPSHOT

Thanks to Bernhard Huemer for providing the patch

> Make JSP 2.1 optional 
> ----------------------
>
>                 Key: MYFACES-1693
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1693
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-252
>    Affects Versions:  1.2.0
>            Reporter: Achim Hügen
>             Fix For: 1.2.1-SNAPSHOT
>
>         Attachments: facelets-jsf12-debug.zip, MYFACES-1693.patch
>
>
> Myfaces 1.2.0 requires JSP 2.1 to be present. Otherwise the StartupServletContextListener fails with this error:
> Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
> java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
>         at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
>         at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57) 
> JSP version 2.1 or better JSP in general should be an optional dependency, like discussed here and implemented in Sun RI too:
> http://www.nabble.com/Does-MyFaces-1.2-require-JSP-2.1--tf4112432.html#a11693501
> Use cases: 
> - Run Myfaces 1.2.0 in JEE 1.4 environment (Tomcat 5.x). 
> - Easier setup and smaller distributions when running Myfaces in an embedded servlet container (jetty) with facelets. For example I'm using jetty for junit tests. I haven't found a working setup which solves the jsp problems.

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


[jira] Commented: (MYFACES-1693) Make JSP 2.1 optional

Posted by "Bernhard Huemer (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585411#action_12585411 ] 

Bernhard Huemer commented on MYFACES-1693:
------------------------------------------

Note that you can't use JSP 2.0 (or lower), you have to use Facelets if you're running MyFaces 1.2.x in a J2EE 1.4 environment.

> Make JSP 2.1 optional 
> ----------------------
>
>                 Key: MYFACES-1693
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1693
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-252
>    Affects Versions:  1.2.0
>            Reporter: Achim Hügen
>             Fix For: 1.2.2
>
>         Attachments: facelets-jsf12-debug.zip, MYFACES-1693.patch
>
>
> Myfaces 1.2.0 requires JSP 2.1 to be present. Otherwise the StartupServletContextListener fails with this error:
> Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
> java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
>         at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
>         at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57) 
> JSP version 2.1 or better JSP in general should be an optional dependency, like discussed here and implemented in Sun RI too:
> http://www.nabble.com/Does-MyFaces-1.2-require-JSP-2.1--tf4112432.html#a11693501
> Use cases: 
> - Run Myfaces 1.2.0 in JEE 1.4 environment (Tomcat 5.x). 
> - Easier setup and smaller distributions when running Myfaces in an embedded servlet container (jetty) with facelets. For example I'm using jetty for junit tests. I haven't found a working setup which solves the jsp problems.

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


[jira] Issue Comment Edited: (MYFACES-1693) Make JSP 2.1 optional

Posted by "Bernhard Huemer (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520540 ] 

bhuemer edited comment on MYFACES-1693 at 8/20/07 6:44 AM:
-------------------------------------------------------------------

I'll attach a patch which enables you to run MyFaces in a J2EE 1.4 environment using facelets. There's only two things you have to do: Provide a context-param that specifies the ExpressionFactory implementation of your EL implementation (for example, "com.sun.el.ExpressionFactoryImpl", if you're using the el-ri) and provide the EL implementation itself as it's not part of the container (for example, when using maven you have to declare an additional dependency). Actually, if you're using the Tomcat EL implementation or Sun's RI, you don't have to specify the ExpressionFactory implementation (i.e. there is no need for an additional context-param if you're using a common EL implementation). 

Additionally, I'll attach a small sample application (in fact it's quite inane) that demonstrates how to use MyFaces in a J2EE 1.4 environment. I've tested my patch using the facelets-demos (hangman and numberguess, see https://facelets.dev.java.net/). I'd appreciate if someone else tests my patch (other feedback is also welcome), but if you encounter problems, you'll have to be patient as I'm occupied for the next three days. 



      was (Author: bhuemer):
    I'll attach a patch whitch enables you to run MyFaces in a J2EE 1.4 environment using facelets. There's only two things you have to do: Provide a context-param that specifies the ExpressionFactory implementation of your EL implementation (for example, "com.sun.el.ExpressionFactoryImpl", if you're using the el-ri) and provide the EL implementation itself as it's not part of the container (for example, when using maven you have to declare an additional dependency). Actually, if you're using the Tomcat EL implementation or Sun's RI, you don't have to specify the ExpressionFactory implementation (i.e. there is no need for an additional context-param if you're using a common EL implementation). 

Additionally, I'll attach a small sample application (in fact it's quite inane) that demonstrates how to use MyFaces in a J2EE 1.4 environment. I've tested my patch using the facelets-demos (hangman and numberguess, see https://facelets.dev.java.net/). I'd appreciate if someone else tests my patch (other feedback is also welcome), but if you encounter problems, you'll have to be patient as I'm occupied for the next three days. 


  
> Make JSP 2.1 optional 
> ----------------------
>
>                 Key: MYFACES-1693
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1693
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-252
>    Affects Versions:  1.2.0
>            Reporter: Achim Hügen
>         Attachments: facelets-jsf12-debug.zip, MYFACES-1693.patch
>
>
> Myfaces 1.2.0 requires JSP 2.1 to be present. Otherwise the StartupServletContextListener fails with this error:
> Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
> java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
>         at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
>         at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57) 
> JSP version 2.1 or better JSP in general should be an optional dependency, like discussed here and implemented in Sun RI too:
> http://www.nabble.com/Does-MyFaces-1.2-require-JSP-2.1--tf4112432.html#a11693501
> Use cases: 
> - Run Myfaces 1.2.0 in JEE 1.4 environment (Tomcat 5.x). 
> - Easier setup and smaller distributions when running Myfaces in an embedded servlet container (jetty) with facelets. For example I'm using jetty for junit tests. I haven't found a working setup which solves the jsp problems.

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


[jira] Commented: (MYFACES-1693) Make JSP 2.1 optional

Posted by "Mohamed Thowbick (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585383#action_12585383 ] 

Mohamed Thowbick commented on MYFACES-1693:
-------------------------------------------

I am trying to use myfaces-1.2.2 with weblogic 9.2 in windows XP. I have done everthing as stated here to configure myfaces 1.2.2 for JSP 2.1 compliance as optional. But when i tried to access the jsf page of my applicaion which uses tree menu control, i got the following error in my log and its showing blank page.

11:37:41,537 ERROR _ErrorPageWriter:350 - An exception occurred
javax.faces.FacesException: Failed to compile JSP /jsp/reports/emptyReportFrame.jsp
emptyReportFrame.jsp:10:24: No conversion available for the type "javax.el.ValueExpression".
			<h:outputText value="&lt;=== Please select a Report on the left.  Note: Only reports marked with (*) are currently available"/>
                                            ^-------------------------------------------------------------------------------------------------------^

Did anyone faced this before? Did i miss out anything.

Please help me to get out of this.


> Make JSP 2.1 optional 
> ----------------------
>
>                 Key: MYFACES-1693
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1693
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-252
>    Affects Versions:  1.2.0
>            Reporter: Achim Hügen
>             Fix For: 1.2.2
>
>         Attachments: facelets-jsf12-debug.zip, MYFACES-1693.patch
>
>
> Myfaces 1.2.0 requires JSP 2.1 to be present. Otherwise the StartupServletContextListener fails with this error:
> Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
> java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
>         at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
>         at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57) 
> JSP version 2.1 or better JSP in general should be an optional dependency, like discussed here and implemented in Sun RI too:
> http://www.nabble.com/Does-MyFaces-1.2-require-JSP-2.1--tf4112432.html#a11693501
> Use cases: 
> - Run Myfaces 1.2.0 in JEE 1.4 environment (Tomcat 5.x). 
> - Easier setup and smaller distributions when running Myfaces in an embedded servlet container (jetty) with facelets. For example I'm using jetty for junit tests. I haven't found a working setup which solves the jsp problems.

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


[jira] Commented: (MYFACES-1693) Make JSP 2.1 optional

Posted by "Achim Hügen (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521416 ] 

Achim Hügen commented on MYFACES-1693:
--------------------------------------

Thank you very much for the quick work. 
It's working in my environment too.

I hope that you can combine it with MYFACES-1694. The solution proposed there bases on the DefaultFacesInitializer class which has been replaced by Jsp21FacesInitializer and Jsp20FacesInitializer which makes a generic solution more difficult. Please see my comments over there.

> Make JSP 2.1 optional 
> ----------------------
>
>                 Key: MYFACES-1693
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1693
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-252
>    Affects Versions:  1.2.0
>            Reporter: Achim Hügen
>         Attachments: facelets-jsf12-debug.zip, MYFACES-1693.patch
>
>
> Myfaces 1.2.0 requires JSP 2.1 to be present. Otherwise the StartupServletContextListener fails with this error:
> Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
> java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
>         at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
>         at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57) 
> JSP version 2.1 or better JSP in general should be an optional dependency, like discussed here and implemented in Sun RI too:
> http://www.nabble.com/Does-MyFaces-1.2-require-JSP-2.1--tf4112432.html#a11693501
> Use cases: 
> - Run Myfaces 1.2.0 in JEE 1.4 environment (Tomcat 5.x). 
> - Easier setup and smaller distributions when running Myfaces in an embedded servlet container (jetty) with facelets. For example I'm using jetty for junit tests. I haven't found a working setup which solves the jsp problems.

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