티스토리 뷰
16년 4월 기준.
sitemesh.xml
<sitemesh>
<property name="decorators-file" value="/WEB-INF/decorators.xml"/>
<excludes file="${decorators-file}"/>
<page-parsers>
<parser content-type="text/html" class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />
</page-parsers>
<decorator-mappers>
<mapper class="com.opensymphony.module.sitemesh.mapper.PageDecoratorMapper">
<param name="property.1" value="meta.decorator" />
<param name="property.2" value="decorator" />
</mapper>
<mapper class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper">
</mapper>
<mapper class="com.opensymphony.module.sitemesh.mapper.AgentDecoratorMapper">
<param name="match.MSIE" value="ie" />
<param name="match.Mozilla [" value="ns" />
<param name="match.Opera" value="opera" />
<param name="match.Lynx" value="lynx" />
</mapper>
<mapper class="com.opensymphony.module.sitemesh.mapper.PrintableDecoratorMapper">
<param name="decorator" value="printable" />
<param name="parameter.name" value="printable" />
<param name="parameter.value" value="true" />
</mapper>
<mapper class="com.opensymphony.module.sitemesh.mapper.RobotDecoratorMapper">
<param name="decorator" value="robot" />
</mapper>
<mapper class="com.opensymphony.module.sitemesh.mapper.ParameterDecoratorMapper">
<param name="decorator.parameter" value="decorator" />
<param name="parameter.name" value="confirm" />
<param name="parameter.value" value="true" />
</mapper>
<mapper class="com.opensymphony.module.sitemesh.mapper.FileDecoratorMapper">
</mapper>
<mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
<param name="config" value="${decorators-file}" />
</mapper>
</decorator-mappers>
</sitemesh>
decorators.xml
<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/view">
<excludes>
<pattern>/resources/*</pattern>
</excludes>
<!--
<decorator name="top" page="/WEB-INF/view/decorators/top.jsp" />
-->
<decorator name="foot" page="/WEB-INF/view/decorators/foot.jsp" />
<decorator name="layout" page="/WEB-INF/view/decorators/layout.jsp">
<pattern>/*</pattern>
</decorator>
<decorator name="layout2" page="/WEB-INF/view/decorators/layout2.jsp">
<pattern>/login/*</pattern>
<pattern>/product/getList</pattern>
<pattern>/product/getPlanList</pattern>
<pattern>/mypage/*</pattern>
<pattern>/signup/*</pattern>
<pattern>/guide/*</pattern>
</decorator>
<decorator name="adminLayout" page="/WEB-INF/view/decorators/adminLayout.jsp">
<pattern>/admin/*</pattern>
</decorator>
<decorator name="mobileLayout" page="/WEB-INF/view/decorators/mobileLayout.jsp">
<pattern>/mobile/*</pattern>
</decorator>
<decorator name="emptyLayout" page="/WEB-INF/view/decorators/emptyLayout.jsp" />
</decorators>
// decorator 절대경로로 할때는 defaultdir은 의미가 없다.
<decorators defaultdir="/WEB-INF/view">
<decorator name="layout" page="decorators/layout.jsp">
// 상대경로로는 이렇게 사용.
<decorator:body />
<page:applyDecorator name="foot" />
'Knowledge' 카테고리의 다른 글
jQuery(제이쿼리) 스크롤(Scroll) 예제 (0) | 2024.01.27 |
---|---|
CSON(Cursive Script Object Notation) 관련 (0) | 2024.01.21 |
sitemesh(사이트메시) 예제 (0) | 2024.01.21 |
log4j(로그포제이) Config(설정) (0) | 2024.01.21 |
Windows(윈도우) open port(오픈 포트) 확인 (0) | 2024.01.20 |