tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignacio de Córdoba <icord...@skios.es>
Subject Re: How to check if a JSP exists from a Tiles preparer
Date Mon, 09 Feb 2009 10:50:28 GMT

Hi Antonio,
I offer a service of portal creation. Now it is using plain old JSP and
there is a second version using struts+tiles (v1) There are thousands of
portals working with the same HTML.
If a user wants to change Look&Feel of his portal he can change his CSS file
keeping the same HTML as everyone. Many times that is enough but many want
to also change HTML for their templates. There is a special dir in their
hosting space calle templates. They can upload a template there with the
same path and name as the original tile. It will then be real time replaced
when requested by the action.
I used to do this with a custom tag when only used JSP. When moved to
struts1 I had to do it using a extremely baroque technique (I used the
"path" parameter definition in these templates pointing to a struts
action... ufff). Now with tiles2 it is very very simple thanks to preparers.
(Oh God how come I didn't move to tiles2+struts2 before!). Anyway, I am
checking the InputStream resource in the preparer as this is what I used to
do before in the action, but was wondering of another way to check if a
resource (really just the JSP for a tiles template) really exists.
My solution is working fine. I just wonder if there is another way.

Regards,
Ignacio
-- 
View this message in context: http://www.nabble.com/How-to-check-if-a-JSP-exists-from-a-Tiles-preparer-tp21906395p21910537.html
Sent from the tiles users mailing list archive at Nabble.com.


Mime
View raw message