[ http://jira.magnolia.info/browse/MAGNOLIA-1698?page=comments#action_14564 
] 
            
Philipp Bracher commented on MAGNOLIA-1698:
-------------------------------------------

Would like to explain that with an example to show why I consider that as very 
important topic.

Assume you implement a controller (using a magnolia page, servlet or other 
framework). Now after executing your controllers code you want to forward to a 
magnolia page (/forum/register-user.html for example)

This fails because the filter chain is not re-executed and the cms rendering 
won't work ( you end up in a 404).

If the configuration of the filer would be defined by using 
<dispatcher>FORWARD</dispatcher> the filter would be re-executed on a forward.

But after changing that we run into problems when we call a page directly 
(404). This happens because the JspTemplateRenderer uses a forward instead of 
an include what triggers a double execution of the filter also for single page 
calls.

To avoid that we change JspTemplateRenderer so that it uses an include (now a 
normal page is rendered nicely again).

Has anyone concerns about changing that (using include instead of a forward)?

If we change that we have to change the the virtual uri mapping filter as well, 
since it does some 'workarounds' to re-execute the filter chain itself.

The original uri is then set when the filter is executed (also when you do a 
forward) the current uri needs to be renamed to something like 'resolved uri' 
because this is the uri resolved by the virtual uri mappings. The resolved uri 
is used to read the right content node, the original uri is used to create the 
cache key.

I'd like to do that rather sooner than later since this facilitates the 
integration of other frameworks.

Since the magniolia filter chain uses bypasses you can avoid the re-execution 
by defining an other bypass, but you can not solve the described issue without 
having doing the changes we talked about.

So I vote for changing that immediately. 
 

> Review usage of originalURI/currentURI, forward/include, virtualUriFilter
> -------------------------------------------------------------------------
>
>                 Key: MAGNOLIA-1698
>                 URL: http://jira.magnolia.info/browse/MAGNOLIA-1698
>             Project: Magnolia
>          Issue Type: Task
>          Components: core
>    Affects Versions: 3.1
>            Reporter: Grégory Joseph
>         Assigned To: Sameer Charles
>             Fix For: 3.2
>
>         Attachments: MAGNOLIA-1698.patch
>
>
> We should review
> * behaviour, usage and semantics of AggregationState's originalUri, currentUri
> * virtualUriFilter's behaviour (constants are wrongly named, behaviour 
> unclear with regards to prefixes, etc)
> * JspTemplateRenderer's usage of RequestDispatcher.forward() - should probly 
> use include()
> * the main filter definition in web.xml should maybe have
>       <dispatcher>ERROR</dispatcher>
>       <dispatcher>FORWARD</dispatcher>
>       <dispatcher>REQUEST</dispatcher>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------

Reply via email to