3월 18일

redirect

https://docs.spring.io/spring-framework/docs/4.3.0.RELEASE/spring-framework-reference/html/mvc.html#mvc-redirecting-redirect-prefix

flash scope

https://docs.spring.io/spring-framework/docs/4.3.0.RELEASE/spring-framework-reference/html/mvc.html#mvc-flash-attributes

servlet-context.xml에서 mvc:namespace 정리

<mvc:annotation-driven/>
<mvc:default-servlet-handler/>

<!--  1.직접 jsp요청 (Controller 코드작업 없이) 여러개 사용가능-->
<mvc:view-controller path="/a2" view-name="main"/>
<mvc:view-controller path="/a3" view-name="main"/>

<!-- 2. JSP 처리 전담 ViewResolver -->
<mvc:view-resolvers>
	<mvc:bean-name>
		<bean class = "org.springframework.web.servlet.view.InternalResourceViewResolver"/>
	</mvc:bean-name>
	<mvc:jsp prefix="/WEB-INF/views/" suffix=".jsp"/>
</mvc:view-resolvers>

좋은 웹페이지 즐겨찾기