SystemProperties.jsp.

JAVA PRIMER
JSP: Beyond Dynamic HTML
Duane K. Fields
Listing 2. SystemProperties.jsp.


<%@ page contentType=”application/x-msexcel”
      import=”java.util.*” %>
“Property Name”,”Property Value”
<%
Properties sysprops = System.getProperties();
Enumeration keys = sysprops.propertyNames();
while (keys.hasMoreElements()) {
  String name = (String)keys.nextElement();
  String value = sysprops.getProperty(name);
%><%= name %>,<%= value %>
<% } %>

About the Author

Duane Fields is co-author of the best-selling book Web Development with JavaServer Pages. He can be contacted at duane@deepmagic.com.

Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.