History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: STR-2879
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Joe Germuska
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts 1

when used in modules, TilesPreProcessor not backwards compatible with 1.2.x

Created: 18/May/06 08:31 PM   Updated: 03/Jul/07 08:25 PM
Component/s: Tiles 1 Plugin
Affects Version/s: 1.3.4
Fix Version/s: 1.3.5


 Description  « Hide
When used in any "module" other than the "root" (or default), the implementation of TilesPreProcessor does not work in the same way that the TilesRequestProcessor did in earlier versions of Struts.

Specifically, because it does not dispatch the forward itself, it leaves the "module" unarticulated; this causes PerformForward to attempt to resolve the base Tiles JSP (or other path) relative to the current module, which is not how it used to be.

I think the best solution would be for the TilesPreProcessor to actually do the requestDispatcher.forward() (or include) in cases where it finds that the working ForwardConfig is for a tile definition, rather than returning a ForwardConfig. It can return "true" to signal that the chain should end.

The only argument against this would be if people thought they'd want to add more chain logic after the TilesPreProcessor. I suppose it could set the ForwardConfig to null and let the chain continue.

I'd love some opinions on this, and it'll be a couple of days before I could do a fix, so please weigh in if you have any. Also, module users are encouraged to step up and help clarify, as I only use them under protest :)

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Lukasz Racon - 19/May/06 05:16 PM
As a quick workaround, one can define forwardPattern in module's struts-config.xml, i.e.:
  <controller forwardPattern="$P" />

That is just a temporary fix.

Joe Germuska - 20/May/06 07:57 PM
Fixed in SVN commit 408085: TilesPreProcessor now handles forwarding itself with RequestDispatcher, more like what TilesRequestProcessor did in Struts 1.2.x

Also, TilesPreProcessor no longer stops execution of the chain when doing an include; instead, if tiles does either an include or a forward, it clears the forwardConfig from the ActionContext, but it allows the chain to continue processing. I can't think of any use cases myself where I'd need this, but it seemed better to leave it open, and since forwards (the more common case) were allowing the chain to continue before, I chose to preserve that and change the doInclude case to be consistent with the doForward case.