403.jsp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <%
  2. response.setStatus(403);
  3. //获取异常类
  4. Throwable ex = Exceptions.getThrowable(request);
  5. // 如果是异步请求或是手机端,则直接返回信息
  6. if (Servlets.isAjaxRequest(request)) {
  7. if (ex!=null && StringUtils.startsWith(ex.getMessage(), "msg:")){
  8. out.print(StringUtils.replace(ex.getMessage(), "msg:", ""));
  9. }else{
  10. out.print("操作权限不足.");
  11. }
  12. }
  13. //输出异常信息页面
  14. else {
  15. %>
  16. <%@page import="com.jeeplus.core.web.Servlets"%>
  17. <%@page import="com.jeeplus.common.utils.Exceptions"%>
  18. <%@page import="com.jeeplus.common.utils.StringUtils"%>
  19. <%@page contentType="text/html;charset=UTF-8" isErrorPage="true"%>
  20. <%@include file="/webpage/include/taglib.jsp"%>
  21. <!DOCTYPE html>
  22. <html>
  23. <head>
  24. <title>403 - 操作权限不足</title>
  25. <%@include file="/webpage/include/anihead.jsp" %>
  26. </head>
  27. <body>
  28. <div class="container-fluid">
  29. <div class="page-header"><h1>操作权限不足.</h1></div>
  30. <%
  31. if (ex!=null && StringUtils.startsWith(ex.getMessage(), "msg:")){
  32. out.print("<div>"+StringUtils.replace(ex.getMessage(), "msg:", "")+" <br/> <br/></div>");
  33. }
  34. %>
  35. <div><a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a></div>
  36. <script>top.layer.closeAll("dialog")</script>
  37. </div>
  38. </body>
  39. </html>
  40. <%
  41. } out = pageContext.pushBody();
  42. %>