-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chandra,
On 8/4/2010 6:28 AM, Chandana Napagoda wrote: > I have Domain class it need to read file and need to return File object. > When I'm getting my file object. My domain class always try to access in Bin > ("D:\Share\apache-tomcat-6.0.20\bin\connections.xml") Maybe you have the path wrong. Maybe not. What does your code look like? That's kind of rhetorical, since I know it looks like this: InputStream in = new FileInputStream("connections.xml"); ... ...but post your code, anyway. > It it possible to access read file inside the War file? Yes. Use the Servlet API to get access to your webapp's resources instead of trying to read the disk directly. Hint: look at methods in the ServletContext class. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxZbvgACgkQ9CaO5/Lv0PAWcACgt9NBV9Y4Ljhc7HLDyyHJ6ksX xJ8AoLjWH1T02loHtAAW0zOyrwKzPGp2 =ssJ1 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org