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
- 전화걸기
- Menu
- 메소드
- 예외처리
- AWT
- Spring
- struts2
- 어노테이션
- 클래스
- 생성자
- 에러페이지
- layout
- 안드로이드
- HTML
- 기본
- oracle
- JavaScript
- Graphic
- Eclips
- 배열
- 메서드
- 오버로딩
- 국제화
- OGNL
- paint
- mybatis
- 이클립스
- Android
- Java
Archives
- Today
- Total
note
struts2 예외발생 에러페이지 본문
struts.xml
<!-- 에러페이지 설정하기--> <action name="exceptionThrowing" class="com.ch6.action.ExceptionThrowingAction"> <result name="success">success.jsp</result> <result name="error">error.jsp</result> <exception-mapping result="error" exception="java.lang.Exception" /> </action>
ExceptionThrowingAction.java
package com.ch6.action;
import com.opensymphony.xwork2.Action;
public class ExceptionThrowingAction implements Action{
@Override
public String execute() throws Exception {
if(true)
throw new Exception("Action Exception occured");
return SUCCESS;
}
}
error.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
error
${exception}
'JSP > Struts2' 카테고리의 다른 글
struts2 if / else if / else 태그 예제(OGNL표현식) EL / OGNL 차이점 (0) | 2012.02.23 |
---|---|
struts2 업로드파일 다운로드 하기 (0) | 2012.02.23 |
Struts2 Servlet (0) | 2012.02.22 |
struts2 파일 업로드(자카르타 라이브러리) (0) | 2012.02.22 |
struts2 Redirect (0) | 2012.02.22 |