File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts 2 Tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 Tiles" Watch "Struts 2 Tiles" New topic
Author

Struts 2 Tiles

Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Hi Guys, Just wanna double check if i am doing things right.

I am using struts 2 tiles to manage the view.
This code is actually working.

Just that am not really sure on what approach should be used or if i am doing things right. But according to some examples i read this is how they do it.

Just double checking before committing the project. Because if in long run maintainance will be a problem , i'll definitely be in trouble.

Thank You for your suggestions and comments in advance!

Here's my code:

My layout.jsp


My header.jsp


My login.jsp


heres my tiles.xml


Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Is there like an include element in tiles.xml that can lessen the codes?

because if it's a big project tiles.xml

will definitely bring lots of block of codes....

Thanks Again!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You could also consider using plain old JSP templating.

It seems fine; although you're probably creating invalid HTML by repeating the <html>, <head>, and <body> tags.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 Tiles