Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Alexander Reif
Redirect from a JSF action with CDI bridge is not working
29 janvier 2014 04:10
Réponse

Alexander Reif

Rang: New Member

Publications: 16

Date d'inscription: 8 janvier 2014

Publications Récentes

Hi all,

I am currently stuck with a quite simple problem: I want to redirect to another static URL from an JSF action, but I always get an IllegalStateException.
I already had a look on your Liferay Faces demos and I am using the same mechanismn as you use in this class:
LoginBackingBean.java
The only difference is, we are using the CDI bridge.. perhaps that's the problem..

Our scenario is a master-detail-view. We have a master view with a list of entities and a detail view for a special entity. For usability reasons, the detail view is on a separate, hidden, page with a userfriendly URL. The detail page is reading URL parameters which contains the entity ID it should show. This way, we can easily send a static link to a specific details page. What isn't working, is the "back" button on the details page. I just want to be able, when the user closes the entiy to automatically redirect him back to the master page (which is also a static url).

Here is some code:

The command button in our xhmtl file:
1<p:commandButton id="theReturnButton" ajax="false" action="#{reviewOrderTaskFormBean.closeTask()}" value="Close task" update="theForm" />


The actual redirekt code:
 1private void closeTaskWindow()
 2{
 3    try
 4    {
 5        final PortletRequest portletRequest = (PortletRequest) LiferayFacesContext.getCurrentInstance()
 6                .getExternalContext().getRequest();
 7        final ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute("THEME_DISPLAY");
 8        final String portalURL = themeDisplay.getPortalURL();
 9        final String redirect = portalURL + taskListUrl;
10
11        final ExternalContext externalContext = FacesContext.getInstance().getExternalContext();
12        // externalContext.redirect("http://stackoverflow.com"); /* also does not work */
13        externalContext.redirect(redirect);
14    }
15    catch(final Exception ex)
16    {
17        // TODO: handle this
18    }
19}


The exception:
  1java.lang.IllegalStateException: Unable to load current conversations from the associated request, something went badly wrong when associate() was called
  2    at org.jboss.weld.context.AbstractConversationContext.getCurrentConversation(AbstractConversationContext.java:363)
  3    at org.jboss.weld.jsf.ConversationAwareViewHandler.getActionURL(ConversationAwareViewHandler.java:102)
  4    at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:232)
  5    at com.sun.faces.renderkit.html_basic.FormRenderer.encodeBegin(FormRenderer.java:134)
  6    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:826)
  7    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777)
  8    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
  9    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
 10    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:439)
 11    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
 12    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
 13    at com.liferay.faces.bridge.application.ViewHandlerCompatImpl.renderView(ViewHandlerCompatImpl.java:35)
 14    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
 15    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
 16    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
 17    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
 18    at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:227)
 19    at com.liferay.faces.bridge.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:85)
 20    at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:112)
 21    at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:255)
 22    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:354)
 23    at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:204)
 24    at javax.portlet.GenericPortlet.render(GenericPortlet.java:259)
 25    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
 26    at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:55)
 27    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
 28    at com.liferay.cdi.portlet.bridge.CDIPortletFilter.doFilter(CDIPortletFilter.java:96)
 29    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 30    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 31    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 32    at java.lang.reflect.Method.invoke(Method.java:601)
 33    at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
 34    at $Proxy926.doFilter(Unknown Source)
 35    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
 36    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
 37    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:111)
 38    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
 39    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
 40    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 41    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:73)
 42    at org.jboss.weld.servlet.WeldCrossContextFilter.doFilter(WeldCrossContextFilter.java:62)
 43    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
 44    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
 45    at com.liferay.cdi.portlet.bridge.CDICrossContextFilter.doFilter(CDICrossContextFilter.java:49)
 46    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
 47    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
 48    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:79)
 49    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
 50    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 51    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:832)
 52    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:718)
 53    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:655)
 54    at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:602)
 55    at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:675)
 56    at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:382)
 57    at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1194)
 58    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69)
 59    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
 60    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:365)
 61    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:309)
 62    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:242)
 63    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
 64    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
 65    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 66    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:73)
 67    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
 68    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:79)
 69    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
 70    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 71    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:832)
 72    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:718)
 73    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:655)
 74    at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:55)
 75    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
 76    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
 77    at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:5749)
 78    at sun.reflect.GeneratedMethodAccessor658.invoke(Unknown Source)
 79    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 80    at java.lang.reflect.Method.invoke(Method.java:601)
 81    at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
 82    at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
 83    at $Proxy556.renderPortlet(Unknown Source)
 84    at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1631)
 85    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:181)
 86    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:112)
 87    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.doProcessTemplate(RuntimePortletImpl.java:536)
 88    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.doDispatch(RuntimePortletImpl.java:401)
 89    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:248)
 90    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:235)
 91    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 92    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 93    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 94    at java.lang.reflect.Method.invoke(Method.java:601)
 95    at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88)
 96    at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56)
 97    at $Proxy564.processTemplate(Unknown Source)
 98    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:126)
 99    at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:479)
100    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69)
101    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
102    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:365)
103    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:309)
104    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:242)
105    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
106    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
107    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
108    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:73)
109    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
110    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:79)
111    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
112    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
113    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:832)
114    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:718)
115    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:655)
116    at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:471)
117    at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:728)
118    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:243)
119    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
120    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
121    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:176)
122    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
123    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
124    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
125    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:559)
126    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:536)
127    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
128    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
129    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
130    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:73)
131    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
132    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
133    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
134    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
135    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
136    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
137    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:314)
138    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
139    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
140    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
141    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
142    at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
143    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
144    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
145    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
146    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:79)
147    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
148    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
149    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:832)
150    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:620)
151    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:553)
152    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:482)
153    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:137)
154    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
155    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
156    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
157    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:73)
158    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
159    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
160    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
161    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:355)
162    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
163    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
164    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
165    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
166    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
167    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
168    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
169    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
170    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
171    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
172    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:314)
173    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
174    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
175    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
176    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
177    at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:260)
178    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
179    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
180    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
181    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
182    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
183    at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:56)
184    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
185    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
186    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
187    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
188    at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
189    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
190    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
191    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
192    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
193    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:245)
194    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
195    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
196    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
197    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
198    at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
199    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
200    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
201    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
202    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
203    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
204    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
205    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
206    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
207    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
208    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:191)
209    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
210    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
211    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
212    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
213    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
214    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
215    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
216    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
217    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
218    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
219    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
220    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
221    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
222    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
223    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
224    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
225    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
226    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
227    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
228    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
229    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:79)
230    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
231    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
232    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
233    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
234    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
235    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
236    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
237    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
238    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
239    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
240    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
241    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
242    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
243    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
244    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
245    at java.lang.Thread.run(Thread.java:722)


The portlet.xml for the CDIBridgeConfiguration:
1<filter>
2    <filter-name>CDIPortletFilter</filter-name>
3    <filter-class>com.liferay.cdi.portlet.bridge.CDIPortletFilter</filter-class>
4    <lifecycle>ACTION_PHASE</lifecycle>
5    <lifecycle>EVENT_PHASE</lifecycle>
6    <lifecycle>RENDER_PHASE</lifecycle>
7    <lifecycle>RESOURCE_PHASE</lifecycle>
8</filter>


web.xml
 1<?xml version="1.0" encoding="UTF-8"?>
 2
 3<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
 5
 6    <!-- Set the JSF 2 PROJECT_STAGE to Development so that the JSF implementation will do the following at runtime: -->
 7    <!-- 1. Log more verbose messages. -->
 8    <!-- 2. Render tips and/or warnings in the view markup. -->
 9    <!-- 3. Cause the default ExceptionHandler to display a developer-friendly error page. -->
10    <context-param>
11        <param-name>javax.faces.PROJECT_STAGE</param-name>
12        <param-value>Development</param-value>
13    </context-param>
14    <context-param>
15        <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
16        <param-value>true</param-value>
17    </context-param>
18
19    <!-- Instruct Mojarra to utilize JBoss-EL instead of the EL implementation provided by the servlet container. -->
20    <context-param>
21        <param-name>com.sun.faces.expressionFactory</param-name>
22        <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
23    </context-param>
24    <filter>
25        <filter-name>CDICrossContextFilter</filter-name>
26        <filter-class>com.liferay.cdi.portlet.bridge.CDICrossContextFilter</filter-class>
27    </filter>
28    <filter-mapping>
29        <filter-name>CDICrossContextFilter</filter-name>
30        <url-pattern>/*</url-pattern>
31        <dispatcher>INCLUDE</dispatcher>
32        <dispatcher>FORWARD</dispatcher>
33        <dispatcher>ERROR</dispatcher>
34    </filter-mapping>
35    <filter>
36        <filter-name>WeldCrossContextFilter</filter-name>
37        <filter-class>org.jboss.weld.servlet.WeldCrossContextFilter</filter-class>
38    </filter>
39    <filter-mapping>
40        <filter-name>WeldCrossContextFilter</filter-name>
41        <url-pattern>/*</url-pattern>
42        <dispatcher>INCLUDE</dispatcher>
43        <dispatcher>FORWARD</dispatcher>
44        <dispatcher>ERROR</dispatcher>
45    </filter-mapping>
46    <!-- Guarantee order of startup listeners (JSF implementation must be specified before the bridge). -->
47    <listener>
48        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
49    </listener>
50    <listener>
51        <listener-class>com.liferay.faces.bridge.servlet.BridgeSessionListener</listener-class>
52    </listener>
53    <listener>
54        <listener-class>com.liferay.cdi.portlet.bridge.CDIContextListener</listener-class>
55    </listener>
56    <!-- Although the FacesServlet will not be invoked by any portlet requests, it is required to initialize JSF. -->
57    <servlet>
58        <servlet-name>Faces Servlet</servlet-name>
59        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
60        <load-on-startup>1</load-on-startup>
61    </servlet>
62    <!-- MyFaces will not initialize unless a servlet-mapping to the Faces Servlet is present. -->
63    <servlet-mapping>
64        <servlet-name>Faces Servlet</servlet-name>
65        <url-pattern>*.xhtml</url-pattern>
66    </servlet-mapping>
67    <!-- Prevent direct access to Facelet view XHTML by the userAgent (browser). -->
68    <security-constraint>
69        <web-resource-collection>
70            <web-resource-name>Facelet View XHTML</web-resource-name>
71            <url-pattern>*.xhtml</url-pattern>
72        </web-resource-collection>
73        <auth-constraint>
74            <role-name>nobody</role-name>
75        </auth-constraint>
76    </security-constraint>
77    <security-role>
78        <role-name>nobody</role-name>
79    </security-role>
80</web-app>


Thank you for your help in advance!

Greetz
Alex
Alexander Reif
RE: Redirect from a JSF action with CDI bridge is not working
29 janvier 2014 04:14
Réponse

Alexander Reif

Rang: New Member

Publications: 16

Date d'inscription: 8 janvier 2014

Publications Récentes

We are using the following libs:
- Liferay 6.1 GA3 EE
- Liferay Faces 3.1.3 GA4
- CDI portlet bridge shared 6.2.0.2
Juan Gonzalez
RE: Redirect from a JSF action with CDI bridge is not working
29 janvier 2014 07:15
Réponse

Juan Gonzalez

LIFERAY STAFF

Rang: Liferay Legend

Publications: 1984

Date d'inscription: 28 octobre 2008

Publications Récentes

Hi Alexander,

what Weld version are you using?
Neil Griffin
RE: Redirect from a JSF action with CDI bridge is not working
29 janvier 2014 10:36
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2179

Date d'inscription: 26 juillet 2005

Publications Récentes

Hi Alexander,

Thanks so much for reporting this issue. It turns out that there was a bug in Liferay Faces Bridge. We just fixed it in FACES-1831.

Kind Regards,

Neil
Alexander Reif
RE: Redirect from a JSF action with CDI bridge is not working
30 janvier 2014 00:01
Réponse

Alexander Reif

Rang: New Member

Publications: 16

Date d'inscription: 8 janvier 2014

Publications Récentes

Hi Neil!

Great news and thanks for the fast reply!
One question: the release for the new Faces Bridge is still scheduled for the beginning of February?

Best regards
Alex
Neil Griffin
RE: Redirect from a JSF action with CDI bridge is not working
30 janvier 2014 09:21
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2179

Date d'inscription: 26 juillet 2005

Publications Récentes

It's my pleasure Alex. Thanks again for finding the bug. We are targeting February 7'th for our Liferay Faces 3.x GA5 release that will include the fix. For now, you can use GA5-SNAPSHOT jars from our snapshot repository.