javawebのjsp ---------- 02構成エラーページ

1.webappにjspページを書き込む


<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<h1>这是404页面</h1>

</body>
</html>

2.web.xmlで構成します

<error-page>
    <error-code>404</error-code>
    <location>/error/404.jsp</location>
  </error-page>

実施する

おすすめ

転載: blog.csdn.net/qq_42794826/article/details/113835672
おすすめ