<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	version="2.3">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />

&lt;!DOCTYPE html&gt;
<html lang="ja">
<head>
	<meta content="IE=edge" http-equiv="X-UA-Compatible" />
	<title>Sing in</title>
</head>

<body>
	<jsp:scriptlet>
		// ｺﾝﾃｷｽﾄﾊﾟｽは/+ｺﾝﾃｷｽﾄ名
		final String cxPath = request.getContextPath();
		request.setAttribute("sysJSP",cxPath + "/jsp");
	</jsp:scriptlet>

	<form method="GET" action="${sysJSP}/j_security_check" >
		<table border="0" frame="border">
			<tbody>
				<tr>
					<td>名前</td>
					<td><input name="j_username" style="width:100px; ime-mode:inactive" /></td>
				</tr>
				<tr>
					<td>パスワード</td>
					<td><input type="password" name="j_password" style="width:100px;" /></td>
				</tr>
			</tbody>
		</table>
		<input type="submit" value="login" name="j_security_check" />

		<!-- j_username パラメータがあるという事は、2回目のアクセス -->
		<jsp:scriptlet>
			final String paramName = request.getParameter("j_username") ;
			if( paramName != null ) {
				out.println( "&lt;div style='color: #ff0000;font-weight: bold;' id='errmsg' &gt;Sing in に失敗しました。&lt;/div&gt;" );
			}
		</jsp:scriptlet>
	</form>
</body>

</html>

</jsp:root>
