You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Thomas Andraschko <zo...@googlemail.com> on 2012/07/25 14:15:59 UTC

Cannot reset buffer after response has been committed && JspViewDeclarationLanguageStrategy

Hi,

i get following error if i try to open a page, which does not exist:
Cannot reset buffer after response has been committed

As far as i can see, the JspViewDeclarationLanguageStrategy handles the
"null" viewId and if i return "false" in #isHandle, it works without
problems.
Why JspViewDeclarationLanguageStrategy handles also the "null" viewId?

I looked at the code and org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL should
disable the JspViewDeclarationLanguageStrategy, right?
If i set this context param to false, i get follwing exception on startup:
An error occured while initializing MyFaces: No javax.el.ExpressionFactory
found. Please provide <context-param> in web.xml:
org.apache.myfaces.EXPRESSION_FACTORY

Why is it required to manually set the ExpressionFactory? We use Jetty on
localhost and JUEL/Tomcat on our servers.

Thanks!
Thomas

Re: Cannot reset buffer after response has been committed && JspViewDeclarationLanguageStrategy

Posted by Leonardo Uribe <lu...@gmail.com>.
Hi

TA >> i get following error if i try to open a page, which does not exist:
TA >> Cannot reset buffer after response has been committed
TA >>>>
TA >> As far as i can see, the JspViewDeclarationLanguageStrategy handles the
TA >> "null" viewId and if i return "false" in #isHandle, it works without
TA >> problems.
TA >> Why JspViewDeclarationLanguageStrategy handles also the "null" viewId?

There are some compatibility tests that requires this behavior.
Anyway, it is always necessary set a viewId for a valid view.

2012/7/25 Thomas Andraschko <zo...@googlemail.com>:
TA >> I created an issue after analzing the original problem:
TA >> https://issues.apache.org/jira/browse/MYFACES-3587
TA >>
TA >> Should i also create an issue because disable SUPPORT_JSP_AND_FACES_EL
TA >> requires to set the EXPRESSION_FACTORY? Or is it be design?

When JSP is enabled, facelets can take the ExpressionFactory
implementation from it, but when it is disabled, it is necessary to
indicate which one is used, because there is no algorithm to scan for
ExpressionFactory implementations.

TA >> Ah, sorry! I got another exception now:
TA >>
TA >> javax.faces.FacesException: Cannot find a valid PDL for view id null.
TA >>
TA >> So the third question is, isn't there any viewId == null check?

There is no check for null in that part, by compatibility reasons, so
even if a check is reasonable we can't include it. The exception is
correct.

regards,

Leonardo Uribe

Re: Cannot reset buffer after response has been committed && JspViewDeclarationLanguageStrategy

Posted by Thomas Andraschko <zo...@googlemail.com>.
I created an issue after analzing the original problem:
https://issues.apache.org/jira/browse/MYFACES-3587

Should i also create an issue because disable SUPPORT_JSP_AND_FACES_EL
requires to set the EXPRESSION_FACTORY? Or is it be design?

2012/7/25 Thomas Andraschko <zo...@googlemail.com>

> Ah, sorry! I got another exception now:
>
> javax.faces.FacesException: Cannot find a valid PDL for view id null.
>
> So the third question is, isn't there any viewId == null check?
>
>
> 2012/7/25 Thomas Andraschko <zo...@googlemail.com>
>
>> Hi,
>>
>> i get following error if i try to open a page, which does not exist:
>> Cannot reset buffer after response has been committed
>>
>> As far as i can see, the JspViewDeclarationLanguageStrategy handles the
>> "null" viewId and if i return "false" in #isHandle, it works without
>> problems.
>> Why JspViewDeclarationLanguageStrategy handles also the "null" viewId?
>>
>> I looked at the code and org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
>> should disable the JspViewDeclarationLanguageStrategy, right?
>> If i set this context param to false, i get follwing exception on startup:
>> An error occured while initializing MyFaces: No
>> javax.el.ExpressionFactory found. Please provide <context-param> in
>> web.xml: org.apache.myfaces.EXPRESSION_FACTORY
>>
>> Why is it required to manually set the ExpressionFactory? We use Jetty on
>> localhost and JUEL/Tomcat on our servers.
>>
>> Thanks!
>> Thomas
>>
>>
>>
>>
>

Re: Cannot reset buffer after response has been committed && JspViewDeclarationLanguageStrategy

Posted by Thomas Andraschko <zo...@googlemail.com>.
Ah, sorry! I got another exception now:

javax.faces.FacesException: Cannot find a valid PDL for view id null.

So the third question is, isn't there any viewId == null check?

2012/7/25 Thomas Andraschko <zo...@googlemail.com>

> Hi,
>
> i get following error if i try to open a page, which does not exist:
> Cannot reset buffer after response has been committed
>
> As far as i can see, the JspViewDeclarationLanguageStrategy handles the
> "null" viewId and if i return "false" in #isHandle, it works without
> problems.
> Why JspViewDeclarationLanguageStrategy handles also the "null" viewId?
>
> I looked at the code and org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
> should disable the JspViewDeclarationLanguageStrategy, right?
> If i set this context param to false, i get follwing exception on startup:
> An error occured while initializing MyFaces: No javax.el.ExpressionFactory
> found. Please provide <context-param> in web.xml:
> org.apache.myfaces.EXPRESSION_FACTORY
>
> Why is it required to manually set the ExpressionFactory? We use Jetty on
> localhost and JUEL/Tomcat on our servers.
>
> Thanks!
> Thomas
>
>
>
>