首页 > 代码库 > 404struts配置
404struts配置
cmstop-error.css
html,body,head,div,p,a { margin: 0; padding: 0;}.body-bg { background-color: #dff1f4;}.main { width: 700px; overflow: hidden; height: 542px; margin: 20px auto; background: url(../images/error-bg.png) no-repeat 0 0;}.title { font-size: 14px; font-weight: bold; margin: 254px 0 0 218px; color: #d3d3d3;}.btn { display: block; background: url(../images/error-btn.png) no-repeat 0 0; width: 145px; height: 45px; font-size: 14px; margin: 95px 0 0 270px; line-height: 43px; color: #fff; font-weight: bold; text-align: center; text-decoration: none;}
error404.jsp
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><base href="<%=basePath%>"><title>error404</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"><meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><link rel="stylesheet" type="text/css" href="css/cmstop-error.css" media="all"></head><body><body class="body-bg"> <div class="main"> <p class="title">非常抱歉,您要查看的页面没有办法找到</p> <a href="index.jsp" class="btn">返回网站首页</a> </div></body></html>
web.xml
<error-code>404</error-code><location>/error404.jsp</location></error-page>
404struts配置
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。