Do you have a context parameter w/ the key javax.faces.CONFIG_FILES ? Dennis Byrne
>-----Original Message----- >From: Anthony Hong [mailto:[EMAIL PROTECTED] >Sent: Friday, March 17, 2006 12:56 AM >To: 'MyFaces Discussion' >Subject: Re: Phase Listener entered twice > >Yes, I saw a message" INFO: MyFaces already initialized" >But it should not a problem, the my faces source code shows it will >not load twice in container. > >On 3/17/06, Dennis Byrne <[EMAIL PROTECTED]> wrote: >> There is a context parameter in JSF that is used for loading the conf >> file(s). If you use "/WEB-INF/faces-config.xml" as a parameter value, the >> file is loaded twice ( the spec says to automatically load this file). >> >> BTW, if you are using a recent build of myfaces, you will see a warning for >> this in your log files . >> >> Dennis Byrne >> >> >-----Original Message----- >> >From: Anthony Hong [mailto:[EMAIL PROTECTED] >> >Sent: Friday, March 17, 2006 12:41 AM >> >To: 'MyFaces Discussion' >> >Subject: Phase Listener entered twice >> > >> >I use Facelets with MyFaces implementation. >> >There is a phase listener listens RESTORE_VIEW phase in system. I >> >added a logger message each time phase listener after phase is >> >entered. >> > >> >But each time I make a request of page, it always output enter message >> >twice means listener is entered twice. >> > >> >I put >> >try { >> > throw new Exception(); >> >} catch (Exception e) { >> > logger.error("RESTORE_VIEW Called From", e); >> >} >> >in afterPhase method. >> >The following is output >> > >> >2006-3-17 13:20:40 ajax.AjaxListener afterPhase >> >INFO: Enter Ajax ListenerRESTORE_VIEW(1) >> >2006-3-17 13:20:40 ajax.AjaxListener afterPhase >> >INFO: Request view id:/ajaxRequest.xhtml >> >2006-3-17 13:20:40 ajax.AjaxListener afterPhase >> >ERROR: RESTORE_VIEW Called From >> >java.lang.Exception >> > at ajax.AjaxListener.afterPhase(AjaxListener.java:26) >> > at >> > org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter( >> >LifecycleImpl.java:536) >> > at >> > org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl. >> >java:164) >> > at >> > org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java >> >:66) >> > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) >> > at >> > weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run >> >(StubSecurityHelper.java:214) >> > at >> > weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri >> >tyHelper.java:120) >> > at >> > weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav >> >a:272) >> > at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) >> > at >> > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja >> >va:42) >> > at >> > org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Exte >> >nsionsFilter.java:122) >> > at >> > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja >> >va:42) >> > at >> > weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio >> >n.run(WebAppServletContext.java:3020) >> > at >> > weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate >> >dSubject.java:321) >> > at >> > weblogic.security.service.SecurityManager.runAs(SecurityManager.java: >> >121) >> > at >> > weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS >> >ervletContext.java:1925) >> > at >> > weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC >> >ontext.java:1848) >> > at >> > weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j >> >ava:1288) >> > at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) >> > at weblogic.work.ExecuteThread.run(ExecuteThread.java:179) >> >2006-3-17 13:20:40 ajax.AjaxListener handleAjaxRequest >> >INFO: Msg requrest mapping:Hello >> >2006-3-17 13:20:40 ajax.AjaxListener afterPhase >> >INFO: Enter Ajax ListenerRESTORE_VIEW(1) >> >2006-3-17 13:20:40 ajax.AjaxListener afterPhase >> >INFO: Request view id:/ajaxRequest.xhtml >> >2006-3-17 13:20:40 ajax.AjaxListener afterPhase >> >ERROR: RESTORE_VIEW Called From >> >java.lang.Exception >> > at ajax.AjaxListener.afterPhase(AjaxListener.java:26) >> > at >> > org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter( >> >LifecycleImpl.java:536) >> > at >> > org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl. >> >java:164) >> > at >> > org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java >> >:66) >> > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) >> > at >> > weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run >> >(StubSecurityHelper.java:214) >> > at >> > weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri >> >tyHelper.java:120) >> > at >> > weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav >> >a:272) >> > at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) >> > at >> > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja >> >va:42) >> > at >> > org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(Exte >> >nsionsFilter.java:122) >> > at >> > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja >> >va:42) >> > at >> > weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio >> >n.run(WebAppServletContext.java:3020) >> > at >> > weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate >> >dSubject.java:321) >> > at >> > weblogic.security.service.SecurityManager.runAs(SecurityManager.java: >> >121) >> > at >> > weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS >> >ervletContext.java:1925) >> > at >> > weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC >> >ontext.java:1848) >> > at >> > weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j >> >ava:1288) >> > at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) >> > at weblogic.work.ExecuteThread.run(ExecuteThread.java:179) >> > >> >ps: I have the same problem with navigator handler decorator >> > >> >-- >> > >> >Anthony Hong >> > >> >> >> > > >-- > >Anthony Hong >

