This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSP and the fly likes How to output all the values returned by System.getProperties ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to output all the values returned by System.getProperties ??" Watch "How to output all the values returned by System.getProperties ??" New topic
Author

How to output all the values returned by System.getProperties ??

Dennis Browne
Greenhorn

Joined: Mar 31, 2003
Posts: 1
How would I write a JSP to output all the values returned by System.getProperties
Thanks
Dennis
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
You can try this...
<%@ page language="Java" import="java.util.*"%>
<%
Properties prop = System.getProperties();
Enumeration enum = prop.propertieNames();

while(enum.hasMoreElements) {
String key = (String) enum.nextElement();
String value = prop.getProperty(key);
out.println("key = " + key + "; value = " + value);
}
%>
Hope this help you..
Correct me if i am wrong
daniel
[ April 01, 2003: Message edited by: Fisher Daniel ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to output all the values returned by System.getProperties ??
 
It's not a secret anymore!