wood burning stoves 2.0*
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/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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 ]
 
 
subject: How to output all the values returned by System.getProperties ??