Caldarale, Charles R wrote:
From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Logo file location
Upon further examination of the spec page above, I would guess that a
better way (more flexible) would be to specify the relative URI of your
file as an <init-param> value, and then do a getRealPath() to convert
that into a real path
No, no, no - there is *never* any guarantee that getRealPath() will return anything.
(Personally, I think it should be deprecated; it's bloody dangerous.) Use
getResourceAsStream(), as previously suggested. Using <init-param> is
certainly a good idea if you don't want to hard-code the path in the servlet code.
I don't want to hijack the OP's thread any further, so I'll leave it at
that, and start a new one on this (resource file location).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org