Skip to content

Tiles 2.2.1 EL AttributeEvaluator not being setup correctly. EL doesn't work in Tiles definitions [SPR-7251] #11910

@spring-projects-issues

Description

@spring-projects-issues

Steve Mosley opened SPR-7251 and commented

I'm trying to use EL in my tiles configuration. But the end result is after making sure the correct classes (JSP 2.1 and tiles-el) were on the classpath for Spring to attempt to setup an ELAttributeFactory for tiles the EL stuff isn't working. I can see it is still using the DirectAttributeEvaluator

To me it seems like the setup in org.springframework.web.servlet.view.tiles2.TilesConfigurer via the TilesElActivator is only calling setAttributeEvaluatorFactory on the BasicTilesContainer.
But it looks like it needs to be called at least on the BasicRendererFactory as well ... and probably on all the classes that implement AttributeEvaluatorFactoryAware.... all of which are setup through the BasicTilesContainerFactory

What I think may fix it
in TilesConfigurer$SpringTilesContainerFactory override the BasicTilesContainerFactory#createAttributeEvaluatorFactory method to create the ELAttributeEvaluator earlier in the process ... and just remove the TilesELActivator stuff ... but the comments in the code seem to indicate that it was a conscious decision not to set it up that way.

  • Steve

Affects: 3.0.2

Referenced from: commits 65655b9

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions