본문 바로가기
Spring/Spring 기초

Spring-타일즈(Tiles).hwp 사용방법

by 미눅스[멘토] 2023. 7. 27.
728x90

Spring – 타일즈(Tiles).hwp
0.33MB

 

 

 

 

tiles-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC 
"-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" 
"http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
<!-- tiles 설정 -->
<tiles-definitions>
   <!-- main layout -->
   <definition name="tiles-layout" template="/WEB-INF/views/tiles/index.jsp">
      <put-attribute name="header" value="/WEB-INF/views/tiles/header.jsp" />
      <put-attribute name="aside" value="/WEB-INF/views/tiles/aside.jsp" />
      <put-attribute name="body" value="" />
      <put-attribute name="footer" value="/WEB-INF/views/tiles/footer.jsp" />
   </definition>
   <!-- name의 */*은 body의 value에서 1과 2에 해당
      controller에서 forwarding 시 return "1/2";
    -->
   <definition name="*/*" extends="tiles-layout">
      <put-attribute name="body" value="/WEB-INF/views/{1}/{2}.jsp" />
   </definition>
</tiles-definitions>