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 |
Tags
- 생성자
- struts2
- 어노테이션
- 클래스
- Menu
- 메서드
- 에러페이지
- mybatis
- 국제화
- Java
- JSP
- oracle
- 예외처리
- Graphic
- layout
- 전화걸기
- 메소드
- paint
- 배열
- Spring
- OGNL
- 이클립스
- AWT
- 안드로이드
- 오버로딩
- Eclips
- Android
- JavaScript
- 기본
- HTML
Archives
- Today
- Total
note
Spring 요청 URI 매칭 본문
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_2_5.xsd" id="WebApp_ID" version="2.5">
<!-- 기본 설정 -->
<!-- <servlet-name>dispatcher</servlet-name>을 써놓고 dispatcher-servlet.xml
의 앞에가 일치하면 자동으로 읽음
-->
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.do</url-pattern>
<url-pattern>/game/*</url-pattern>
</servlet-mapping>
<!-- 캐릭터 인코딩 -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
dispatcher-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- 요청 URI 매칭 -->
<bean class="madvirus.spring.chap06.controller.GameInfoController" />
<!-- View 글로벌 설정 -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/view/" />
<property name="suffix" value=".jsp" />
</bean>
<!-- 리소스 번들 지정 -->
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>messages.validation</value>
</list>
</property>
</bean>
</beans>
'JSP > Spring' 카테고리의 다른 글
| MultipartFile 인터페이스 사용하여 파일업로드,다운로드(자카르타 라이브러리) (0) | 2012.03.06 |
|---|---|
| @PathVariable 을 이용한 주소 확장기능 (0) | 2012.03.06 |
| Spring 유효성 체크 (0) | 2012.03.05 |
| 뷰에 모델 데이터 전달하기 (0) | 2012.03.05 |
| Spring 컨트롤러 메서드의 리턴 타입 (0) | 2012.03.05 |