-
Notifications
You must be signed in to change notification settings - Fork 38.5k
TilesConfigurer not safe to use in multiple DispatcherServlet definitions [SPR-11587] #16211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Torsten Krah commented Example project. |
Torsten Krah commented Maybe its possible to use the DispatcherServletName as default containerKey |
Juergen Hoeller commented Indeed, it may be necessary to always qualify the container to use. In addition to overriding getContainerKey in our SpringTilesInitializer, we'd have to set the same key for the TilesContainer lookup in TilesView's afterPropertiesSet, and I suppose we'd also have to call TilesAccess.setCurrentContainer for every request before invoking the Tiles renderer in TilesView... Juergen |
Torsten Krah commented If possible when this is going to be fixed - it would be nice to have most of those tiles integration classes and methods protected to be able to reuse the Spring Components to integrate Tiles but be able to overwrite some of them (currently most of them are private), if some customizing while integrating tiles and spring is needed. Currently you are forced to just overwrite mostly all classes and copy all the code while the goal is to just overwrite one method. Maybe this can be done with this ticket too. |
Juergen Hoeller commented Now is a fine time to pick this one up for 4.3! Concrete change proposals are very welcome, both for the container qualifier part and the method visibility part... Juergen |
Torsten Krah commented Juergen Hoeller i did a first try for that one under: https://github.com/tkrah/spring-framework/tree/SPR-11587 Should i include the visibility part there too or do two changesets - one for the issue itself and one for the visibility thing? |
@jhoeller Any news here? |
Closing since Tiles support has been dropped for 6.0 with #27423. |
Torsten Krah opened SPR-11587 and commented
Hi,
got some mysterious problem.
Just do a "gradle jettyRunWar" on the attached project and go to
http://localhost:8080/web/view/
andhttp://localhost:8080/admin/view/
- it will render Apples and Tomatoes.Stop the stuff and go to the web.xml and remove the comments from load-on-startup of the tomatoes servlet.
If you now go to
http://localhost:8080/web/view/
you getI don't know exactly what the error is - but in another project we got 3 DispatcherServlets in one web.xml which are all mapped to different URLs and each got its own Tiles definitions.
Only one Servlet can found its mappings, the other Servlets fails to find their views.
It maybe related to
SpringWildcardServletTilesApplicationContext
which uses the ServletContext to store things (or the app key which is null) - but that only a guess, still searching the exact cause.Affects: 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6
Reference URL: #1355
Attachments:
The text was updated successfully, but these errors were encountered: