Author: cpopetz
Date: 2008-12-22 11:17:48 -0500 (Mon, 22 Dec 2008)
New Revision: 9816
Modified:
trunk/src/main/org/jboss/seam/web/RedirectFilter.java
Log:
JBSEAM-3678: RedirectFilter should only act during a faces request
Modified: trunk/src/main/org/jboss/seam/web/RedirectFilter.java
===================================================================
--- trunk/src/main/org/jboss/seam/web/RedirectFilter.java 2008-12-22 16:16:34 UTC (rev
9815)
+++ trunk/src/main/org/jboss/seam/web/RedirectFilter.java 2008-12-22 16:17:48 UTC (rev
9816)
@@ -52,7 +52,9 @@
@Override
public void sendRedirect(String url) throws IOException
{
- if ( Contexts.isEventContextActive() &&
!Contexts.getEventContext().isSet(REDIRECT_FROM_MANAGER) )
+ if ( FacesContext.getCurrentInstance() != null
+ && Contexts.isEventContextActive()
+ && !Contexts.getEventContext().isSet(REDIRECT_FROM_MANAGER) )
{
if ( !url.startsWith("http:") &&
!url.startsWith("https:") ) //yew!
{
Show replies by date