[MAGNOLIA-3338] Context is not updated on include request Created: 26/Oct/10  Updated: 01/Jul/11  Resolved: 01/Dec/10

Status: Closed
Project: Magnolia
Component/s: core, templating
Affects Version/s: 4.3.7
Fix Version/s: 4.4

Type: Bug Priority: Major
Reporter: Tobias Mattsson Assignee: Tobias Mattsson
Resolution: Fixed Votes: 0
Labels: filter, include, servlet, tomcat, weblogic, websphere
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
caused by MAGNOLIA-2387 Request stored in WebContext is not u... Closed
is causing MAGNOLIA-3748 An *update* should also apply conditi... Closed
relation
is related to MAGNOLIA-2010 WebContextImpl.include() should use p... Closed
is related to MAGNOLIA-3337 Request Wrappers hide changes in upst... Closed
is related to MAGNOLIA-2494 Add support for re-execution of filte... Closed
is related to MAGNOLIA-1646 Makes jsp pageContext available in We... Closed
is related to MAGNOLIA-3453 FreemarkerHelper does not expose Resp... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

The magnolia filter chain is not executed on includes, therefor any wrappers that appear at the front of the request wrapper chain is not set using WebContext.push().

This means that when processing an include to a JSP that does an include of its own, using the request on the top of the request stack in WebContext, the include happens on the wrong wrapper.

A suitable test case for this would be a module with pages that return the word ERROR if they detect that the request wrapper stack in WebContext is not in sync. An integration test suite could then access these pages and test for the word ERROR.

This needs to be tested in all supported servlet containers / application servers.

See http://wiki.magnolia-cms.com/display/DEV/How+servlet+request+wrapping+works for more details.



 Comments   
Comment by Tobias Mattsson [ 02/Nov/10 ]

The problem also appears on forwards, when the DONT_DISPATCH_ON_FORWARD_ATTRIBUTE is set, since then the request does not pass through the context filter but might later do WebContext.include() at which point the include is done on the wrong request object.

Generated at Mon Feb 12 03:45:31 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.