SiteMesh를 다운로드받고 나서 설정은 간단한다.

평소처럼 web-app 설치한다(또는 미리 설정된 sitemesh-blank.war을 사용하면 모든게 생략된다.).
sitemesh-2.2.1.jar를 web-app/WEB-INF/lib으로 복사해라
다음을 포함하는 web-app/WEB-INF/decorators.xml을 생성하라.

<decorators>
</decorators>
(OptionalCreate the file [web-app]/WEB-INF/sitemesh.xml that contains the following: 
<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.FastPageParser" />
        <parser content-type="text/html;charset=ISO-8859-1"
            class="com.opensymphony.module.sitemesh.parser.FastPageParser" />
    </page-parsers>

    <decorator-mappers>
        <mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
            <param name="config" value="${decorators-file}" />
        </mapper>
    </decorator-mappers>
</sitemesh>
web애플리케이션/WEB-INF/web.xml의 <web-app>태그내에 다음을 추가하라.

<filter>
    <filter-name>sitemesh</filter-name>
    <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>sitemesh</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 06-Apr-2006 09:45 by UnknownAuthor