Skip to content

Add TilesViewResolver to enable fallback if tiles definition does not exist [SPR-5689] #10359

Closed
@spring-projects-issues

Description

@spring-projects-issues

Mark Fisher opened SPR-5689 and commented

Currently the typical way of integrating Tiles is to use a TilesView as the 'viewClass' for a UrlBasedViewResolver. Any UrlBasedViewResolver instance will prevent later resolvers in a chain (those with a higher 'order' value) from being invoked at all, because UrlBasedViewResolvers do not return null. In this particular case, the TilesView will be created and returned even if it the 'url' is an invalid tiles definition name.

However, it should be possible to add an earlier check within a TilesViewResolver implementation since the TilesContainer does provide an isValidDefinition(..) method. That way, we could return null and enable fallback to additional ViewResolvers in the chain.

For one thing, this would allow incremental adoption of Tiles within a large application that is currently using JSP via InternalViewResolver (and JstlView).


Issue Links:

2 votes, 2 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions