You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2008/10/13 21:28:47 UTC
svn commit: r704212 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
Author: hlship
Date: Mon Oct 13 12:28:47 2008
New Revision: 704212
URL: http://svn.apache.org/viewvc?rev=704212&view=rev
Log:
TAP5-257: NPE in RequestFilter if ApplicationStateManager is used
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java?rev=704212&r1=704211&r2=704212&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java Mon Oct 13 12:28:47 2008
@@ -1000,6 +1000,11 @@
Request request = new RequestImpl(servletRequest, applicationCharset);
Response response = new ResponseImpl(servletResponse);
+ // TAP5-257: Make sure that the "initial guess" for request/response is available, even if
+ // some filter in the RequestHandler pipeline replaces them.
+
+ requestGlobals.storeRequestResponse(request, response);
+
// Transition from the Servlet API-based pipeline, to the Tapestry-based pipeline.
return handler.service(request, response);
@@ -1020,6 +1025,8 @@
{
public boolean service(Request request, Response response) throws IOException
{
+ // Update RequestGlobals with the current request/response (in case some filter replaced the
+ // normal set).
requestGlobals.storeRequestResponse(request, response);
return masterDispatcher.dispatch(request, response);