A new TSS article, by Patrick Peak, shows you how to handle page layout, and create a well-organized, maintainable, Struts-based application using the Tiles Framework. Tiles 101 looks at how to create a standard layout using tiles; In Tiles 201 you will use Tiles Controllers to improve the overall architecture of your application. Examples from an online Penguin Store sample app are provided.
Read Tiles 101/201 by Patrick Peak
-
Tiles 101/201: Using the Struts/Tiles Framework in your Web App (18 messages)
- Posted by: Nate Borg
- Posted on: April 07 2003 16:52 EDT
Threaded Messages (18)
- Nice Intro to Tiles by Michael Mattox on April 08 2003 12:34 EDT
- Nice Intro to Tiles by Eugene Bloss on April 08 2003 16:03 EDT
- Tiles by Yann Cebron on April 09 2003 01:19 EDT
-
Tiles x ServletSuite template tags by Rogerio Liesenfeld on April 09 2003 12:19 EDT
-
Ditto, just use includes by Denis Baranov on April 10 2003 02:19 EDT
-
Ditto, just use includes by Michael Mattox on April 10 2003 11:09 EDT
- Just as I said, <jsp:include /> by Denis Baranov on April 10 2003 12:15 EDT
-
Ditto, just use includes by Michael Mattox on April 10 2003 11:09 EDT
-
Ditto, just use includes by Denis Baranov on April 10 2003 02:19 EDT
- Nice Intro to Tiles by Eugene Bloss on April 08 2003 16:03 EDT
- Struts 1.1 by Jay Sissom on April 08 2003 14:23 EDT
- Start Using it now! by qwam swatidi on April 09 2003 10:36 EDT
-
Start using it now? by Jay Sissom on April 09 2003 12:59 EDT
- Start using it now? by Michael Mattox on April 10 2003 11:10 EDT
-
Start using it now? by Jay Sissom on April 09 2003 12:59 EDT
- Start Using it now! by qwam swatidi on April 09 2003 10:36 EDT
- Liferay Portal Moved from Struts to Struts+Tiles by Brian Chan on April 08 2003 14:59 EDT
- Dumoulin, not Demolin ;) (no body) by Raphael Hacquin on April 15 2003 17:50 EDT
- Tiles experience by Andrew Perepelytsya on April 16 2003 22:20 EDT
- Tiles 101/201: Using the Struts/Tiles Framework in your Web App by prirua a on October 10 2003 01:41 EDT
- Component framework by Vasyl Stashuk on October 20 2003 03:40 EDT
- WebLogic portal server vs Struts/tiles by Asiri Liyanage on October 04 2005 23:20 EDT
- Tiles + action mapping by xx xxx on January 18 2006 15:11 EST
-
Nice Intro to Tiles[ Go to top ]
- Posted by: Michael Mattox
- Posted on: April 08 2003 12:34 EDT
- in response to Nate Borg
Nice intro to Tiles, I hope this will get more people interested in using Tiles. I also like how you presented the Tiles Controller concept. There are many Tiles users that do not take advantage of this (because they're not familiar with it). Often I pose a question to the Struts mailing list and people reply back how I should use actions to preload the values for a form, which is much better done with a Tiles controller.
For more information on Tiles, I strongly recommend Struts in Action.
Michael -
Nice Intro to Tiles[ Go to top ]
- Posted by: Eugene Bloss
- Posted on: April 08 2003 16:03 EDT
- in response to Michael Mattox
Yes, Tiles are one of the most useful things in Struts. By, the way you can use templates even without the framework: www.servletsuite.com/servlets/template.htm -
Tiles[ Go to top ]
- Posted by: Yann Cebron
- Posted on: April 09 2003 01:19 EDT
- in response to Eugene Bloss
Eugene,
FYI, Tiles can also be used independently without Struts, see the PDF available at Cedric's site for details. -
Tiles x ServletSuite template tags[ Go to top ]
- Posted by: Rogerio Liesenfeld
- Posted on: April 09 2003 12:19 EDT
- in response to Eugene Bloss
I personally find the approach used in the ServletSuite template tags much better than the one used by Tiles. I mean, why go to the trouble of using an XML file if you can achieve the same results by just using a few custom JSP tags in your JSP pages. -
Ditto, just use includes[ Go to top ]
- Posted by: Denis Baranov
- Posted on: April 10 2003 02:19 EDT
- in response to Rogerio Liesenfeld
Tiles is a dead end. Anyone who want to argue this should take a good look at the sources. Now, I'm being told that <jsp:include /> has to be replaced with all this chain of calls?! Yeah, try getting to the bottom of the <tiles:insert /> to see what I mean. I think that the approach "let's have seven layers of indirection in case we need the solution to 99% of problems" is wrong. To integrate workflow and security and the other dosen concerns into a generic framework is just wrong.
I'll try looking sideways. Aspect-oriented, will that be the right buzzword? -
Ditto, just use includes[ Go to top ]
- Posted by: Michael Mattox
- Posted on: April 10 2003 11:09 EDT
- in response to Denis Baranov
If Tiles is a dead end, what road are you currently taking? I see Tiles as the best approach that's currently available. It's not perfect but it's the best we've got at this time.
Michael -
Just as I said, <jsp:include />[ Go to top ]
- Posted by: Denis Baranov
- Posted on: April 10 2003 12:15 EDT
- in response to Michael Mattox
The idea of scriptlet riddance was taken too far, IMO. Scriptlets are fast to write, quick to debug and easy to iunderstand. After the code got stabilized, migrate it into custom tag. This way it is lean and mean, you get only what you need by least means possible. -
Struts 1.1[ Go to top ]
- Posted by: Jay Sissom
- Posted on: April 08 2003 14:23 EDT
- in response to Nate Borg
We hope to use Tiles and a bunch of the newer Struts features if Struts would ever become a 1.1 release. We won't use non-released code in our applications. Struts 1.1 has been beta for over a year.
Some day, if it ever becomes 1.1, we'd love to use these new features. -
Start Using it now![ Go to top ]
- Posted by: qwam swatidi
- Posted on: April 09 2003 10:36 EDT
- in response to Jay Sissom
Been using Struts 1.1 beta for ages now and can happly say that product is completely stable enough to consider using right now.
We've built a number of large scale applications using tiles and some of the newer features of 1.1 without any problems whatsoever.
I'd wouldn't wait for the final release. Start using it now.
cheers and many thanks to Jakarta,
qwam. -
Start using it now?[ Go to top ]
- Posted by: Jay Sissom
- Posted on: April 09 2003 12:59 EDT
- in response to qwam swatidi
If the people that write Struts don't think it's good enough for production, why should I use it in production? It has been a year (or so) since 1.0 was released, so it could be quite a while before 1.1 is a production release. That means I can't use it for development either. I can play with it, but can't use it for real work.
If it's so good, it should be a production release. Until the authors of Struts release it, I have to assume it can't be used in production. -
Start using it now?[ Go to top ]
- Posted by: Michael Mattox
- Posted on: April 10 2003 11:10 EDT
- in response to Jay Sissom
I see your point. On one hand, it's completely stable and works great. On the other the development team isn't motivated by commercial reasons to increase version numbers frequently. If Struts was made by Borland no doubt it'd be at version 5 by now. really Struts could have been 2.0 about 6 months ago, would that change the quality? It's just a name. -
Liferay Portal Moved from Struts to Struts+Tiles[ Go to top ]
- Posted by: Brian Chan
- Posted on: April 08 2003 14:59 EDT
- in response to Nate Borg
Liferay Portal (open source enterprise portal solution, www.liferay.com) recently moved from a pure Struts impl to a Struts+Tiles impl. The move itself took about 2 days, but the benefits are amazing. We lowered the number of lines of repetitive code (JSPs) by about 20%, and now we can create entirely different layouts for the portal by changing 2-3 key files.
You can check out a demo for the portal at my.liferay.com (it's an app that is very similar to the my yahoo and is geared for intranets, provides web e-mail, message boards, calendar, wiki, and other portlets as well). -
Dumoulin, not Demolin ;) (no body)[ Go to top ]
- Posted by: Raphael Hacquin
- Posted on: April 15 2003 17:50 EDT
- in response to Nate Borg
empty -
Tiles experience[ Go to top ]
- Posted by: Andrew Perepelytsya
- Posted on: April 16 2003 22:20 EDT
- in response to Raphael Hacquin
1. Tiles is one possible way. Perhaps, component-driven web frameworks like Tapestry and Apple WebObjects, give another view, though not everyone accepts it (the same as with tiles :)
2. I read the Tiles author's PDFs several month ago. Though, it is not stated in the article under discussion, the PDF doesn't dictate using controllers in place of actions. It generalises the approach and says they are quite equivalent, except tiles has this ComponentContext. With actions you just return null if you do not want anything to be displayed, return en error forward or success one. It could be something like <put name="penguinOfTheDay" value="/action/pod" />. And what is done with ComponentContext can be modeled in a user state in the model (depends on the app).
3. XML definitions are really cool. If you didn't get it yet, invest some time in it, and it will pay you back. It's all about OO principles - inheritance, where you can override, extend a tile, etc. (no polymorphism, sorry ;)
4. Tiles didn't solve action chaining problems for me. Creating a fatter action/controller is not always a solution (though, the approach in the article recommends exactly this). Consider the case, when you are requesting the data to display in the table, and the same data on the same page is used to chart an image - quite tricky.
In general, I was very pleased with tiles. Right now I'm finishing quite a long-term project that used it, and it was really a pleasure (and extremely easy!) to add/modify/remove dynamic page content after setting everything up. It's like with J2EE - it's an awful lot of info at first, it starts to work only after some up-front work.
If you are not convinced - I recommend you read the PDFs I mentioned above. -
Tiles 101/201: Using the Struts/Tiles Framework in your Web App[ Go to top ]
- Posted by: prirua a
- Posted on: October 10 2003 01:41 EDT
- in response to Nate Borg
Hi Everyone,
this is my first posting on this group...
I am trying to develop a jsp that will be containing data that comes from multiple jsps
the "jsps" to be selected has to be decided at run time...
i have thought of one approach of using tiles and struts ...and change the tile content jsp dynamically ...
but i dont know whether this is the only and best approach...
please give me suggestions for the same...
waiting eagerly for replies
bye,
PRiyank.
priyankpatwa at yahoo dot com
PPriyank@pun.cognizant.com -
Component framework[ Go to top ]
- Posted by: Vasyl Stashuk
- Posted on: October 20 2003 03:40 EDT
- in response to Nate Borg
Is it possible to build component framework for WEB on the basis of tiles?
ControllerClass may be used to make message-dispatching in components. -
WebLogic portal server vs Struts/tiles[ Go to top ]
- Posted by: Asiri Liyanage
- Posted on: October 04 2005 23:20 EDT
- in response to Nate Borg
Hi,
We are to start a project which has a choice of using WebLogic portal server of Struts/tiles. But there are very limited sources to compare these two exists. Has anyone undergone the both technologies. What do you think is the better solution? Any help is greatly appreciated. -
Tiles + action mapping[ Go to top ]
- Posted by: xx xxx
- Posted on: January 18 2006 15:11 EST
- in response to Nate Borg
I have done the same thing given in the below link.
https://www.theserverside.com/articles/article.tss?l=Tiles101
i created a tiles definition like
<definition name="@dviewPDS" extends="basic.layout">
<put name.../>
<put name=.../>
</definition>
and then action mapping of struts-config.xml goes like this
<action path="/ViewPDS" type="com.xx.actions.ViewPDs">
<forward name="success" path="@dviewPDS"/>
</action>
when i run the application it getting error like "Error 404 File not found:/@dviewPDS"
Plz help