Jump to content
Sign in to follow this  
sousuke

How to access Web Server Environment Variables?

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...