users@glassfish.java.net

Re: Reading System

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Fri, 18 Mar 2011 11:37:52 -0500

Maybe there is a difference here between EJBs and other web content.
Hopefully someone from the EJB team can chime in.

I tried a simple web application with the following JSP content:

<h2>Environment</h2>
<% for (String n : System.getProperties().stringPropertyNames()) {
             out.append(n).append("=").append(System.getProperty(n));
             out.append("<br>");
             out.newLine();
         }
         %>

I ran:

asadmin create-system-properties --target server foo=bar

and then accessed the application, and the value of the property was
printed by the JSP.

Tom