?? error.jsp
字號:
<%@ page contentType="text/html;charset=gbk" isErrorPage="true"%>
<%@ page import="com.hongshee.ejforum.util.PageUtils"%>
<%@ page import="com.hongshee.ejforum.common.ForumSetting"%>
<%@ page import="com.hongshee.ejforum.common.AppException"%>
<%@ page import="com.hongshee.ejforum.data.UserDAO.UserInfo"%>
<%
String ctxPath = request.getContextPath();
UserInfo userinfo = null;
try
{
userinfo = PageUtils.getSessionUser(request);
}
catch(Exception e){ /* Ignored, avoid throw again when IP is banned */ }
String errorMsg = (String)request.getAttribute("errorMsg");
if (errorMsg == null)
{
if (exception != null)
{
errorMsg = "服務端出現異常,請稍后再試 - " + exception.getMessage();
if (!(exception instanceof AppException))
PageUtils.log(request, "jsp error", errorMsg, exception);
}
if (errorMsg == null)
errorMsg = "服務端出現異常,請稍后再試。";
}
String forumName = ForumSetting.getInstance().getForumName();
String title = PageUtils.getTitle(forumName);
String[] menus = PageUtils.getHeaderMenu(request, userinfo);
String homeUrl = ctxPath + "/index.jsp";
String forumStyle = PageUtils.getForumStyle(request, response, null);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>錯誤信息頁 - <%= title %></TITLE>
<LINK href="<%= ctxPath %>/styles/<%= forumStyle %>/ejforum.css" type=text/css rel=stylesheet>
</HEAD>
<body onkeydown="if(event.keyCode==27) return false;">
<script src="<%= ctxPath %>/js/common.js" type="text/javascript"></script>
<div class="wrap">
<div id="header">
<%= PageUtils.getHeader(request, title) %>
</div>
<%= menus[0] %>
<div id="nav"><A href="<%= homeUrl %>"><%= forumName %></A> » 提示信息</div>
<div class="box message">
<h1><%= forumName %> - 出錯提示信息</h1>
<%
String alertError = (String)request.getAttribute("alertError");
if (alertError != null)
{
%>
<script type="text/javascript">
alert('<%= errorMsg %>');
history.back();
</script>
<%
}
%>
<p align="center"><%= errorMsg %></p>
<p align="center"><a href="javascript:history.back()">[ 點擊這里返回上一頁 ]</a></p>
</div>
<p> </p>
</div>
<%= menus[1]==null?"":menus[1] %>
<%= menus[2]==null?"":menus[2] %>
<%= PageUtils.getFooter(request, forumStyle) %>
</body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -