This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft 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 Java 8 in Action this week in the Java 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 ??
 
Similar Threads
Oracle stored procedures
properties file
I am getting null value insted of system information.
Process type
How to get values in hashtable