Struts2 with Tiles 2.1 or 2.2
Asked Answered
V

2

8

there doesn't seem to be a simple way to use Tiles 2.1 or 2.2 with Struts2 with the existing struts2-tiles plugin. I need to use the tiles wildcards functionality in my project where the tiles.xml became unmaintainable.

Is there any way at all to set up tiles 2.1 or 2.2 with struts2? How?

Thank you,

Bozo

Vaca answered 3/2, 2010 at 9:46 Comment(1)
Please see: #10050933 for how to get Tiles 2.2.2 working with the current release of struts2.Marjorie
R
5

As far as I'm aware current struts2 major release ships with tiles 2.0.6. Wildcard support has been added since tiles 2.1 so I'm afraid you can not use wildcards with current version of plugin.
If you want to setup the tiles 2.1+ with struts2 anyway you have to tweak the plugin yourself or wait for the next release.
You also might wanna consider using a preparer in case you want to set some dynamic values to you definition. Hope this helps. you can check this issue for tiles plugin which is unresolved yet.

Raynold answered 24/6, 2011 at 8:15 Comment(5)
Are you aware, has anyone integrated the newer version of tiles2 with Struts in some project, somewhere?Vaca
@Vaca According to the link I gave you above it's planned for integration, but don't know when it's gonna be released.Raynold
I'm pretty sure I have such a project... So I think there is one somewhere. I'm not trying to be cryptic, I asked a very similar question and someone sent me their project I just found it difficult to decipher at the time and this question prompted me to look for it. It must be at home...Marjorie
If you find it please send it along. :)Vaca
Here is a working example in Netbeans.Bluebonnet
W
6

I suggest you to use Sitmesh decoration framework for strut2

Windrow answered 4/2, 2010 at 5:12 Comment(3)
Update: there is now Tiles 2.2.2 (GA) available and Struts 2.2.3. And it seems the latest Struts ships with tiles libs 2.0.6. Has anyone managed to integrate these latest versions of Struts2 and Tiles2? I am not interested in Sitemesh since this is a big existing tiles based project.Vaca
I was able :), I use the last Tiles libs and Struts 2.2.3 in my web applicationsLaureen
Have you changed the existing struts2-tiles plugin to do it? What's the cookbook here? :)Vaca
R
5

As far as I'm aware current struts2 major release ships with tiles 2.0.6. Wildcard support has been added since tiles 2.1 so I'm afraid you can not use wildcards with current version of plugin.
If you want to setup the tiles 2.1+ with struts2 anyway you have to tweak the plugin yourself or wait for the next release.
You also might wanna consider using a preparer in case you want to set some dynamic values to you definition. Hope this helps. you can check this issue for tiles plugin which is unresolved yet.

Raynold answered 24/6, 2011 at 8:15 Comment(5)
Are you aware, has anyone integrated the newer version of tiles2 with Struts in some project, somewhere?Vaca
@Vaca According to the link I gave you above it's planned for integration, but don't know when it's gonna be released.Raynold
I'm pretty sure I have such a project... So I think there is one somewhere. I'm not trying to be cryptic, I asked a very similar question and someone sent me their project I just found it difficult to decipher at the time and this question prompted me to look for it. It must be at home...Marjorie
If you find it please send it along. :)Vaca
Here is a working example in Netbeans.Bluebonnet

© 2022 - 2024 — McMap. All rights reserved.