Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- JSP
- Eclips
- Spring
- 클래스
- layout
- 메서드
- Java
- 에러페이지
- Menu
- 오버로딩
- 어노테이션
- AWT
- 국제화
- 생성자
- HTML
- Android
- 메소드
- 전화걸기
- 안드로이드
- struts2
- JavaScript
- OGNL
- paint
- 예외처리
- mybatis
- 기본
- Graphic
- 배열
- 이클립스
- oracle
Archives
- Today
- Total
note
JSP 에러페이지 만들기 본문
실행 화면
readParameter.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page errorPage = "/error/viewErrorMessage.jsp" %>
파라미터 출력
name 파라미터 값 : <%= request.getParameter("name").toUpperCase() %>
viewErrorMessage.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page errorPage = "/error/viewErrorMessage.jsp" %>
파라미터 출력
name 파라미터 값 : <%= request.getParameter("name").toUpperCase() %>
파일 위치
readParameter2.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
파라미터 출력
name 파라미터 값 : <%= request.getParameter("name").toUpperCase() %>
error404.jsp.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<span class="hljs-number">404</span> 에러 발생
요청한 페이지는 존재하지 않습니다.
주소를 올바르게 입력했는지 확인해 보시기 바랍니다.
error505.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<span class="hljs-number">505</span> 에러 발생
에러가 발생했습니다.:
페이지에 에러가 있습니다.
errorNullPointer.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<span class="hljs-keyword">NULL</span> 에러 발생
서비스 처리 과정에서 널(Null)예외가 발생하였다.
web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>chap08</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <!-- HTTP Status Code --> <error-page> <error-code>404</error-code> <location>/error/error404.jsp</location> </error-page> <error-page> <error-code>500</error-code> <location>/error/error505.jsp</location> </error-page> </web-app>
'JSP > 기본' 카테고리의 다른 글
JSP 세션 Session (0) | 2012.02.07 |
---|---|
JSP 쿠키 생성,보기,삭제,수정 (0) | 2012.02.07 |
JSP 페이지 이동 (1) | 2012.02.07 |
JSP include (0) | 2012.02.07 |
<jsp:include> 액션 태그를 사용하여 페이지 모듈화 (0) | 2012.02.06 |