<%
String username = (String) session.getAttribute("sUser")
if(username!=null)//如果这个不等于空,那么证明已经登录
{
MessageBiz bmb = new MessageBizImpl()
List<Message>list = bmb.findMessages(username)
request.setAttribute("msgs", list)
}else
{
%>
<script type="text/javascript">alert("请先登陆")window.location="../login.jsp" </script>
<%
//如果session 为空那么证明没有登录将跳到login.jsp
}
%>
if (comfir("确认提交?")){alert ("提交成功!")
return true
}else{
return false
}