web.xml:
<filter>
<filter-name>struts2-cleanup</filter-name>
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2-cleanup</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
decorators.xml:
<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/decorators">
<decorator name="frame" page="frame.jsp">
<pattern>/*</pattern>
</decorator>
</decorators>
fram.jsp:
<%@ page language="java" import="java.util.*,com.zpgl.javabean.*"
pageEncoding="gbk"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"
prefix="decorator"%>
<%%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><decorator:title /></title>
<body>
<div align="center">
<table width="100%" >
<tr>
<td>
<img src="images/1.png">
</td>
<td>
<img src="images/2.png">
</td>
</tr>
<tr>
<td colspan="2">
<hr>
</td>
</tr>
<tr>
<%
int i = 0;
List<RolesId> list = (ArrayList) session.getAttribute("rolesid");
if (list != null) {
for (RolesId ri : list) {
i = ri.getId();
}
if (i == 1) {
%>
<td>
<table >
<tr>
<td>
admin,欢迎登陆
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<a href=<s:url action="produceShow">
</s:url>> 查看用户信息</a>
</td>
</tr>
</table>
</td>
<%
}
if(i == 2){
%>
<td>
<table>
<tr>
<td>
<a href=<s:url action="produceShow">
</s:url>> 问卷管理</a>
</td>
</tr>
</table>
</td>
<%
}
if(i == 3){
%>
<td>
<table>
<tr>
<td>
<a href=<s:url action="produceShow">
</s:url>> 职位管理</a>
</td>
</tr>
</table>
</td>
<%
}
if(i == 4){
%>
<td>
<table>
<tr>
<td>
<a href=<s:url action="produceShow">
</s:url>> 简历管理</a>
</td>
</tr>
</table>
</td>
<%
}
if(i == 5){
%>
<td>
<table>
<tr>
<td>
<a href=<s:url action="produceShow">
</s:url>> 面试管理</a>
</td>
</tr>
</table>
</td>
<%
}
if(i == 6){
%>
<td>
<table>
<tr>
<td>
<a href=<s:url action="produceShow">
</s:url>>试题管理 </a>
</td>
</tr>
</table>
</td>
<%
}
%>
<td>
<div align="center">
<table >
<TR>
<TD>
<decorator:body />
</TD>
</TR>
</table>
</div>
</td>
<%
} else {
%>
<DIV align="center">
<table >
<TR>
<TD>
<decorator:body />
</TD>
</TR>
</table>
</DIV>
<%
}
%>
</tr>
</table>
<hr>
<div align="center">
2009copyright abc@163.com
</div>
</body>
</html>
分享到:
相关推荐
struts2-sitemesh-plugin-2.0.8.jar
SiteMesh is a web-page layout and decoration framework and web- application integration framework to aid in creating sites consisting of many pages for which a consistent look/feel, navigation and ...
sitemesh-3.0-alpha-2.jar
sitemesh-2.4.2-src.jar 是sitemesh的源文件jar包,当调试时需要选择该jar包进行资源查找,很好用的页面架构工具
struts2-sitemesh-plugin-2.1.8.1.jar
struts2-sitemesh-plugin-2.2.1.1.jarstruts2
struts2-sitemesh-plugin-2.1.6.jar
SiteMesh-SpringMVC-Mybatis
SiteMesh是一个网页布局和装饰框架以及Web应用程序集成框架,可帮助创建由页面组成的网站,这些页面需要一致的外观,导航和布局方案。 SiteMesh会拦截对通过Web服务器请求的任何静态或动态生成的HTML页面的请求,...
解决 java.lang.NoSuchFieldException: DEFAULT_PARAM>问题,下载后替换即可。
struts框架与sitemesh框架整合的插件,在java web开发中可以制作模板页,使自己做的网站看起来更专业
sitemesh-2.4.1.jar sitemesh-2.4.1.jar sitemesh-2.4.1.jar sitemesh-2.4.1.jar sitemesh-2.4.1.jar sitemesh-2.4.1.jar
sitemesh-2.2.1.jar
siteMesh使用示例:登录、注册页面
sitemesh-2.2.1.jarsitemesh-2.2.1.jarsitemesh-2.2.1.jar
使用Gradle的SiteMesh 3 Hello World演示 这是一个非常简单的“ hello world” Web应用程序。 它演示了将页面装饰器应用于网站的内容。 它使用下载SiteMesh jar,并使用 Web...C-Temp-sitemesh-examples-hellowebapp
sitemesh3-demo 配置说明参见http://blog.csdn.net/thc1987/article/details/6913416
用于在SSH2工程中使用sitemesh-2.4.jar 包;
利用sitemesh构架导航框架的示例,通过sitemesh模板统一导航栏
Sitemesh简介: SiteMesh是一个Web页面布局修饰框架, 用于构建包含大量页面, 需要一致的外观样式(look/fell), 导航和布局机制的大型网站. sitemesh应用Decorator模式,用filter截取request和response,把页面组件...