Generic value for org.apache.myfaces.EXPRESSION_FACTORY?

2014-03-27 Thread Felipe Jaekel
I was trying o set org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL to false.
The goal is to improve performance and solve the problem I mentioned
here,
but I was getting this error: HTTP Status 500 - No Factories configured for
this Application.

After a lot of search I found this
post,
where it's mentioned that I would need to
set org.apache.myfaces.EXPRESSION_FACTORY. I think MyFaces documentation is
great, much better than Mojarra's, but shouldn't be a note about this
here
?

Anyway, as I'm using Tomcat, I configured
org.apache.myfaces.EXPRESSION_FACTORY
with org.apache.el.ExpressionFactoryImpl. Its working fine, but I didn't
wan't to make my webapp Tomcat dependent, so is there a MyFaces class that
can delegate to the appropriated container class?

Thanks


How to disable label warnings?

2014-03-27 Thread Felipe Jaekel
I'd like to disable label warnings like this: Advertência: Attribute 'for'
of label component with id form:j_id_8n is not defined

Searching google I saw some mentioning that changing the project stage to
production would solve. Others mentioned that creating a logging.properties
file with org.apache.myfaces.shared.renderkit.html.HtmlLabelRenderer.level
= SEVERE would do the trick.

I tried both without success.

Any ideas?

Thanks


Re: How to disable label warnings?

2014-03-28 Thread Felipe Jaekel
I'm migrating from Mojarra to MyFaces, so there lots of labels with missing
for attribute. I can't refactor everything now, so I'd like to disable
debug at least in production, because it's polluting my server log files.

I'll attach my web.xml (project stage is configured in the global web.xml
from tomcat, but I also tested locally to make sure)

Thanks


http://java.sun.com/xml/ns/javaee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
>
Área do Cliente

 
 
javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE
 true


 javax.faces.FACELETS_SKIP_COMMENTS
true
 
 
 
primefaces.SUBMIT
partial
 

primefaces.THEME
 redmond


 primefaces.UPLOADER
commons
 
 

 org.apache.myfaces.COMPRESS_STATE_IN_SESSION
false
 

org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
 false

 
org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
 false

 
org.apache.myfaces.EXPRESSION_FACTORY
org.apache.el.ExpressionFactoryImpl
 
 
 PrimeFaces FileUpload Filter
org.primefaces.webapp.filter.FileUploadFilter
 
thresholdSize
1048576
 


 PrimeFaces FileUpload Filter
facesServlet
 
 
 br.com.spdata.persistence.FirebirdListener

 
facesServlet
 javax.faces.webapp.FacesServlet
1
 

facesServlet
 *.jsf

  
15
 
 
 page/comunicados.jsf

 
java.lang.Throwable
/template/error.jsf
 

404
 /template/notFound.jsf



Restrict raw XHTML Documents
 
XHTML
*.xhtml
 






2014-03-27 18:43 GMT-03:00 Karl Kildén :

> Hrmm this is the debug logging from development mode right? You are
> supposed to fix the problems and not change the logging properties. The
> logging is very useful for development.
>
> Paste web.xml contents.
>
>
>
>
>
>
> On 27 March 2014 22:04, Felipe Jaekel  wrote:
>
> > I'd like to disable label warnings like this: Advertência: Attribute
> 'for'
> > of label component with id form:j_id_8n is not defined
> >
> > Searching google I saw some mentioning that changing the project stage to
> > production would solve. Others mentioned that creating a
> logging.properties
> > file with
> org.apache.myfaces.shared.renderkit.html.HtmlLabelRenderer.level
> > = SEVERE would do the trick.
> >
> > I tried both without success.
> >
> > Any ideas?
> >
> > Thanks
> >
>


DefaultContextAwareELException serialization problem

2014-04-04 Thread Felipe Jaekel
I'm eventually seeing this in my Tomcat 7 logs: *IOException while loading
persisted sessions: java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.apache.myfaces.view.facelets.el.DefaultContextAwareELException.*

I'm using MyFaces 2.2.2. Shouldn't DefaultContextAwareELException be
serializable?

Thanks

*Full stackTrace:*
Abr 04, 2014 10:35:50 AM org.apache.catalina.session.StandardManager doLoad
Grave: IOException while loading persisted sessions:
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.apache.myfaces.view.facelets.el.DefaultContextAwareELException
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.apache.myfaces.view.facelets.el.DefaultContextAwareELException
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1354)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
 at
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1595)
at
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1060)
 at
org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:282)
at
org.apache.catalina.session.StandardManager.load(StandardManager.java:202)
 at
org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:489)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5476)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3988)
at
org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425)
 at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
 at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
 at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.io.NotSerializableException:
org.apache.myfaces.view.facelets.el.DefaultContextAwareELException
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
 at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
 at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
 at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
 at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
 at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1671)
 at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1077)
at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:430)
 at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:351)
at
org.apache.catalina.session.StandardManager.stopInternal(StandardManager.java:516)
 at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at
org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5655)
 at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3981)
 ... 7 more

Abr 04, 2014 10:35:50 AM org.apache.catalina.session.StandardManager
startInternal
Grave: Exception loading sessions from persistent storage
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.apache.myfaces.view.facelets.el.DefaultContextAwareELException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1354)
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialD

Re: DefaultContextAwareELException serialization problem

2014-04-09 Thread Felipe Jaekel
Thanks for the feedback.

I have an exception handler similar to this
http://ovaraksin.blogspot.com.br/2010/10/global-handling-of-all-unchecked.html,
where the exception is stored in the session.

I realized I could handle the exception without storing it in the session,
so the problem is gone.


2014-04-04 11:42 GMT-03:00 Leonardo Uribe :

> Hi
>
> An exception shouldn't be serializable. I can't find any line of code in
> MyFaces
> that serialize and exception, so I suppose you are doing it manually
> somehow.
>
> regards,
>
> Leonardo
>
> 2014-04-04 15:43 GMT+02:00 Felipe Jaekel :
> > I'm eventually seeing this in my Tomcat 7 logs: *IOException while
> loading
> > persisted sessions: java.io.WriteAbortedException: writing aborted;
> > java.io.NotSerializableException:
> > org.apache.myfaces.view.facelets.el.DefaultContextAwareELException.*
> >
> > I'm using MyFaces 2.2.2. Shouldn't DefaultContextAwareELException be
> > serializable?
> >
> > Thanks
> >
> > *Full stackTrace:*
> > Abr 04, 2014 10:35:50 AM org.apache.catalina.session.StandardManager
> doLoad
> > Grave: IOException while loading persisted sessions:
> > java.io.WriteAbortedException: writing aborted;
> > java.io.NotSerializableException:
> > org.apache.myfaces.view.facelets.el.DefaultContextAwareELException
> > java.io.WriteAbortedException: writing aborted;
> > java.io.NotSerializableException:
> > org.apache.myfaces.view.facelets.el.DefaultContextAwareELException
> >  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1354)
> > at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
> >  at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
> > at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
> >  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
> > at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
> >  at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
> > at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
> >  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
> > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
> >  at
> >
> org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1595)
> > at
> >
> org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1060)
> >  at
> >
> org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:282)
> > at
> >
> org.apache.catalina.session.StandardManager.load(StandardManager.java:202)
> >  at
> >
> org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:489)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> >  at
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5476)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> >  at
> >
> org.apache.catalina.core.StandardContext.reload(StandardContext.java:3988)
> > at
> >
> org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425)
> >  at
> >
> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)
> > at
> >
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
> >  at
> >
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
> > at
> >
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
> >  at
> >
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
> > at java.lang.Thread.run(Thread.java:744)
> > Caused by: java.io.NotSerializableException:
> > org.apache.myfaces.view.facelets.el.DefaultContextAwareELException
> > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
> >  at
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> > at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
> >  at
> >
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> >  at
> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> > at
> java.io.ObjectOutputStream.writeSerialData(ObjectOu

Re: Generic value for org.apache.myfaces.EXPRESSION_FACTORY?

2014-04-09 Thread Felipe Jaekel
Is it reliable? Are there any migration notes?

Thanks


2014-03-27 19:37 GMT-03:00 Howard W. Smith, Jr. :

> On Thu, Mar 27, 2014 at 8:22 AM, Thomas Andraschko <
> andraschko.tho...@gmail.com> wrote:
>
> > I just deliver JUEL in all my apps and setting the EXPRESSION_FACTORY to
> > JUEL.
> >
>
> +1 me too.
>
> 
> org.apache.myfaces.EXPRESSION_FACTORY
> de.odysseus.el.ExpressionFactoryImpl
> 
>
> 
> org.apache.myfaces.EL_RESOLVER_COMPARATOR
>
>
> org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator
> 
>
> 
>
> org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
> false
> 
>


ViewExpiredException, but session hasn't timed out

2014-04-09 Thread Felipe Jaekel
I'm getting view expired exceptions if the user tries to perform an action
in a page that isn't fully loaded.

javax.faces.application.ViewExpiredException: /page/plano/plano.jsfNo
saved view state could be found for the view identifier:
/page/plano/plano.jsf
at 
org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:181)


Looking at RestoreViewExceutor source code we have this:


if (facesContext.getResponseComplete())
{
// If the view handler cannot restore the view
and the response
// is complete, it can be an error or some
logic in restoreView.
return true;
}
else
{
// If the return from
ViewHandler.restoreView() is null, throw a ViewExpiredException with
an
// appropriate error message.
throw new ViewExpiredException("No saved view
state could be found for the view identifier: " + viewId, viewId);
}
}


Page hasn't fully loaded yet, so facesContext.getResponseComplete() is
returning false, but isn't there a way to avoid this? Page gets unusable
after the VEE is thrown.


Thanks in advance,

Phillip


Full stackTrace:

javax.faces.application.ViewExpiredException: /page/plano/plano.jsfNo
saved view state could be found for the view identifier:
/page/plano/plano.jsf
at 
org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:181)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:98)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at 
org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at 
org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at 
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at 
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at 
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at 
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at 
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at 
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at 
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at 
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at 
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at 
com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at 

Re: ViewExpiredException, but session hasn't timed out

2014-04-10 Thread Felipe Jaekel
It's necessary to have a slow internet connection to reproduce this, so I
can't test locally. While the page is loading the user hits a command
button. As the page is still loading, I guess the view state is not created
yet, so viewHandler.restoreView(facesContext, viewId) returns null.

Thanks for the suggestion. I'll give it try, but according to the component
documentation, using it for this case feels more like a workaround than a
solution, so I'd like to see if there are more options.


2014-04-09 14:48 GMT-03:00 Howard W. Smith, Jr. :

> Wow, you're using Shiro.
>
> Would be nice to have a list of steps how you duplicate this in your app,
> definitely and always.
>
> I definitely suggest you use OmniFaces restore view component to avoid this
> exception.
>  On Apr 9, 2014 1:41 PM, "Felipe Jaekel"  wrote:
>
> > I'm getting view expired exceptions if the user tries to perform an
> action
> > in a page that isn't fully loaded.
> >
> > javax.faces.application.ViewExpiredException: /page/plano/plano.jsfNo
> > saved view state could be found for the view identifier:
> > /page/plano/plano.jsf
> > at
> >
> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:181)
> >
> >
> > Looking at RestoreViewExceutor source code we have this:
> >
> >
> > if (facesContext.getResponseComplete())
> > {
> > // If the view handler cannot restore the view
> > and the response
> > // is complete, it can be an error or some
> > logic in restoreView.
> > return true;
> > }
> > else
> > {
> > // If the return from
> > ViewHandler.restoreView() is null, throw a ViewExpiredException with
> > an
> > // appropriate error message.
> > throw new ViewExpiredException("No saved view
> > state could be found for the view identifier: " + viewId, viewId);
> > }
> > }
> >
> >
> > Page hasn't fully loaded yet, so facesContext.getResponseComplete() is
> > returning false, but isn't there a way to avoid this? Page gets unusable
> > after the VEE is thrown.
> >
> >
> > Thanks in advance,
> >
> > Phillip
> >
> >
> > Full stackTrace:
> >
> > javax.faces.application.ViewExpiredException: /page/plano/plano.jsfNo
> > saved view state could be found for the view identifier:
> > /page/plano/plano.jsf
> > at
> >
> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:181)
> > at
> >
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
> > at
> >
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
> > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > at
> >
> org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:98)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > at
> > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > at
> >
> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
> > at
> >
> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
> > at
> >
> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
> > at
> >
> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
> > at
> >
> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
> > at
> >
&

Re: ViewExpiredException, but session hasn't timed out

2014-04-10 Thread Felipe Jaekel
Done: https://issues.apache.org/jira/browse/MYFACES-3880

Thanks


2014-04-10 12:16 GMT-03:00 Leonardo Uribe :

> Hi
>
> I see, now I get it. By default MyFaces always renders the view state
> field at the form end. To solve your problem, you need to render it at
> the beginning of the form.
>
> JSF spec javadoc for h:form says this:
>
> "... Call ViewHandler.writeState() before the the close of the "form"
> element. Render all the necessary hidden fields for all commandLink
> instances in the page just before the close of the "form" element.
> ..."
>
> What happen if we call it at the beginning of the form? there is a
> buffer that takes the response to inject the view state token before
> the end of the request, so you'll get an small increase of memory
> usage if you are using client side state saving, but besides that
> nothing else. This is an improvement/new feature, not a bug, so please
> create an issue in MyFaces issue tracker as improvement.
>
> regards,
>
> Leonardo
>
>
>
> 2014-04-10 14:05 GMT+02:00 Felipe Jaekel :
> > It's necessary to have a slow internet connection to reproduce this, so I
> > can't test locally. While the page is loading the user hits a command
> > button. As the page is still loading, I guess the view state is not
> created
> > yet, so viewHandler.restoreView(facesContext, viewId) returns null.
> >
> > Thanks for the suggestion. I'll give it try, but according to the
> component
> > documentation, using it for this case feels more like a workaround than a
> > solution, so I'd like to see if there are more options.
> >
> >
> > 2014-04-09 14:48 GMT-03:00 Howard W. Smith, Jr.  >:
> >
> >> Wow, you're using Shiro.
> >>
> >> Would be nice to have a list of steps how you duplicate this in your
> app,
> >> definitely and always.
> >>
> >> I definitely suggest you use OmniFaces restore view component to avoid
> this
> >> exception.
> >>  On Apr 9, 2014 1:41 PM, "Felipe Jaekel"  wrote:
> >>
> >> > I'm getting view expired exceptions if the user tries to perform an
> >> action
> >> > in a page that isn't fully loaded.
> >> >
> >> > javax.faces.application.ViewExpiredException: /page/plano/plano.jsfNo
> >> > saved view state could be found for the view identifier:
> >> > /page/plano/plano.jsf
> >> > at
> >> >
> >>
> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:181)
> >> >
> >> >
> >> > Looking at RestoreViewExceutor source code we have this:
> >> >
> >> >
> >> > if (facesContext.getResponseComplete())
> >> > {
> >> > // If the view handler cannot restore the view
> >> > and the response
> >> > // is complete, it can be an error or some
> >> > logic in restoreView.
> >> > return true;
> >> > }
> >> > else
> >> > {
> >> > // If the return from
> >> > ViewHandler.restoreView() is null, throw a ViewExpiredException with
> >> > an
> >> > // appropriate error message.
> >> > throw new ViewExpiredException("No saved view
> >> > state could be found for the view identifier: " + viewId, viewId);
> >> > }
> >> > }
> >> >
> >> >
> >> > Page hasn't fully loaded yet, so facesContext.getResponseComplete() is
> >> > returning false, but isn't there a way to avoid this? Page gets
> unusable
> >> > after the VEE is thrown.
> >> >
> >> >
> >> > Thanks in advance,
> >> >
> >> > Phillip
> >> >
> >> >
> >> > Full stackTrace:
> >> >
> >> > javax.faces.application.ViewExpiredException: /page/plano/plano.jsfNo
> >> > saved view state could be found for the view identifier:
> >> > /page/plano/plano.jsf
> >> > at
> >> >
> >>
> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:181)
> >> > at
> >> >

Start MyFaces on demand?

2014-04-17 Thread Felipe Jaekel
I'm working in a JAX-RS project, it has a configuration page in JSP that I
would like to change to JSF.

As this page is rarely used, basically only when the project is first
deployed, I'd like to be able to start MyFaces only when this paged is
accessed to avoid unnecessary server resources consumption.

I tried to remove the the load-on-startup parameter from the FacesServlet,
but I keep seeing MyFaces output on the server startup.

Is it possible to do or I don't have to worry about resources consumption
in this case?

Thanks


PrimeFaces 4.0.14 + MyFaces 2.2.3: ClassCastException in ConfigContainer

2014-06-05 Thread Felipe Jaekel
Hi,

I'm eventually getting a ClassCastException in my production server. All
pages stop rendering and I need to reload the application to make it work
again.

Problem happens in a PrimeFaces class, but as the value is retrieved from
JSF I'd like to check here too.

Jun 05, 2014 8:06:47 AM javax.faces.component._ExternalSpecifications
isBeanValidationAvailable
Informações: MyFaces Bean Validation support enabled
Jun 05, 2014 8:06:47 AM
br.com.spdata.jsf.util.AbstractRedirectExceptionHandler log
Grave: java.lang.Boolean cannot be cast to java.lang.String
java.lang.ClassCastException: java.lang.Boolean cannot be cast to
java.lang.String
at 
org.primefaces.config.ConfigContainer.initConfigFromContextParams(ConfigContainer.java:104)
at org.primefaces.config.ConfigContainer.(ConfigContainer.java:60)
at 
org.primefaces.context.DefaultApplicationContext.(DefaultApplicationContext.java:30)
at 
org.primefaces.context.DefaultRequestContext.getApplicationContext(DefaultRequestContext.java:223)
at 
org.primefaces.util.ComponentUtils.getConverter(ComponentUtils.java:130)
at 
org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:183)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:662)
at javax.faces.component.UIInput.validate(UIInput.java:598)
at javax.faces.component.UIInput.processValidators(UIInput.java:274)
at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
at 
org.primefaces.component.panel.Panel.processValidators(Panel.java:281)
at javax.faces.component.UIForm.processValidators(UIForm.java:210)
at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
at 
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
at 
javax.faces.component.UIViewRoot._processValidatorsDefault(UIViewRoot.java:1697)
at javax.faces.component.UIViewRoot.access$600(UIViewRoot.java:77)
at 
javax.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1804)
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1653)
at 
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:909)
at 
org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:38)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
br.com.spdata.filter.FileUploadFilter.doFilter(FileUploadFilter.java:118)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
br.com.spdata.tecnico.filter.LoginFilter.doFilter(LoginFilter.java:45)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at 
org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at 
org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at 
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at 
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at 
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at 
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at 
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at 
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at 
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at 
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at 
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.catalina.core.Stan

Re: PrimeFaces 4.0.14 + MyFaces 2.2.3: ClassCastException in ConfigContainer

2014-06-05 Thread Felipe Jaekel
Thanks for the quick feedback.

I left a question in the issue tracker.


2014-06-05 10:48 GMT-03:00 Thomas Andraschko :

> Sorry, wrong URL.
> https://code.google.com/p/primefaces/issues/detail?id=6889
>
>
> 2014-06-05 15:47 GMT+02:00 Thomas Andraschko  >:
>
> > Hey,
> >
> > i fixed this in PF 5.0 ->
> > https://code.google.com/p/primefaces/issues/detail?id=688
> >
> > Regards,
> > Thomas
> >
> >
> > 2014-06-05 15:42 GMT+02:00 Felipe Jaekel :
> >
> > Hi,
> >>
> >> I'm eventually getting a ClassCastException in my production server. All
> >> pages stop rendering and I need to reload the application to make it
> work
> >> again.
> >>
> >> Problem happens in a PrimeFaces class, but as the value is retrieved
> from
> >> JSF I'd like to check here too.
> >>
> >> Jun 05, 2014 8:06:47 AM javax.faces.component._ExternalSpecifications
> >> isBeanValidationAvailable
> >> Informações: MyFaces Bean Validation support enabled
> >> Jun 05, 2014 8:06:47 AM
> >> br.com.spdata.jsf.util.AbstractRedirectExceptionHandler log
> >> Grave: java.lang.Boolean cannot be cast to java.lang.String
> >> java.lang.ClassCastException: java.lang.Boolean cannot be cast to
> >> java.lang.String
> >> at
> >>
> org.primefaces.config.ConfigContainer.initConfigFromContextParams(ConfigContainer.java:104)
> >> at
> >> org.primefaces.config.ConfigContainer.(ConfigContainer.java:60)
> >> at
> >>
> org.primefaces.context.DefaultApplicationContext.(DefaultApplicationContext.java:30)
> >> at
> >>
> org.primefaces.context.DefaultRequestContext.getApplicationContext(DefaultRequestContext.java:223)
> >> at
> >> org.primefaces.util.ComponentUtils.getConverter(ComponentUtils.java:130)
> >> at
> >>
> org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:183)
> >> at
> >> javax.faces.component.UIInput.getConvertedValue(UIInput.java:662)
> >> at javax.faces.component.UIInput.validate(UIInput.java:598)
> >> at
> >> javax.faces.component.UIInput.processValidators(UIInput.java:274)
> >> at
> >>
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
> >> at
> >>
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
> >> at
> >> org.primefaces.component.panel.Panel.processValidators(Panel.java:281)
> >> at
> javax.faces.component.UIForm.processValidators(UIForm.java:210)
> >> at
> >>
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
> >> at
> >>
> javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1457)
> >> at
> >>
> javax.faces.component.UIViewRoot._processValidatorsDefault(UIViewRoot.java:1697)
> >> at
> javax.faces.component.UIViewRoot.access$600(UIViewRoot.java:77)
> >> at
> >>
> javax.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1804)
> >> at
> javax.faces.component.UIViewRoot._process(UIViewRoot.java:1653)
> >> at
> >> javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:909)
> >> at
> >>
> org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:38)
> >> at
> >>
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
> >> at
> >>
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
> >> at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
> >> at
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> >> at
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >> at
> >>
> br.com.spdata.filter.FileUploadFilter.doFilter(FileUploadFilter.java:118)
> >> at
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> >> at
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> >> at
> >> br.com.spdata.tecnico.filter.LoginFilt

Help with java.lang.IllegalStateException: Cannot change buffer size after data has been written

2014-07-16 Thread Felipe Jaekel
Not sure if this is this a MyFaces issue, but as I don't remember having it
when my projects were running with with Mojarra, I'd like to see if you can
help me.

I'm eventually seeing this exception in my Tomcat 7.0.47 log:

java.lang.IllegalStateException: Cannot change buffer size after data
has been written
at 
org.apache.catalina.connector.ResponseFacade.setBufferSize(ResponseFacade.java:254)
at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.setResponseBufferSize(ServletExternalContextImpl.java:620)
at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.createResponseWriter(FaceletViewDeclarationLanguage.java:2241)
at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1861)
at 
org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:313)
at 
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:116)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:267)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:200)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:105)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
br.com.spdata.cliente.filter.LoginFilter.doFilter(LoginFilter.java:43)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at 
com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721)
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)


It happens in different pages, but since the exception doesn't happen in
any of my managed beans, I have no idea of what is happening.

Currently I'm using MyFaces 2.2.4, but this was happening with previous
2.2.x releases too.

Any ideas?

Thanks in advance.


Re: Help with java.lang.IllegalStateException: Cannot change buffer size after data has been written

2014-07-24 Thread Felipe Jaekel
The 64K buffer didn't worked.

Any other idea?

Thanks


2014-07-16 11:33 GMT-03:00 Howard W. Smith, Jr. :

> On Wed, Jul 16, 2014 at 7:52 AM, Felipe Jaekel  wrote:
>
> > Not sure if this is this a MyFaces issue, but as I don't remember having
> it
> > when my projects were running with with Mojarra, I'd like to see if you
> can
> > help me.
> >
> > I'm eventually seeing this exception in my Tomcat 7.0.47 log:
> >
> > java.lang.IllegalStateException: Cannot change buffer size after data
> > has been written
> > at
> >
> org.apache.catalina.connector.ResponseFacade.setBufferSize(ResponseFacade.java:254)
> >
>
> Felipe,
>
> I think I saw that error long time ago and I discussed with BalusC on/via
> OmniFaces google-code project's issue tracker.
>
> anyway, I think it was caused by the largest XHTML page in my app, which
> has hundreds of UI components (, etc...).
>
> Below, is what I saved in my web.xml per that discussion with BalusC.
>
>
> 
> 
> javax.faces.FACELETS_BUFFER_SIZE
> 65535
> 
>


Re: Old data diplayed after x minutes of inactivity

2014-08-18 Thread Felipe Jaekel
Maybe user agent is caching the result page. I use this in my main facelets
template:



 
 
 


2014-08-15 17:29 GMT-03:00 :

> First some background on our environment:
>
> We are using WebSphere 8.5..5.2  (recently migrated from WebSphere 6.1)
> Our session timeout in WebSphere is 45 minutes
> We are using CA's SiteMinder for authentication.  It's timeout is set to
> 30 minutes.
> We are using MyFaces 2.1.13 (recently migrated from MyFaces 1.1.4)
> We are still using JSPs, not Facelets
> Our STATE_SAVING_METHOD is set to Server.
>
>
> Our issue:
>
> We have a search page that takes users to a search results page displaying
> the results.   The user can then click a commandLink in the search results
> to
> get details about the specific result.As long as the user is actively
> working in our site,  everything works fine.   But, if the user is
> inactive for 10 - 15 minutes
> and then does a new search, the search results page displays the correct
> results, but when the user clicks the commandLink, the details displayed
> are
> for a previous result.We have not been able to recreate this issue in
> our test environment, but can consistently recreate it in our production
> environment.
>
> Has anyone experienced this issue?   Any tips for how to debug this type
> of issue when we can't recreate it in test?
>
> Thanks
>
>
> Kim Calvin
> Sr Systems Consultant - Web Solutions
> OneAmerica
> P.O. Box 368
> Indianapolis, IN 46206
> Phone: (317) 285-2401
> Fax:  (317) 285-7696
> kim.cal...@oneamerica.com
>
> OneAmerica companies:
> AUL | State Life | OneAmerica Securities |
> McCready and Keene | PML | AUL RMS
>
> This e-mail message is intended only for the use of the individual or
> entity to
> which the transmission is addressed. Any interception may be a violation of
> law. If you are not the intended recipient, any dissemination,
> distribution or
> copying of this e-mail is strictly prohibited. If you are not the intended
> recipient, please contact the sender by reply e-mail and destroy all
> copies of
> the document.


Re: How to investigate reasons for NullPointer and ViewExpired exceptions?

2014-10-22 Thread Felipe Jaekel
Recently I had a hard time to figure out some NPE with ViewScoped beans.

In my case some actions on the bean were not fired, so subsequent actions
ended in a NPE because required objects where not initialized. Problem was
happening only in Firefox in case the user pressed F5 after doing some
stuff on the page.

I suspected off cache handling. Adding a phase listener to add the no cache
headers solved the problem. This is the code I'm using: (don't know why but
adding the same headers on my main facelets template didn't worked)

/**
 * Desativa cache de páginas xhtml
 *
 *
http://turbomanage.wordpress.com/2006/08/08/disable-browser-caching-in-jsf/
 *
https://code.google.com/p/omnifaces/source/browse/src/org/omnifaces/filter/CacheControlFilter.java?name=1.7
 *
 * @author fjaekel
 */
public class CacheControlPhaseListener implements PhaseListener
{
private static final long serialVersionUID = 1L;

@Override
public PhaseId getPhaseId()
{
//System.out.println("response " + Formatter.formatDateTimeWithSeconds(new
Date()));
return PhaseId.RENDER_RESPONSE;
}

@Override
public void afterPhase(PhaseEvent event)
{
}

@Override
public void beforePhase(PhaseEvent event)
{
FacesContext facesContext = event.getFacesContext();

//HttpServletRequest request = (HttpServletRequest)
facesContext.getExternalContext().getRequest();
//System.out.println(request.getRequestURI());

HttpServletResponse response = (HttpServletResponse)
facesContext.getExternalContext().getResponse();
response.setHeader("Cache-Control", "no-cache,no-store,must-revalidate");
response.setDateHeader("Expires", 0);
response.setHeader("Pragma", "no-cache"); // Backwards compatibility for
HTTP 1.0.
}
}

2014-10-22 8:12 GMT-02:00 Donatas Čiukšys :

> Dear MyFaces experts,
>
>
>
> I’m using TomEE 1.7.1 Plus, MyFaces 2.2.5, PrimeFaces 4.0.21, Omnifaces
> 1.8.1, OCPSoft Rewrite 2.0.12.
>
> State saving: CLIENT; Session timeout: 60minutes; most pages are using
> @ViewScoped beans (javax.faces.view.ViewScoped); Partial state saving is
> not disabled; Encryption and compression are disabled.
>
>
>
> Production system is working in general (4 requests per second), no user
> complaints, but in logs I find these two stack traces (shown at the bottom)
> constantly (2-3 cases per day). I don’t think that there are any problem
> with MyFaces, but I seek any advice how to collect forensic info on what
> causes the stack traces below. The problems is that I cannot reproduce
> those cases on my dev machine (I try short session timeout, invalidating
> sessions, multiple tabs, …).
>
>
>
> Google says, that using state saving: CLIENT should prevent
> ViewExpiredExceptions. I double-checked, that all my ViewScoped and
> SessionScoped beans are Serializable, and use only Serializable classes.
> Yet still I get ViewExpiredException - No saved view state could be found
> for the view identifier. What could be the reasons?
>
>
>
> I’m already printing for each stack trace all the request info I can think
> of (as you see in the bottom), where could I dig for additional forensic
> info? Does MyFaces have any tracing facility?
>
>
>
> java.lang.NullPointerException: null
>
>at
> org.apache.myfaces.application.StateManagerImpl.restoreView(StateManagerImpl.java:147)
> ~[myfaces-impl-2.2.5.jar:2.2.5]
>
>at
> org.apache.myfaces.shared.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:104)
> ~[myfaces-impl-2.2.5.jar:2.2.5]
>
>at
> org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:336)
> ~[myfaces-impl-2.2.5.jar:2.2.5]
>
>at
> javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper..java:82)
> ~[myfaces-api-2.2.5.jar:2.2.5]
>
>at
> javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper..java:82)
> ~[myfaces-api-2.2.5.jar:2.2.5]
>
>at
> org.omnifaces.viewhandler.RestorableViewHandler.restoreView(RestorableViewHandler.java:66)
> ~[omnifaces-1.8.1.jar:1.8.1-20140603]
>
>at
> org.ocpsoft.rewrite.faces.RewriteViewHandler.restoreView(RewriteViewHandler.java:102)
> ~[rewrite-integration-faces-2.0.12.Final.jar:2.0.12.Final]
>
>at
> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:168)
> ~[myfaces-impl-2.2.5.jar:2.2.5]
>
>at
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
> [myfaces-impl-2.2.5.jar:2.2.5]
>
>at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
> [myfaces-impl-2.2.5.jar:2.2.5]
>
>at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
> [myfaces-api-2.2.5.jar:2.2.5]
>
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilte

Re: How to investigate reasons for NullPointer and ViewExpired exceptions?

2014-10-22 Thread Felipe Jaekel
Actually they are set on the response, but my point is that some
inconsistent view state cached by the browser may be triggering the
exception inside MyFaces code, so the CacheControlPhaseListener is worth a
try.


Another problem I had was that some users with slow internet were trying to
use the page before it was fully loaded, so as the view state hidden field
was not rendered yet, a ViewExpiredException was thrown...
This behavior was with server state saving. Maybe with client the result
can be this NPE from your stackTrace. I solved it with this context
parameter:


org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN
true



Another thing is that if you deploy a new version of your application with
active sessions, state handling exceptions will happen in the pages that
have changed their structure changed somehow. This may look obvious, but I
didn't found anything about it on Google. With server state saving I was
getting a StringIndexOutOfBoundsException, and with client if I don't
remember exactly what was the exception, but it could be the same NPE you
are getting. I solved it using Tomcat's parallel deployment.

2014-10-22 10:28 GMT-02:00 Donatas Čiukšys :

> > don't know why but adding the same headers on my main facelets template
> didn't worked
>
> Cache control headers must be specified on HttpServletRequest object;
>
> My question is about investigating NPE when they occur in MyFaces code,
> not in my code.
>
> -Original Message-
> From: Felipe Jaekel [mailto:fkjae...@gmail.com]
> Sent: Wednesday, October 22, 2014 2:30 PM
> To: MyFaces Discussion
> Subject: Re: How to investigate reasons for NullPointer and ViewExpired
> exceptions?
>
> Recently I had a hard time to figure out some NPE with ViewScoped beans.
>
> In my case some actions on the bean were not fired, so subsequent actions
> ended in a NPE because required objects where not initialized. Problem was
> happening only in Firefox in case the user pressed F5 after doing some
> stuff on the page.
>
> I suspected off cache handling. Adding a phase listener to add the no cache
> headers solved the problem. This is the code I'm using: (don't know why but
> adding the same headers on my main facelets template didn't worked)
>
> /**
>  * Desativa cache de páginas xhtml
>  *
>  *
> http://turbomanage.wordpress.com/2006/08/08/disable-browser-caching-in-jsf/
>  *
>
> https://code.google.com/p/omnifaces/source/browse/src/org/omnifaces/filter/CacheControlFilter.java?name=1.7
>  *
>  * @author fjaekel
>  */
> public class CacheControlPhaseListener implements PhaseListener
> {
> private static final long serialVersionUID = 1L;
>
> @Override
> public PhaseId getPhaseId()
> {
> //System.out.println("response " + Formatter.formatDateTimeWithSeconds(new
> Date()));
> return PhaseId.RENDER_RESPONSE;
> }
>
> @Override
> public void afterPhase(PhaseEvent event)
> {
> }
>
> @Override
> public void beforePhase(PhaseEvent event)
> {
> FacesContext facesContext = event.getFacesContext();
>
> //HttpServletRequest request = (HttpServletRequest)
> facesContext.getExternalContext().getRequest();
> //System.out.println(request.getRequestURI());
>
> HttpServletResponse response = (HttpServletResponse)
> facesContext.getExternalContext().getResponse();
> response.setHeader("Cache-Control", "no-cache,no-store,must-revalidate");
> response.setDateHeader("Expires", 0);
> response.setHeader("Pragma", "no-cache"); // Backwards compatibility for
> HTTP 1.0.
> }
> }
>
> 2014-10-22 8:12 GMT-02:00 Donatas Čiukšys :
>
> > Dear MyFaces experts,
> >
> >
> >
> > I’m using TomEE 1.7.1 Plus, MyFaces 2.2.5, PrimeFaces 4.0.21, Omnifaces
> > 1.8.1, OCPSoft Rewrite 2.0.12.
> >
> > State saving: CLIENT; Session timeout: 60minutes; most pages are using
> > @ViewScoped beans (javax.faces.view.ViewScoped); Partial state saving is
> > not disabled; Encryption and compression are disabled.
> >
> >
> >
> > Production system is working in general (4 requests per second), no user
> > complaints, but in logs I find these two stack traces (shown at the
> bottom)
> > constantly (2-3 cases per day). I don’t think that there are any problem
> > with MyFaces, but I seek any advice how to collect forensic info on what
> > causes the stack traces below. The problems is that I cannot reproduce
> > those cases on my dev machine (I try short session timeout, invalidating
> > sessions, multiple tabs, …).
> >
> >
> >
> > Google says, that using state saving: CLIENT should prevent
> > ViewExpiredExceptio

Re: How to investigate reasons for NullPointer and ViewExpired exceptions?

2014-10-29 Thread Felipe Jaekel
I guess so.

org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN was introduced in
MyFaces 2.2.4. Before it I was using the jQuery blockUI plugin:
http://malsup.com/jquery/block/

2014-10-24 11:58 GMT-02:00 Donatas Čiukšys :

> Good point, I assume org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN
> should be present in all JSF applications, isn't it?
>
>
> -Original Message-
> From: Felipe Jaekel [mailto:fkjae...@gmail.com]
> Sent: Wednesday, October 22, 2014 4:06 PM
> To: MyFaces Discussion
> Subject: Re: How to investigate reasons for NullPointer and ViewExpired
> exceptions?
>
> Actually they are set on the response, but my point is that some
> inconsistent view state cached by the browser may be triggering the
> exception inside MyFaces code, so the CacheControlPhaseListener is worth a
> try.
>
>
> Another problem I had was that some users with slow internet were trying to
> use the page before it was fully loaded, so as the view state hidden field
> was not rendered yet, a ViewExpiredException was thrown...
> This behavior was with server state saving. Maybe with client the result
> can be this NPE from your stackTrace. I solved it with this context
> parameter:
>
> 
> org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN
> true
> 
>
>
> Another thing is that if you deploy a new version of your application with
> active sessions, state handling exceptions will happen in the pages that
> have changed their structure changed somehow. This may look obvious, but I
> didn't found anything about it on Google. With server state saving I was
> getting a StringIndexOutOfBoundsException, and with client if I don't
> remember exactly what was the exception, but it could be the same NPE you
> are getting. I solved it using Tomcat's parallel deployment.
>
> 2014-10-22 10:28 GMT-02:00 Donatas Čiukšys :
>
> > > don't know why but adding the same headers on my main facelets template
> > didn't worked
> >
> > Cache control headers must be specified on HttpServletRequest object;
> >
> > My question is about investigating NPE when they occur in MyFaces code,
> > not in my code.
> >
> > -Original Message-
> > From: Felipe Jaekel [mailto:fkjae...@gmail.com]
> > Sent: Wednesday, October 22, 2014 2:30 PM
> > To: MyFaces Discussion
> > Subject: Re: How to investigate reasons for NullPointer and ViewExpired
> > exceptions?
> >
> > Recently I had a hard time to figure out some NPE with ViewScoped beans.
> >
> > In my case some actions on the bean were not fired, so subsequent actions
> > ended in a NPE because required objects where not initialized. Problem
> was
> > happening only in Firefox in case the user pressed F5 after doing some
> > stuff on the page.
> >
> > I suspected off cache handling. Adding a phase listener to add the no
> cache
> > headers solved the problem. This is the code I'm using: (don't know why
> but
> > adding the same headers on my main facelets template didn't worked)
> >
> > /**
> >  * Desativa cache de páginas xhtml
> >  *
> >  *
> >
> http://turbomanage.wordpress.com/2006/08/08/disable-browser-caching-in-jsf/
> >  *
> >
> >
> https://code.google.com/p/omnifaces/source/browse/src/org/omnifaces/filter/CacheControlFilter.java?name=1.7
> >  *
> >  * @author fjaekel
> >  */
> > public class CacheControlPhaseListener implements PhaseListener
> > {
> > private static final long serialVersionUID = 1L;
> >
> > @Override
> > public PhaseId getPhaseId()
> > {
> > //System.out.println("response " +
> Formatter.formatDateTimeWithSeconds(new
> > Date()));
> > return PhaseId.RENDER_RESPONSE;
> > }
> >
> > @Override
> > public void afterPhase(PhaseEvent event)
> > {
> > }
> >
> > @Override
> > public void beforePhase(PhaseEvent event)
> > {
> > FacesContext facesContext = event.getFacesContext();
> >
> > //HttpServletRequest request = (HttpServletRequest)
> > facesContext.getExternalContext().getRequest();
> > //System.out.println(request.getRequestURI());
> >
> > HttpServletResponse response = (HttpServletResponse)
> > facesContext.getExternalContext().getResponse();
> > response.setHeader("Cache-Control", "no-cache,no-store,must-revalidate");
> > response.setDateHeader("Expires", 0);
> > response.setHeader("Pragma", "no-cache"); // Backwards compatibility for
> > HTTP 1.0.
> > }
> > }
> >
> > 2014-10-22 8:12 GMT-02:00 

Re: c:forEach issue in JSF 2

2015-07-01 Thread Felipe Jaekel
Hi khush,

I had issues with c:forEach when I migrated from Mojarra to MyFaces.

It was a plain html table similar to the example in your first message, and
it worked correctly changing to ui:repeat, so I suggest you to try it.

2015-07-01 5:23 GMT-03:00 khush N :

> Yep. I do have  in my page.
>
> On Wed, Jul 1, 2015 at 1:22 AM, l.pe...@senat.fr  wrote:
>
> > On 01/07/2015 10:08, khush N wrote:
> >
> >> Hi,
> >>
> >> Thanks for the quick reply!
> >>
> >> Sorry, I do not have a sample project. But c:forEach aren't working on a
> >> simplest of page for me :(
> >>
> > Did you put your code inside a  ?
> >
> >
> > Ludovic
> >
> > |
> > | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> > |
> >
> >
>


Exception with c:forEach after upgrading from 2.1 to 2.2

2015-07-30 Thread Felipe Jaekel
Hi,

I have this implementation (JSTL 1.2, PrimeFaces 5.1.20):
















After upgrading from MyFaces 2.1.17 to 2.2.8, when I click on the radio
button I get the exception below, so I'd like to know if I need additional
configuration or if is it a bug.

Thanks


GRAVE: javax.el.PropertyNotFoundException: Property 'pergunta' not found on
type org.apache.myfaces.view.facelets.tag.jstl.core.IterationStatus
org.apache.myfaces.view.facelets.el.ContextAwarePropertyNotFoundException:
javax.el.PropertyNotFoundException: Property 'pergunta' not found on type
org.apache.myfaces.view.facelets.tag.jstl.core.IterationStatus
at
org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpressionUEL.getValueReference(ContextAwareTagValueExpressionUEL.java:56)
at
javax.faces.validator._BeanValidatorUELUtils.getUELValueReferenceWrapper(_BeanValidatorUELUtils.java:46)
at
javax.faces.validator.BeanValidator.getValueReference(BeanValidator.java:245)
at javax.faces.validator.BeanValidator.validate(BeanValidator.java:153)
at
javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:276)
at javax.faces.component.UIInput.validateValue(UIInput.java:470)
at javax.faces.component.UISelectOne.validateValue(UISelectOne.java:71)
at javax.faces.component.UIInput.validate(UIInput.java:625)
at javax.faces.component.UIInput.processValidators(UIInput.java:274)
at
org.apache.myfaces.context.servlet.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:779)
at
org.apache.myfaces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:213)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1016)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIForm.visitTree(UIForm.java:345)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
at
javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
at
org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartialExecute(PartialViewContextImpl.java:430)
at
org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:411)
at
org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60)
at
javax.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1797)
at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1655)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:909)
at
org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:38)
at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:105)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.jav

Re: Exception with c:forEach after upgrading from 2.1 to 2.2

2015-07-31 Thread Felipe Jaekel
Hi,

Thanks for the feedback.

In this upgrade process from 2.1 to 2.2, I'm actually moving the code of a
small webapp that runs 2.1 to a large webapp that already uses 2.2 in
production.

I won't be able to test everything, so may I experience side effects by
enabling STRICT_JSF_2_FACELETS_COMPATIBILITY? In that case, is there a
prevision for 2.2.9 release?

Thanks

2015-07-31 3:55 GMT-03:00 Alexey Shakov :

> Hi,
>
> take a look at this issue
> https://issues.apache.org/jira/browse/MYFACES-3980, it is probably the
> reason for your problem.
>
> The workaround is to add
>
> 
>
> org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY
> true
>   
>
> to web.xml
>
> Greetings,
>
> Alexey
>
>
> Am 30.07.2015 um 21:48 schrieb Felipe Jaekel:
>
>> Hi,
>>
>> I have this implementation (JSTL 1.2, PrimeFaces 5.1.20):
>>
>> > items="#{avaliacaoController.prova.perguntas}"
>> var="perguntaProva"
>> varStatus="status"
>> 
>> 
>>
>> 
>>
>> 
>> 
>> > layout="pageDirection"
>> converter="entityConverter"
>> value="#{perguntaProva.pergunta.respostaFechada.resposta}"
>> > value="#{perguntaProva.pergunta.respostaList}"
>> var="resposta"
>> itemLabel="#{resposta.texto}"
>> />
>> > listener="#{avaliacaoController.responder(perguntaProva)}"
>> process="@this"
>> />
>> 
>>
>>
>>
>> After upgrading from MyFaces 2.1.17 to 2.2.8, when I click on the radio
>> button I get the exception below, so I'd like to know if I need additional
>> configuration or if is it a bug.
>>
>> Thanks
>>
>>
>> GRAVE: javax.el.PropertyNotFoundException: Property 'pergunta' not found
>> on
>> type org.apache.myfaces.view.facelets.tag.jstl.core.IterationStatus
>> org.apache.myfaces.view.facelets.el.ContextAwarePropertyNotFoundException:
>> javax.el.PropertyNotFoundException: Property 'pergunta' not found on type
>> org.apache.myfaces.view.facelets.tag.jstl.core.IterationStatus
>> at
>>
>> org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpressionUEL.getValueReference(ContextAwareTagValueExpressionUEL.java:56)
>> at
>>
>> javax.faces.validator._BeanValidatorUELUtils.getUELValueReferenceWrapper(_BeanValidatorUELUtils.java:46)
>> at
>>
>> javax.faces.validator.BeanValidator.getValueReference(BeanValidator.java:245)
>> at javax.faces.validator.BeanValidator.validate(BeanValidator.java:153)
>> at
>>
>> javax.faces.component._ComponentUtils.callValidators(_ComponentUtils.java:276)
>> at javax.faces.component.UIInput.validateValue(UIInput.java:470)
>> at javax.faces.component.UISelectOne.validateValue(UISelectOne.java:71)
>> at javax.faces.component.UIInput.validate(UIInput.java:625)
>> at javax.faces.component.UIInput.processValidators(UIInput.java:274)
>> at
>>
>> org.apache.myfaces.context.servlet.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:779)
>> at
>>
>> org.apache.myfaces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:213)
>> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1016)
>> at
>> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
>> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
>> at
>> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
>> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
>> at
>> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
>> at javax.faces.component.UIForm.visitTree(UIForm.java:345)
>> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
>> at
>> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
>> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
>> at
>> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
>> at javax.faces.component.UIComponent.visitTree(UIComponent.java:1044)
>> at
>> javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1191)
>> at
>>
>> org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartialExecute(PartialViewContextImpl.java:430)
>> at
>>
>> org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:411)
>> at
>>
>> org.primefaces.context.PrimePartialVi

Re: viewParam and INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL

2019-03-21 Thread Felipe Jaekel
Maybe this helps:
http://balusc.omnifaces.org/2015/10/the-empty-string-madness.html

Em sáb, 16 de mar de 2019 às 16:29, Erick de Oliveira Leal <
erickdeoliveiral...@gmail.com> escreveu:

> I forgot to add bean and xhtml:
>
> 
> http://www.w3.org/1999/xhtml";
> xmlns:ui="http://java.sun.com/jsf/facelets";
> xmlns:f="http://java.sun.com/jsf/core";
> xmlns:p="http://primefaces.org/ui";
> xmlns:h="http://java.sun.com/jsf/html";>
> 
>
> 
> 
>
> 
> 
> PrimeFaces Test
> 
> 
>
> 
> 
>
>
> 
> 
>
> ---
>
> package org.primefaces.test;
>
> import java.io.Serializable;
>
> import javax.faces.bean.ManagedBean;
> import javax.faces.bean.ViewScoped;
>
> @ManagedBean(name = "testView")
> @ViewScoped
> public class TestView implements Serializable {
> private String testString;
>
> public void inicializar() {
> System.out.println("initializing: " + testString);
>
> }
>
> public void inserirNaLista() {
> System.out.println(testString);
> }
>
> public String getTestString() {
> return testString;
> }
>
> public void setTestString(String testString) {
> this.testString = testString;
> }
>
> }
>
>
> Em sáb, 16 de mar de 2019 às 18:54, Erick de Oliveira Leal <
> erickdeoliveiral...@gmail.com> escreveu:
>
> > I was testing here. And INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL
> > have different behavior using Jetty and WildFly 16 + MyFaces 2.3.3
> >
> > 1st case:
> > http://localhost:8080/primefaces-test/test.xhtml
> > WildFly: value is null
> > Jetty: Value is null
> >
> > 2nd case:
> > http://localhost:8080/primefaces-test/test.xhtml?test=
> > WildFly: value is null
> > Jetty: Value = value is empty string
> >
> > Using Mojarra 2.3.9 value is always null in both servers.
> >
>