tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Access XML file inside the Java File
Date Wed, 04 Aug 2010 13:40:00 GMT
> From: Chandana Napagoda [mailto:cnapagoda@gmail.com]
> Subject: Access XML file inside the Java File
> 
> I have Domain class it need to read file and need to return 
> File object.

Bad design.  When running inside an app server, there's no guarantee that you have any access
to the underlying file system, other than a container-provided scratch area.  Much better
to use ServletContext.getResourceAsStream().

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

Mime
View raw message