| Author |
Environment variable in linux
|
Pravin Shirke
Ranch Hand
Joined: Apr 05, 2008
Posts: 146
|
|
The environment variable where i store the xml files physical path then in the connections.java class i read the environment variable and pass it to the confighandler.java Here is the code for the above. String path=System.getenv("CONFIG_PATH").toString();//read the environment variable named CONFIG_PATH filePath=new File(path).toURI().toString(); and pass it on to the ConfigHandler ConfigHandler config=new ConfigHandler(filePath); I have created the environment variable in windows where i store the physical path of the Config.xml file, I am able to read the path of the environment variable in windows but not in linux redhat 5 server The prob is that i need to deploy it on the linux redhat 5 server. on linux also i have declared the environment variable with the same name but it does not reads the file when i deploy the project as a war in tomcat 5.5 but when i tried to test it with a sample jsp it read the environment variable. can any one give any hint. i have given 777 rights for that war file so root can execute the war file. any suggestions??
|
[Vipassana] - It is seeing the reality as it is, And not as you want it to be.!!!
SCJP1.5.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56549
|
|
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP. This post has been moved to a more appropriate forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Environment variable in linux
|
|
|