Howdy,
>> <%@ page import="java.util.*" %>
>> .....
>> <%
>> Properties myProps = new Properties();
>> InputStream pin =
>> getServletContext().getResourceAsStream("/WEB-INF/my.properties");
>> myProps.load(pin);
>> pin.close();
>> %>
>
>Is that portable? Is there anyplace in the spec that mentions that
/WEB-
My understand of SRV.3.5 as well as the JavaDoc for
javax.servlet.ServletContext#getResource was that this is portable.
Your code has to be tolerant of the case where the resource doesn't
exist (null is returned) as well as enforce further security on the
resource (for example if some data in a data file shouldn't be available
to the user, you have to filter out this data yourself). But other than
that, the container is required to make resources under your context
root available.
Looking at the 2.4 spec PFD, I don't see anything to contradict the
above. But if I'm wrong on this point, I'd like to know about it please
;) Thanks,
Yoav Shapira
Millennium ChemInformatics
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]