File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Setting Tomcat Envrionmental Variables for CGI Scripts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Setting Tomcat Envrionmental Variables for CGI Scripts" Watch "Setting Tomcat Envrionmental Variables for CGI Scripts" New topic
Author

Setting Tomcat Envrionmental Variables for CGI Scripts

Kevin Rose
Greenhorn

Joined: May 31, 2011
Posts: 1
I am looking to write several CGI scripts that use a custom Perl module that writes to a database following our software vendors business logic. The problem I am running into is that to use this perl module there are custom environmental variables that need to be set in order to access and use the module. I am able to get it to work if I set the environmental variables inside the cgi script by adding them to the ENV hash and enclosing them inside a BEGIN block.

I would prefer to not have to do this everytime I write a new cgi script. Is there a way to make it so Tomcat already has these environmental variables set so they are accessable from a cgi script? I have tried changing the parameter "passShellEnvironment" to true and adding these variable to the environment file in /etc/ but it still does not work.

Any ideas?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting Tomcat Envrionmental Variables for CGI Scripts