• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Dennis Browne
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would I write a JSP to output all the values returned by System.getProperties
Thanks
Dennis
 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic