码迷,mamicode.com
首页 > 其他好文 > 详细

404struts配置

时间:2014-11-04 10:54:45      阅读:295      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   io   color   ar   os   java   

cmstop-error.css

bubuko.com,布布扣
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;
}
View Code

error404.jsp

bubuko.com,布布扣
<%@ 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>
View Code

web.xml

bubuko.com,布布扣
<error-code>404</error-code>
<location>/error404.jsp</location>
</error-page>
View Code

bubuko.com,布布扣

bubuko.com,布布扣

404struts配置

标签:des   style   blog   http   io   color   ar   os   java   

原文地址:http://www.cnblogs.com/manusas/p/4072863.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!