File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting Tomcat Envrionmental Variables for CGI Scripts

Kevin Rose
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic