`
sgl124764903
  • 浏览: 171079 次
  • 性别: Icon_minigender_1
  • 来自: 邯郸
社区版块
存档分类
最新评论

招聘管理系统之SiteMesh模板三---示例

阅读更多
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>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics