|
<%@ page
language="java"
import="java.util.*"
contentType="text/html;charset=Shift_JIS"
%>
<%
// *********************************************************
// login.jsp
// *********************************************************
session.setMaxInactiveInterval(10);
out.println( session.getMaxInactiveInterval() + "<br>" );
// *********************************************************
// 入力データの取得
// *********************************************************
String UserName;
UserName = request.getParameter( "UserName" );
// *********************************************************
// 入力データのチェック
// *********************************************************
if ( UserName != null ) {
if ( UserName.equals( "lightbox" ) ) {
// *********************************************
// いったんセッションが無効になっていた場合
// *********************************************
if ( session.getAttribute( "TargetURL" ) == null ) {
session.setAttribute( "TargetURL", "menu.jsp" );
}
// *********************************************
// ユーザ名をセット
// *********************************************
session.setAttribute( "UserName", UserName );
// *********************************************
// 呼び出し元へ移動
// *********************************************
String Target;
Target = session.getAttribute( "TargetURL" ).toString();
application.log( "login.jsp --> " + Target );
response.sendRedirect( Target );
return;
}
}
// *********************************************************
// 以下画面定義
// *********************************************************
%>
<HTML>
<BODY>
<CENTER>
<H1>ログイン</H1>
<FORM method="post" action="login.jsp">
ユーザ名 <INPUT type="text" name="UserName">
<INPUT type="submit" name="send" value="送信">
</FORM>
</CENTER>
</BODY>
</HTML>
| |