Search code examples
javalinuxtomcatenvironment-variablesubuntu-10.04

Set environment variable in shell script/access in Tomcat Application


I want to add and environment variable which can access by my tomcat web-app. I have gone through this link but i want to set environment variable in root user. How to do that?


Solution

  • got the solution...what i have done is i have put the export statements in /etc/init.d/tomcat6 at top and restarted the server by command sudo /etc/init.d/tomcat6 restart. So now my web-app running in tomcat server can access that variable.