Ah, thank you. I neglected to update the build.xml file to include copying that file over.

Thanks,
Jim.

Shapira, Yoav wrote:

Howdy,
Are you sure the resource specified by APP_FILE_PROPKEY is actually
there in your testing environment?

Yoav Shapira
Millennium ChemInformatics



-----Original Message-----
From: Jim Lynch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 8:00 PM
To: Tomcat Users List
Subject: getResourceAsStream woes was: getRealPath woes

As I mentioned, all of these systems are pretty much identical.  What I
didn't include in the source was a test to see if getRealPath was
working and if not, to issue a getResourceAsStream. It also returns a
null value.  See:

stream=getServletContext().getResourceAsStream(APP_FILE_PROP_KEY);

Now that you mention it, I believe I've accused the wrong method. The
getResourceAsStream is failing.  I get a stream on the other two

systems


but not on testing.

Jim.

Tom Parker wrote:


On Wed, 2003-11-05 at 12:30, Jim Lynch wrote:



On the dev. and prod. systems the getRealPath method returns the
expected string.  On the testing environment it returns null.


I've found that getRealPath returns null when you are running your
application from a war file without unpacking it. If the file you are
trying to find doesn't exist on the disk, then this is an indication
that you won't be able to get it with getRealPath.

I guess this is because it is too complicated to patch into all the

file


manipulation functions to allow access to the packed contents of the

war


file.

getResourceAsStream() works regardless of whether the war file is
unpacked or not.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to