tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: FileNotFoundException in Tomcat6.0
Date Fri, 18 Dec 2009 17:46:00 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kumaravel,

On 12/18/2009 7:45 AM, jkv wrote:
> I was actually not specifing any path to open a file "text.txt" as i had it
> under
> WEB-INF/classes/test.txt, assuming my classes folder should be in classpath.

While your file was in the class path, you aren't using a method that
uses the class path.

> So I started to use getRealPath("/"), not sure of the implications though.

As has been said several times over the last few days/weeks on this
list, the use of getRealPath() is strongly discouraged.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksrv9gACgkQ9CaO5/Lv0PCOLQCggB17VBE/Qnm3Qpm+D2bBvGG7
ntUAoLdgFrxPg0bBHpTQLalDEDHH+MLH
=BQtI
-----END PGP SIGNATURE-----

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


Mime
View raw message