dcsimg
Reading Properties file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bala_Subra
Posted On:   Monday, November 26, 2001 10:17 AM

I am using iplanet application server (test version)for the development of the jsp and servlets and java beans. In the java bean i read all the database properties like name, userid, password from a properties file. When I created the .war file I have put the properties file inder a new directary called Prop/dsn.properties The problem I am facing is when I package it in a .ear and deploy it in the main testing server java bean is unable to locat the properties file. But the java bean is able to locate the properties file in my test drive version. To siplify how should I read my properties file so that I can deploy it in any application server    More>>

I am using iplanet application server (test version)for the development of the jsp and servlets and java beans.


In the java bean i read all the database properties like name, userid, password from a properties file.


When I created the .war file I have put the properties file inder a new directary called Prop/dsn.properties


The problem I am facing is when I package it in a .ear and deploy it in the main testing server java bean is unable to locat the properties file.


But the java bean is able to locate the properties file in my test drive version.


To siplify how should I read my properties file so that I can deploy it in any application server

   <<Less

Re: Reading Properties file

Posted By:   damon_henry  
Posted On:   Monday, November 26, 2001 01:47 PM

If you're deploying your application to IPlanet, you can create a startup servlet and set the db properties as arguments through the GUI (check out the iplanet docs). If you are not deploying your application to an IPlanet environment, you may set-up your startup servlet via the web.xml file (check the servlet specs from sun). Either way, it allows you to pass different parameters to the application as needed.

Thx
About | Sitemap | Contact