> From: André Warnier [mailto:[email protected]] > 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. - 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. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
