tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Resource vs. RealPath
Date Sun, 07 May 2006 01:29:06 GMT
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
>>              .getResource()
>>              .openConnection()
>>              .getLastModified());
> 
> 
> Ah! I did miss that...  However...
> Openning a connection seems potentially
> more expensive than "merely" getting the timestamp on a file.
> (I was planning on checking this at the beginning of every request,
> and by the time this application is finished, there could
> end up several levels of resources that might occasionally
> get updated).
> Is this likely to be an issue?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message