I have a JSF page home.xhtml with some JSF components / view and let's say it is currently loaded in a (Firefox) browser popup window named test-popoup-win
. Now I try to access the same page/url, home.xhtml?query=JSF, with additional url parameters, from another (Firefox) browser window, which is supposed to load different/new set of components, based on new search context (?query=JSF). And this loads home.xhtml in the same browser popup window, named test-popup-win
, overriding the previous JSF components / view. In the backend servlet code, I am actually redirecting to the same page, home.xhtml?query=JSF.
But instead of showing the new view, it throws the following error. The log shows that a property was not found. I can confirm that the property not found, belongs to the old view / bean. But if I click continue on my custom error page, I get the new view without any issue.
Please help/advice, by suggesting a way which could clear previous view cleanly and load the new view or any other way for issue fix. Let me know if I am missing any inputs. Thank you very much.
Is there any good way to debug this kind of JSF issue ?
Update: One may-not-be-good temporary workaround (I dont even call it solution) could be to ignore the exception in FacesErrorHandlingServlet class. I am still trying/looking for a good solution, please share if you have one
*15:58:55,495 ERROR [stderr] (http-/0.0.0.0:8080-10) **javax.servlet.ServletException: javax.el.PropertyNotFoundException: The class 'com.test.ContainerBean' does not have the property 'testJsonData'.**
15:58:55,496 ERROR [stderr] (http-/0.0.0.0:8080-10) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:229)
15:58:55,496 ERROR [stderr] (http-/0.0.0.0:8080-10) at org.apache.myfaces.webapp.MyFacesServlet.service(MyFacesServlet.java:112)
15:58:55,497 ERROR [stderr] (http-/0.0.0.0:8080-10) at **com.test.FacesErrorHandlingServlet**.service(FacesErrorHandlingServlet.java:44)
15:58:55,497 ERROR [stderr] (http-/0.0.0.0:8080-10) at sun.reflect.GeneratedMethodAccessor293.invoke(Unknown Source)
.
.
.
15:58:55,536 ERROR [stderr] (http-/0.0.0.0:8080-10) **Caused by: javax.el.PropertyNotFoundException: The class 'com.test.ContainerBean' does not have the property 'testJsonData'.**
15:58:55,537 ERROR [stderr] (http-/0.0.0.0:8080-10) at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:661)
15:58:55,537 ERROR [stderr] (http-/0.0.0.0:8080-10) at javax.el.BeanELResolver.getValue(BeanELResolver.java:290)
15:58:55,537 ERROR [stderr] (http-/0.0.0.0:8080-10) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
15:58:55,538 ERROR [stderr] (http-/0.0.0.0:8080-10) at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:179)
15:58:55,538 ERROR [stderr] (http-/0.0.0.0:8080-10) at org.apache.el.parser.AstValue.getValue(AstValue.java:166)
15:58:55,539 ERROR [stderr] (http-/0.0.0.0:8080-10) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
15:58:55,539 ERROR [stderr] (http-/0.0.0.0:8080-10) at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getValue(ContextAwareTagValueExpression.java:96)
15:58:55,540 ERROR [stderr] (http-/0.0.0.0:8080-10) ... 82 more*
Make sure you don't invoke unexisting getter/setters on your beans, or make sure all beans share the same basic properties (inheritance) or wrap your components (which try to access your getters) with
rendered="#{myBean.typeOfBean eq 'theOneWithThatProperty'}"
or something like that...