title: Spring Webflow: Error Rendering view java.lang.UnsupportedOperationException at javax.faces.context.ExternalContext.getClientWindow
body: <p>I'm using mojarra 2.2, gf4, swf 2.3.2.</p>
  
  <p>The problem comes during loading of the pages in webflow. the error comes when webflow (i think) is sending the pages to faces for rendering. I have tried with swf2.0.8 upto the current swf2.3.2. </p>
  
  <pre><code>INFO:   2013-07-12 09:46:09 DEBUG RequestLoggingPhaseListener:42 - Entering JSF Phase: RENDER_RESPONSE 6
  INFO:   2013-07-12 09:46:09 DEBUG RequestLoggingPhaseListener:42 - Entering JSF Phase: RENDER_RESPONSE 6
  SEVERE:   Error Rendering View[/WEB-INF/pages/index/index.xhtml]
  java.lang.UnsupportedOperationException
  at javax.faces.context.ExternalContext.getClientWindow(ExternalContext.java:1500)
  at com.sun.faces.context.ExternalContextImpl.encodeActionURL(ExternalContextImpl.java:562)
  at org.springframework.faces.webflow.ExternalContextWrapper.encodeActionURL(ExternalContextWrapper.java:29)
  at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:234)
  at com.sun.faces.renderkit.html_basic.FormRenderer.encodeBegin(FormRenderer.java:134)
  at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:869)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
  at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
  at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
  at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
  at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
  at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
  at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
  at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
  at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
  at org.springframework.faces.webflow.FlowLifecycle.render(FlowLifecycle.java:80)
  at org.springframework.faces.webflow.JsfView.render(JsfView.java:89)
  at org.springframework.webflow.engine.ViewState.render(ViewState.java:296)
  at org.springframework.webflow.engine.ViewState.refresh(ViewState.java:243)
  at org.springframework.webflow.engine.ViewState.resume(ViewState.java:221)
  at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
  at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:258)
  at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
  at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
  at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
  at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
  at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
  at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
  at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
  at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
  at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
  at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
  at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
  at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
  at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
  at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
  at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
  at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
  at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
  at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
  at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
  at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
  at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
  at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
  at java.lang.Thread.run(Thread.java:724)
  INFO:   2013-07-12 09:46:09 DEBUG JsfView:98 - View rendering complete
  </code></pre>
  
  <p>on the flow for a page i have </p>
  
  <pre><code>&lt;flow xmlns="http://www.springframework.org/schema/webflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.4.xsd"
    parent="parent-views"&gt;
  
  &lt;view-state id="index" view="index.xhtml"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>the webflow configuration is </p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:webflow="http://www.springframework.org/schema/webflow-config"
     xmlns:faces="http://www.springframework.org/schema/faces"
     xsi:schemaLocation="
      http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
      http://www.springframework.org/schema/webflow-config
              http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
              http://www.springframework.org/schema/faces 
              http://www.springframework.org/schema/faces/spring-faces-2.2.xsd"&gt;
  
  &lt;bean class="org.springframework.webflow.scope.ScopeRegistrar"/&gt;
  
  &lt;!-- Spring Webflow central configuration component --&gt;
  &lt;webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry"&gt;
      &lt;webflow:flow-execution-listeners&gt;          
          &lt;webflow:listener ref="facesContextListener"/&gt;          
      &lt;/webflow:flow-execution-listeners&gt;
  &lt;/webflow:flow-executor&gt;
  
  &lt;!-- Installs a listener that creates and releases the FacesContext for each request. --&gt;   
  &lt;bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/&gt;   
  
  &lt;webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF/pages" &gt;
      &lt;webflow:flow-location-pattern value="/**/*-views.xml" /&gt;
  &lt;/webflow:flow-registry&gt;
  
  &lt;!-- Configures the Spring Web Flow JSF integration --&gt; 
  &lt;faces:flow-builder-services id="facesFlowBuilderServices" development="true" /&gt;
  
  &lt;bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator"/&gt;
  
  &lt;!-- Dispatches requests mapped to flows to FlowHandler implementations --&gt; 
  &lt;bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter"&gt;      
      &lt;property name="flowExecutor" ref="flowExecutor" /&gt; 
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping"&gt;
      &lt;property name="flowRegistry" ref="flowRegistry"/&gt;
      &lt;property name="order" value="1"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p>which i borrowed from somewhere</p>
  
  <p>whenever i try to open the page i get this error</p>