Thanks Johan,

I ended up doing the same thing.

On 3/5/07, Johan Maasing <[EMAIL PROTECTED]> wrote:

Check out http://issues.apache.org/jira/browse/TAPESTRY-695
It might be the same problem and has a work around.
I include
        requestGlobals.store(request, response);
in my filter and that works fine.

On 3/5/07, Tim Downey <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm trying to implement a pattern that does some automatic cleanup and
> checking using the WebRequestServicerPipeline.  I'm performing some URL
> checks to detect when a user is switching amongst "applications" in my
> WAR.
>
> I've used Hivemind to add a filter to the WebRequestServicerPipeline,
but
> I'm having some issues that relate to the lifecycle of requests that I'm
> hoping someone can shed light on.
>
> From the docs, it appears that the WebRequestServicerPipeline should be
> initialized with all the necessary globals around the request, but I am
> unable to access the ApplicationStateManager from within my filter.
>
> Prior to servicing the request, my filter is trying to use an injected
> ApplicationStateManager to access a state object, but it doesn't appear
to
> be properly initialized.  I'm getting the following exception.  Can
> someone
> confirm that I should be able to access the ApplicationStateManager
within
> this pipeline prior to servicing the request?
>
>      [java] 08:27:57,156 ERROR [STDERR] java.lang.NullPointerException:
> Property 'webRequest' of <OuterProxy for tapestry.globals.RequestGlobals
(
> org.apache.tapestry.services.RequestGlobals)> is null.
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
$WebRequest_1112241239a._targetServiceProperty($WebRequest_1112241239a.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
> $WebRequest_1112241239a.getSession($WebRequest_1112241239a.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
> $WebRequest_11122412326.getSession($WebRequest_11122412326.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
> org.apache.tapestry.engine.state.SessionScopeManager.getSession(
> SessionScopeManager.java:48)
>      [java] 08:27:57,156 ERROR [STDERR]     at
> org.apache.tapestry.engine.state.SessionScopeManager.get(
> SessionScopeManager.java:64)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
$StateObjectPersistenceManager_111224124ae.get($StateObjectPersistenceManager_111224124ae.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
> org.apache.tapestry.engine.state.StateObjectManagerImpl.get(
> StateObjectManagerImpl.java:50)
>      [java] 08:27:57,156 ERROR [STDERR]     at
> org.apache.tapestry.engine.state.ApplicationStateManagerImpl.get(
> ApplicationStateManagerImpl.java:60)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
$ApplicationStateManager_11122412342.get($ApplicationStateManager_11122412342.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
$ApplicationStateManager_11122412343.get($ApplicationStateManager_11122412343.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
com.workscape.proxyadmin.lifecycle.ProxyAdminLifeCycleHandler.startApplication
> (ProxyAdminLifeCycleHandler.java:32)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
$ApplicationLifeCycleHandler_1112241238b.startApplication($ApplicationLifeCycleHandler_1112241238b.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
com.workscape.oneforce.lifecycle.ApplicationLifeCycleFilter.startApplication
> (ApplicationLifeCycleFilter.java:221)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
com.workscape.oneforce.lifecycle.ApplicationLifeCycleFilter.interceptNonNestedRequest
> (ApplicationLifeCycleFilter.java:195)
>      [java] 08:27:57,156 ERROR [STDERR]     at
> com.workscape.oneforce.lifecycle.ApplicationLifeCycleFilter.service(
> ApplicationLifeCycleFilter.java:105)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
$WebRequestServicerFilter_11122412380.service($WebRequestServicerFilter_11122412380.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
$WebRequestServicer_11122412384.service($WebRequestServicer_11122412384.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
>
$WebRequestServicer_1112241237c.service($WebRequestServicer_1112241237c.java)
>      [java] 08:27:57,156 ERROR [STDERR]     at
>
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service
> (
> WebRequestServicerPipelineBridge.java:56)
>
> I've configured the pipeline as follows:
>
>   <contribution configuration-id="
> tapestry.request.WebRequestServicerPipeline">
>      <filter name="ApplicationLifeCycleFilter"
> object="service:ApplicationLifeCycleFilter"/>
>   </contribution>
>
>   <service-point id="ApplicationLifeCycleFilter" interface="
> org.apache.tapestry.services.WebRequestServicerFilter">
>     <invoke-factory>
>       <construct class="
> com.workscape.oneforce.lifecycle.ApplicationLifeCycleFilter">
>           <set-configuration property="contributions"
> configuration-id="ApplicationLifeCycleHandlers"/>
>       </construct>
>     </invoke-factory>
>   </service-point>
>
> whereby I have a bunch of contributions used to find the proper
> application
> life cycle handlers.
>
> Regards,
> Tim
>

Reply via email to