sitemesh JSP 用法
来源:互联网 发布:linux解压缩zip命令 编辑:程序博客网 时间:2024/06/05 04:50
一
web.xml 加入以下配置
<filter>
<filter-name>sitemeshFilter</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemeshFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
需要sitemesh.jar 的支持
二
新建 decorators.xml描述各装饰器页面
<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/WEB-INF/layouts/">
<excludes>
<pattern>/images/*</pattern>
<pattern>/scripts/*</pattern>
<pattern>/thems/*</pattern>
<pattern>/FusionCharts/*</pattern>
<pattern>/*layout=no</pattern>
</excludes>
<decorator name="default" page="default.jsp">
<pattern>/*</pattern>
</decorator>
<decorator name="login" page="login.jsp">
<pattern>/login*</pattern>
</decorator>
</decorators>
三
在被引用的页面加入
<%@ taglib prefix="sitemesh"
uri="http://www.opensymphony.com/sitemesh/decorator"%>
<sitemesh:head />
<sitemesh:body />
- sitemesh JSP 用法
- 【sitemesh】Jsp的装饰器组件sitemesh
- SiteMesh框架的用法。。。。。
- 在jsp中使用sitemesh
- SiteMesh基本用法及示例
- SiteMesh基本用法及示例
- SiteMesh基本用法及示例
- SiteMesh基本用法及示例
- SiteMesh在JSP中的页面装饰
- 使用SiteMesh分割、装饰jsp页面
- sitemesh
- SiteMesh
- Sitemesh
- Sitemesh
- SiteMesh
- sitemesh
- sitemesh
- sitemesh
- AndroidManifest.xml配置文件详解
- word转成PDF的俩种方法
- Java Thread State 各种 第一分析法则
- YUV2一帧数据大小计算
- ICE和LIBEVENT同用的时候会出现一大堆重定义错误的解决办法
- sitemesh JSP 用法
- 想成为嵌入式程序员应知道的0x10个基本问题
- TCP/IP详解学习笔记(4)-ICMP协议,ping和Traceroute
- eclipse插件安装——activiti
- 抓包工具Fidder详解(主要来抓取Android中app的请求)
- 差异分析定位Ring 3保护模块
- cctype函数 (字符类型判断)
- 说好的30天直播生死呢?--第二章 为什么是横版格斗?
- UIView、subview的几个基础知识点-iOS开发(实例)