junhong

          how to deal with the Frame when using sitemesh

          1. install the sitemesh described in the above article.
          2. To be able to specify which mappers will be applied to a request, create 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>
            

            in this example, the only mapper that will be applied is the ConfigDecoratorMapper, and that will only be applied to responses of type text/html or text/html;charset=ISO-8859-1. Responses of any other content type (eg image/gif) will be ignored by Sitemesh. Additionally, any files that match a pattern specified in the excludes file (in this case '/WEB-INF/decorators.xml') will not be touched by Sitemesh.

          3. The excludes file points to an XML file that contains an <excludes /> block similar to the following: add the following code in your decorators.xml

            <decorators defaultdir="/decorators">
            ?<excludes>
            ??<pattern>/plainPage.jsp</pattern>
            ??<pattern>/ewebeditor/*.*</pattern>
            ?</excludes>
            ?<decorator name="main" page="main.jsp">
            ??<pattern>/*</pattern>
            ?</decorator>
            </decorators>

          posted on 2006-04-13 23:46 junhong 閱讀(1087) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 蓝田县| 宁乡县| 颍上县| 诏安县| 榆中县| 嘉义县| 武清区| 永靖县| 中西区| 西乡县| 永宁县| 道孚县| 乌拉特中旗| 佛山市| 无极县| 德格县| 辽源市| 台湾省| 屏南县| 丹棱县| 虎林市| 仁化县| 贵德县| 武平县| 宁乡县| 普格县| 镇安县| 闸北区| 江西省| 枣阳市| 镇雄县| 麻阳| 兰坪| 雅安市| 宁陕县| 资兴市| 平乐县| 修武县| 清徐县| 玛沁县| 福建省|