tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas LE BAS <m...@nlebas.net>
Subject Re: How to check if a JSP exists from a Tiles preparer
Date Mon, 09 Feb 2009 11:11:39 GMT
Hi Ignacio,

Your way is the best.

Checking if a JSP exists is theoretically the job of the application 
server, no library will help you with it (or at least, you shouldn't 
rely on it in the long term).
Eventually you may make a little optimization if you're short on 
resources (open files in the OS kernel) :

if (new 
java.io.File(context.getRealPath(templateBodyPathValue)).canRead()) {

Hope this helps,

View raw message