A JSP That Shows The Current System Properties

Here are two JSP's that shows the current System Properties.

First, here is a simple version:

<%
   java.util.Enumeration e = System.getProperties().propertyNames();
   while( e.hasMoreElements() ){
   	String prop = (String)e.nextElement();
   	out.print(prop);
   	out.print(" = ");
   	out.print( System.getProperty(prop) );
   	out.print("<br>");
   }
%>


Next is version that format the results in a table:


<%@ page import="java.util.*" %>
<B>These are your current properties: </B><BR> <BR>
<%
   out.println("<table width=600 border=1>");
   out.println("<tr>");
   out.println("<td width=150><b>PROPERTY</b></td>");
   out.println("<td width=450><b>VALUE</b></td>");
   out.println("</tr>");
   out.println("<tr>");
   Properties props = System.getProperties();
   Enumeration enum = props.propertyNames();
   while (enum.hasMoreElements()){
      Object o = enum.nextElement();
      String key = (String)o;
      out.println("<td width=150><b>" + key + "</b></td>");
      String val = props.getProperty(key);
      StringTokenizer st = new StringTokenizer(val,":");
out.println("<td width=450>");
while (st.hasMoreTokens()){
String valind = st.nextToken();
out.println(valind + "<BR>");
}
out.println("</td>");
out.println("</tr>"); } %>