<jsp:directive.page pageEncoding="UTF-8" />
<jsp:scriptlet>
	// printContext.jsp は、javax.servlet.ServletContext オブジェクトのことです。
	// JSP では、application オブジェクトでアクセスできます。
	// スコープは、application です。
</jsp:scriptlet>

<b>ServletContext AttributeNames</b><br />
<table border="2" frame="box" rules="all">
<tr><th>KEY</th><th>VALUE</th></tr>
<jsp:scriptlet>
	if( true ) {
		java.util.Enumeration enum1 = application.getAttributeNames();
		while( enum1.hasMoreElements() ) {
			String key = (String)(enum1.nextElement());
		    Object objects = application.getAttribute( key );
</jsp:scriptlet>
<tr><td><jsp:expression>key</jsp:expression></td><td style="white-space: normal"><jsp:expression>objects</jsp:expression></td></tr>
<jsp:scriptlet>
		}
	}
</jsp:scriptlet>
</table>
<p><!-- --></p>

<b>ServletContext InitParameter</b><br />
<table border="2" frame="box" rules="all">
<tr><th>KEY</th><th>VALUE</th></tr>
<jsp:scriptlet>
	if( true ) {
		java.util.Enumeration enum1 = application.getInitParameterNames();
		while( enum1.hasMoreElements() ) {
			String key = (String)(enum1.nextElement());
		    String val = application.getInitParameter( key );
</jsp:scriptlet>
<tr><td><jsp:expression>key</jsp:expression></td><td style="white-space: normal"><jsp:expression>val</jsp:expression></td></tr>
<jsp:scriptlet>
		}
	}
</jsp:scriptlet>
</table>
<p><!-- --></p>

<b>ServletContext MethodNames</b><br />
<table border="2" frame="box" rules="all">
<tr><th>KEY</th><th>VALUE</th></tr>
<tr><td>MajorVersion       </td><td style="white-space: normal"><jsp:expression>application.getMajorVersion()</jsp:expression></td></tr>
<tr><td>MinorVersion       </td><td style="white-space: normal"><jsp:expression>application.getMinorVersion()</jsp:expression></td></tr>
<tr><td>RealPath           </td><td style="white-space: normal"><jsp:expression>application.getRealPath("/") </jsp:expression></td></tr>
<tr><td>Resource URL       </td><td style="white-space: normal"><jsp:expression>application.getResource("/") </jsp:expression></td></tr>
<tr><td>ServerInfo         </td><td style="white-space: normal"><jsp:expression>application.getServerInfo()</jsp:expression></td></tr>
<tr><td>ServletContextName </td><td style="white-space: normal"><jsp:expression>application.getServletContextName()</jsp:expression></td></tr>
<jsp:scriptlet>
	if( true ) {
		java.util.Set set = application.getResourcePaths( "/" );
		java.util.Iterator ite = set.iterator();
		StringBuffer buf = new StringBuffer();
		while( ite.hasNext() ) {
			buf.append( ite.next() ).append( ";" );
		}
</jsp:scriptlet>
<tr><td>ResourcePaths</td><td style="white-space: normal"><jsp:expression>buf.toString()</jsp:expression></td></tr>
<jsp:scriptlet>
	}
</jsp:scriptlet>
</table>
<p><!-- --></p>
