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
- 클래스
- 메서드
- AWT
- 메소드
- JavaScript
- mybatis
- HTML
- struts2
- Android
- 기본
- 예외처리
- JSP
- 배열
- Graphic
- 에러페이지
- 오버로딩
- 전화걸기
- 생성자
- Spring
- OGNL
- 이클립스
- paint
- oracle
- 국제화
- Menu
- Eclips
- 안드로이드
- 어노테이션
- Java
- layout
Archives
- Today
- Total
note
Spring 예외처리 본문
dispatcher-servlet.xml
error/mathException
error/exception
messages.validation
ArithmeticOperatorController.java
package madvirus.spring.chap06.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
public class ArithmeticOperatorController {
@RequestMapping("/math/divide.do")
public String divide(
@RequestParam("op1") int op1,
@RequestParam("op2") int op2, Model model) {
model.addAttribute("result",op1/op2);
return "math/result";
}
}
math/result.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
연산 성공
연산 성공
aa
aaa
'JSP > Spring' 카테고리의 다른 글
LocaleResolver를 이용한 Locale 변경(국제화) (0) | 2012.03.07 |
---|---|
Spring 커스텀 태그 / 로그인 유효성 체크 (0) | 2012.03.06 |
MultipartFile 인터페이스 사용하여 파일업로드,다운로드(자카르타 라이브러리) (0) | 2012.03.06 |
@PathVariable 을 이용한 주소 확장기능 (0) | 2012.03.06 |
Spring 요청 URI 매칭 (0) | 2012.03.05 |