Re: Resource vs. RealPath

2006-05-06 Thread Tim Funk
Its not as expensive as you think. The connection is NOT an HttpConnection. Its a connection to a custom resource loader. -Tim Bruce Miller wrote: Tim Funk wrote: You'll need to clean the following up but you can use this: Date lastModified = new Date(servletContext .getReso

Re: Resource vs. RealPath

2006-05-06 Thread Bruce Miller
Tim Funk wrote: You'll need to clean the following up but you can use this: Date lastModified = new Date(servletContext .getResource() .openConnection() .getLastModified()); Ah! I did miss that... However... Openning a connection seems potentially more

Re: Resource vs. RealPath

2006-05-06 Thread Tim Funk
You'll need to clean the following up but you can use this: Date lastModified = new Date(servletContext .getResource() .openConnection() .getLastModified()); -Tim Bruce Miller wrote: Hi Tomcatters; A seemingly naive question: I've got various configura

Resource vs. RealPath

2006-05-06 Thread Bruce Miller
Hi Tomcatters; A seemingly naive question: I've got various configuration data, tucked away under /WEB-INF/. If I use context.getRealPath(datapath), I can check the timestamp, so that I know if it needs to be re-read. However, this fails if we're serving from a .war file (in which case, presumab