• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Junilu Lacar
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Himai Minh
  • Carey Brown
  • Frits Walraven

Setting Tomcat Envrionmental Variables for CGI Scripts

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic