frame.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<frameset rows="*" cols="*,145" framespacing="4" frameborder="yes" border="4" bordercolor="#3333FF">
<frameset rows="*,100" cols="*" framespacing="4" frameborder="yes" border="4" bordercolor="#3333FF">
<frame src="chatHall.jsp" name="mainFrame" id="mainFrame" title="mainFrame" />
<frame src="login.jsp" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" />
</frameset>
<frame src="chatList.jsp" name="rightFrame" scrolling="No" noresize="noresize" id="rightFrame" title="rightFrame" />
</frameset>
<noframes><body>
</body>
</noframes></html>
login.jsp
<%@ page contentType="text/html;charset=GBK" %>
<html><style type="text/css">
<!--
body {
background-image: url();
background-color: #CCCC66;
margin-top: 0px;
}
-->
</style><body>
<form action="judge.jsp" method=post>
<img src="Bear.bmp" width="82" height="77"> 姓名:
<input type="text" name="name">
<input type="submit" name="submit" value="提交">
<br>
</form>
</body></html>
judge.jsp
<%@ page contentType="text/html;charset=GBK" %>
<html><body><center>
<%
String str = request.getParameter("name");
if(str.length() == 0)
response.sendRedirect("login.jsp");
else{
response.sendRedirect("input.jsp");
session.setAttribute("name",str);
}
%>
</body></html>
posted on 2009-09-24 11:13
鹏凌 阅读(295)
评论(0) 编辑 收藏 所属分类:
Java --j2ee