Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 38042 invoked from network); 6 Sep 2004 10:25:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Sep 2004 10:25:51 -0000 Received: (qmail 91085 invoked by uid 500); 6 Sep 2004 10:24:45 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 91000 invoked by uid 500); 6 Sep 2004 10:24:44 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 90975 invoked by uid 99); 6 Sep 2004 10:24:43 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [195.157.145.29] (HELO mail.horizon-asset.co.uk) (195.157.145.29) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 06 Sep 2004 03:24:42 -0700 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Subject: Getting lastModified() from a (relative) URL Date: Mon, 6 Sep 2004 11:24:38 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Getting lastModified() from a (relative) URL Thread-Index: AcST+p6mr1MGREetRFyjZ8OVHdQHGwAAAg8w From: "Chris Ward" To: "Tomcat Users List" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, I'm just switching my servlets to read files using URLs rather than fully qualified filenames - which is fine - but I can't figure out how to get the files "last modified" value. I can get a lastModified header value from the connection but I'm not reading HTML files (if this makes any sense). This is what I've been using to read from the relative URLs. URL myURL =3D new URL( req.getScheme(), req.getServerName(), req.getServerPort(), req.getParameter("URL") ); HttpURLConnection conn =3D (HttpURLConnection)myURL.openConnection(); ... ... I need this info' because some of my apps' are caching files and need to notice when they've change on disc. Couldn't find anything in the archive. Thanks, Chris --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org