본문 바로가기
Web Programming/JSP

[JSP] Error Page 이동

Error Page 








1.에러가 발생 했을 시, 이동 할 JSP 페이지 만들기







2. Web.xml에 error page code 추가하기






3. 프로젝트 폴더 → 우클릭 → properties  web Project settings → / 추가










대표적으로 404 에러 페이지를 만들어 보겠습니다




Error_404.jsp


1
2
3
4
5
6
7
8
9
10
11
12
<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
    <strong>404 에러 페이지</strong>
</body>
</html>
cs






확인