my dog learned polymorphism
The moose likes Struts and the fly likes Tiles and Ear files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles and Ear files" Watch "Tiles and Ear files" New topic

Tiles and Ear files

Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102

I do not know if this question is best asked here, however tiles are part of Struts (even tough now can be used from other frameworks as well).

My question is relatively simple. Is it possible to have an ear file with several war files, have one of these war files the main application (with a header, body and a footer), and then using tiles the body is loaded from another war file?

A simple example that comes to my mind is this same forum (although sure not implements in this way). Imagine you have the main war files that define the sections (forum, login & register, etc). Then for each section you have a separate war file. I would want the header and footer to remain the same, but load the body contents from the other war files with the logic stated in that war file.

I am asking because do not know if it is possible, and did not find examples on the net of this. I tried a simple application on my own, trying to load the google home page in my body with tiles. However the result was

�The requested resource (/app/WEB-INF/pages/ is not available�

This means it tried to load that page from inside my war file However I am only deploying a war file at the moment and not an ear, bit afraid the same result will come.

Thanks for any comments.

Simon J.
Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102

I have searched a lot on Google, and also read all the topics of the book �Struts in Action� related with either tiles or ear! However I can not seem to find any example

Is this possible? Has anyone ever set the tiles of an ear file to load different parts of the page from different war files?

I have decided to stop research and start experimenting. However do not know where this will get me.

Any comments are more then welcome.

Thanks and Regards,
It is sorta covered in the JavaRanch Style Guide.
subject: Tiles and Ear files
It's not a secret anymore!