ic.... It works ...
This is the best approach that I may Used....
Thanks Sreeni ..
On 5/4/06, Sreenivasulu R Gaddam <[EMAIL PROTECTED]> wrote:
Instead of hardcoding, you can define a variable in
the web.xml as
<context-param>
<param-name>jndiproperties</param-name>
<param-value>relativepathtowebapp/jndi.properties</param-value>
<description>jndi properties</description>
</context-param>
and get the path name from the servlet context real
path as follows.
String propsFilePath =
ServletContext.getRealPath(ServletContext.getInitParameter("jndiproperties"));
Once you have the file path, then you can read using
FileInputStream.
FileInputStream in = new
FileInputStream(propsFilePath);
Properties props = new Properties();
props.load(in);
-Sreeni.
--
Regards,
Feris
PT. Putera Handal Indotama
JL. KH. Moh. Mansyur No. 11 Blok B.8-12
Telp. +62-21-631 6688 (Hunting)
Fax. +62-21-6330211
Jakarta (10140) - INDONESIA
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]