2006.09.21 Thursday | 15:08

  web.xml の読み込み ふるいむかし

getInitParameterNames

<%@ page
	language="java"
	import="java.io.*"
	import="java.text.*"
	import="java.util.*"
	contentType="text/html;charset=shift_jis" %>
<%
// *********************************************************
// web.xml のデータ取得
// *********************************************************

	Enumeration enumInit = application.getInitParameterNames();
	String strData = "";
	String strKey = null;

	while( enumInit.hasMoreElements() ) {
		strKey = enumInit.nextElement().toString();
		strData += strKey;
		strData += " => ";
		strData += application.getInitParameter(strKey);
		strData += "\n";
	}

%>
<HTML>
<BODY>

<!-- 埋め込みで出力 -->
<PRE>
<%= strData %>
</PRE>

</BODY>
</HTML>