You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dmitry Beransky <db...@dembel.org> on 2003/12/14 02:54:06 UTC

getDate on a resource

Hi,

In my application i need to determine the last modification date of a 
resource.  I'm doing this with the following few lines of code:

       URL resource = context.getResource(uri);
       URLConnection conn = resource.openConnection();
       Date date = new Date(conn.getDate());


however, the date returned is 0.  A call to getResource() returns a url 
looking like "jndi:/localhost/reclass/layout.jsp".

Am I not doing this right?  What's the proper way to find out a resource's 
date?

I'm running Tomcat 4.1.27.


Thanks
Dmitry


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