Jump to content

How to access Web Server Environment Variables?


sousuke
 Share

Recommended Posts

hey I've been given a web project which is Java based and I want to know how I would go aboutaccessing the web server environment variables so I can print them all out. It's for my testing, I'd like to see what variables are stored.This project is using shibboleth to protect it, here's the link for a detailed explanation.http://www.switch.ch/aai/demo/expert.htmlAs you can see with Step 13 of the Shibboleth process,Step 13:Finally, the user receives a Shibboleth session cookie and gets redirected to the resource of this demo. The attributes received from the user's Home Organization are provided by the mod_shib module to the web application as web server environment variables. Therefore, the resource could also use these attributes to further restrict access. Thanks heaps

Link to comment
Share on other sites

In JAVA, you can use the System.getProperty() method, and supply the environment variable name to get its value. If you want to get all environment variables as a collection, you can use the System.getProperties() method.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...