본문 바로가기

Spring

Spring3에서 tiles3 설정

반응형
메이븐 사용시
<dependency>
     <groupId>org.apache.tiles</groupId>
     <artifactId>tiles-extras</artifactId>
</dependency>

스프링 설정 파일(예 dispatcher-servlet.xml)에서 tiles 설정

<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles3def/tilesdef.xml</value>
</list>
</property>
</bean>

<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.tiles3.TilesView" />
</bean>


반응형