53bdf101ca368e9fb3c47747a1d0beddcfd88821.svn-base
1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<%
response.setStatus(403);
//获取异常类
Throwable ex = Exceptions.getThrowable(request);
// 如果是异步请求或是手机端,则直接返回信息
if (Servlets.isAjaxRequest(request)) {
if (ex!=null && StringUtils.startsWith(ex.getMessage(), "msg:")){
out.print(StringUtils.replace(ex.getMessage(), "msg:", ""));
}else{
out.print("操作权限不足.");
}
}
//输出异常信息页面
else {
%>
<%@page import="com.thinkgem.jeesite.common.web.Servlets"%>
<%@page import="com.thinkgem.jeesite.common.utils.Exceptions"%>
<%@page import="com.thinkgem.jeesite.common.utils.StringUtils"%>
<%@page contentType="text/html;charset=UTF-8" isErrorPage="true"%>
<%@include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<%
if(("msg:账号已在IP").equals(ex.getMessage().substring(0, 10))) {
%>
<title>403 - 登录失败</title>
<% } %>
<%
if(!("msg:账号已在IP").equals(ex.getMessage().substring(0, 10))) {
%>
<title>403 - 操作权限不足</title>
<% } %>
<%@include file="/WEB-INF/views/include/head.jsp" %>
</head>
<body>
<div class="container-fluid">
<%
if(("msg:账号已在IP").equals(ex.getMessage().substring(0, 10))) {
%>
<div class="page-header"><h1>登录失败.</h1></div>
<% } %>
<%
if(!("msg:账号已在IP").equals(ex.getMessage().substring(0, 10))) {
%>
<div class="page-header"><h1>操作权限不足.</h1></div>
<% } %>
<%
if (ex!=null && StringUtils.startsWith(ex.getMessage(), "msg:")){
out.print("<div style='color:blue;font-size:23px;'>"+StringUtils.replace(ex.getMessage(), "msg:", "")+" <br/> <br/></div>");
}
%>
<div><a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a></div>
<script>try{top.$.jBox.closeTip();}catch(e){}</script>
</div>
</body>
</html>
<%
} out = pageContext.pushBody();
%>