`
IT阿狸
  • 浏览: 65324 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Struts2中使用<sx: />标签实现组合查询和带分页的例子

阅读更多

一、这是SSH框架下的demo:

 TestCustomer.zip

 

二、例子界面



 

 三、然后建立一JavaBean类用来封装查询条件

package util;
/**
 * 客户信息关系表的查询属性
 * @author miao
 *
 */
public class SearchProperties {
	
	private int custNo;
	private String custName;
	private String custRegion;
	private String custManagerName;
	private String custLevelLabel;
	
	public SearchProperties() {
		super();
	}
	
	public SearchProperties(String custName, String custRegion,
			String custManagerName, String custLevelLabel) {
		super();
		this.custName = custName;
		this.custRegion = custRegion;
		this.custManagerName = custManagerName;
		this.custLevelLabel = custLevelLabel;
	}

	public SearchProperties(int custNo, String custName, String custRegion,
			String custManagerName, String custLevelLabel) {
		super();
		this.custNo = custNo;
		this.custName = custName;
		this.custRegion = custRegion;
		this.custManagerName = custManagerName;
		this.custLevelLabel = custLevelLabel;
	}

	public int getCustNo() {
		return custNo;
	}

	public void setCustNo(int custNo) {
		this.custNo = custNo;
	}

	public String getCustName() {
		return custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}

	public String getCustRegion() {
		return custRegion;
	}

	public void setCustRegion(String custRegion) {
		this.custRegion = custRegion;
	}

	public String getCustManagerName() {
		return custManagerName;
	}

	public void setCustManagerName(String custManagerName) {
		this.custManagerName = custManagerName;
	}

	public String getCustLevelLabel() {
		return custLevelLabel;
	}

	public void setCustLevelLabel(String custLevelLabel) {
		this.custLevelLabel = custLevelLabel;
	}

}

 

 

四、dao接口

package dao;

import java.util.List;
import util.SearchProperties;
import entity.CstCustomer;

/**
 * 客户信息关系接口
 * 
 * @author Ali
 * 
 */
public interface CstCustomerDao {
	
	/**
	 * 查询总记录数
	 */
	public Integer findCount();
	
	/**
	 * 查询有条件的总记录数
	 */
	public Integer countCustomerByProperties(SearchProperties condition);
	
	/**
	 * 得到某条件的记录
	 */
	public List<CstCustomer> getCustomerByProperties(SearchProperties condition, int first, int max);
	
}

 

 

 五、daoImpl类

package dao.impl;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.MatchMode;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import util.SearchProperties;
import dao.CstCustomerDao;
import entity.CstCustomer;

/**
 * 客户信息关系实现类
 * 
 * @author Ali
 * 
 */
public class CstCustomerDaoImpl extends HibernateDaoSupport implements CstCustomerDao {

	/**
	 * 根据条件建立DetachedCriteria对象
	 * 
	 * @param condition
	 * @return
	 */
	public DetachedCriteria createCriterionByProperties(SearchProperties condition) {
		DetachedCriteria criteria = DetachedCriteria.forClass(CstCustomer.class);
		// 客户编号
		 if (condition.getCustNo() != 0) {
			 criteria.add(Restrictions.eq("custNo", condition.getCustNo()));
		 }
		// 客户名字
		if (null != condition.getCustName() && !"".equals(condition.getCustName())) {
			criteria.add(Restrictions.ilike("custName", condition.getCustName(),
					MatchMode.ANYWHERE));
		}
		// 地区
		if (null != condition.getCustRegion() && !"".equals(condition.getCustRegion())) {
			criteria.add(Restrictions.ilike("custRegion", condition.getCustRegion(),
					MatchMode.ANYWHERE));
		}
		// 客户经理
		if (null != condition.getCustManagerName() && !"".equals(condition.getCustManagerName())) {
			criteria.add(Restrictions.ilike("custManagerName", condition.getCustManagerName(),
					MatchMode.ANYWHERE));
		}
		// 客户等级
		if (null != condition.getCustLevelLabel() && !"".equals(condition.getCustLevelLabel())) {
			criteria.add(Restrictions.eq("custLevelLabel", condition.getCustLevelLabel()));
		}
		return criteria;
	}

	/**
	 * 查询总记录数
	 */
	public Integer findCount() {
		return super.getHibernateTemplate().loadAll(CstCustomer.class).size();
	}

	/**
	 * 得到某条件的记录
	 * 
	 * @param condition
	 * @param first
	 * @param max
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public List<CstCustomer> getCustomerByProperties(SearchProperties condition, int first, int max) {
		DetachedCriteria detachedCriteria = createCriterionByProperties(condition);
		return super.getHibernateTemplate().findByCriteria(detachedCriteria, first, max);
	}

	/**
	 * 查询有条件的总记录数
	 */
	public Integer countCustomerByProperties(SearchProperties condition) {
		DetachedCriteria detachedCriteria = createCriterionByProperties(condition);
		return super.getHibernateTemplate().findByCriteria(detachedCriteria).size();
	}

}

 

 

 六、biz接口

package biz;

import java.util.List;
import util.SearchProperties;
import entity.CstCustomer;

/**
 * 客户信息关系业务接口
 * 
 * @author miao
 * 
 */
public interface CstCustomerBiz {
	
	/**
	 * 查询总记录数
	 */
	public Integer findCount();
	
	/**
	 * 查询有条件的总记录数
	 */
	public Integer countCustomerByProperties(SearchProperties condition);

	/**
	 * 得到某条件的记录
	 */
	public List<CstCustomer> getCustomerByProperties(SearchProperties condition, int first, int max);
	
}

 

 

七、bizImpl类

package biz.impl;

import java.util.List;
import util.SearchProperties;
import biz.CstCustomerBiz;
import dao.CstCustomerDao;
import entity.CstCustomer;

/**
 * 客户信息关系业务实现类
 * 
 * @author Ali
 * 
 */
public class CstCustomerBizImpl implements CstCustomerBiz {

	// 调用dao
	private CstCustomerDao cstCustomerDao;

	// set注入

	public void setCstCustomerDao(CstCustomerDao cstCustomerDao) {
		this.cstCustomerDao = cstCustomerDao;
	}

	/**
	 * 查询总记录数
	 */
	public Integer findCount() {
		return cstCustomerDao.findCount();
	}

	public Integer countCustomerByProperties(SearchProperties condition) {
		return cstCustomerDao.countCustomerByProperties(condition);
	}

	public List<CstCustomer> getCustomerByProperties(SearchProperties condition, int number, int size) {
		int first = (number - 1) * size;
		return cstCustomerDao.getCustomerByProperties(condition, first, size);
	}
	
}

 

 

八、第一个页面。用来显示查询条件和转跳至action

<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
		<base href="<%=basePath%>"/>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>客户信息管理-查看全部客户信息</title>
		<link type="text/css" rel="stylesheet" href="css/style.css" />
		
		<sx:head />
	</head>
  <body>
  
  	<!-- 头部,查询条件 -->
    <div class="page_title">客户信息管理</div>
	<s:form method="post" action="search" id='sform' namespace="/" theme="simple">
		<div class="button_bar">
			<input type="reset" value="重置" />
			<sx:submit cssClass="common_button" type="button" name="search" value="查询" targets="divCustomer" />
		</div>
		<table class="query_form_table">
			<tr>
				<th>客户编号</th>
				<td>
					<s:textfield name="custNo" id="custNo" />
				</td>
				<th>名称</th>
				<td>
					<s:textfield name="custName" id="custName"/>
				</td>
				<th>地区</th>
				<td>
					<!-- key是值,value是显示 -->
					<s:select list="#{'':'全部','北京':'北京','华北':'华北','中南':'中南','东北':'东北','西部':'西部','上海':'上海' }" id="custRegion" name="custRegion"></s:select>
				</td>
			</tr>
			<tr>
				<th>客户经理</th>
				<td>
					<s:textfield name="custManagerName" id="custManagerName" />
				</td>
				<th>客户等级</th>
				<td>
					<s:select list="#{'':'全部','战略合作伙伴':'战略合作伙伴','合作伙伴':'合作伙伴','大客户':'大客户','普通客户':'普通客户' }" id="custLevelLabel" name="custLevelLabel"></s:select>
				</td>
				<th></th>
				<td></td>
			</tr>
		</table>
	</s:form>
	
	<!-- struts2 的??? -->
	<div class="data_list_table">
		<!-- 显示分页数据 -->
		<sx:div id="divCustomer" href="search.action">正在加载,请稍候...</sx:div>
	</div>
  </body>
</html>

 

 

九、第二个页面,用来显示数据和实现分页

<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    	<base href="<%=basePath%>"/>
    	<title>客户信息管理-查看全部客户信息</title>
	
		<sx:head />	
	
	<script src="script/common.js"></script>
	<link href="css/style.css" rel="stylesheet" type="text/css" />
  </head>
  
  <body>
  
  	<table class="data_list_table">
  		<tr>
			<th>序号</th>
			<th>客户编号</th>
			<th>名称</th>
			<th>地区</th>
			<th>客户经理</th>
			<th>客户等级</th>
			<th>操作</th>
		</tr>
		<c:if test="${customerList ne null}">
			<c:forEach items="${customerList}" var="customer" varStatus="row">
				<tr>
					<td class="list_data_number">${row.index+1 }</td>
					<td class="list_data_text">${customer.custNo }</td>
					<td class="list_data_ltext">${customer.custName }</td>
					<td class="list_data_text">${customer.custRegion }</td>
					<td class="list_data_text">${customer.custManagerName }</td>
					<td class="list_data_text">${customer.custLevelLabel }</td>
					<td class="list_data_op">
						<img onclick="location.href='edit.action?id=${customer.custNo }';" title="编辑" src="images/bt_edit.gif" class="op_button" />
						<img onclick="location.href='linkman.action?id=${customer.custNo}';" title="联系人" src="images/bt_linkman.gif" class="op_button" />
						<img onclick="location.href='activity.action?id=${customer.custNo}';" title="交往记录" src="images/bt_acti.gif" class="op_button" />
						<img onclick="location.href='orders.action?id=${customer.custNo }&name=${customer.custName}';" title="历史订单" src="images/bt_orders.gif" class="op_button" />
						<img onclick="location.href='delete.action?id=${customer.custNo}';" title="删除" src="images/bt_del.gif" class="op_button" />
					</td>
				</tr>
			</c:forEach>
		</c:if>
		<c:if test="${empty customerList}">
			<tr>
				<td colspan="7" align="center">
					<c:out value="暂无信息"></c:out>
				</td>
			</tr>
		</c:if>
		<!-- 分页 -->
		<tr>
			<th colspan="7" class="pager">
				<div class="pager">
					<!-- 不作显示 -->
					<s:url var="urlFirst" value="search.action">
						<s:param name="number" value="1" />
					</s:url>
					<s:url var="urlPrev" value="search.action">
						<s:param name="number" value="prev" />
					</s:url>
					<s:url var="urlNext" value="search.action">
						<s:param name="number" value="next" />
					</s:url>
					<s:url var="urlLast" value="search.action">
						<s:param name="number" value="total" />
					</s:url>
					<!-- 以上也是 -->
					共<s:property value="count" />条记录 每页3条
					第<s:property value="number" />页/共<s:property value="total" />页
					<sx:a href="%{urlFirst}" targets="divCustomer" formId="sform">第一页</sx:a>
					<sx:a href="%{urlPrev}" targets="divCustomer" formId="sform">上一页</sx:a>
					<sx:a href="%{urlNext}" targets="divCustomer" formId="sform">下一页</sx:a>
					<sx:a href="%{urlLast}" targets="divCustomer" formId="sform">最后一页</sx:a>
				</div>
			</th>
		</tr>
	</table>
  </body>
</html>

 

 

十、action的编写

package action;

import java.io.UnsupportedEncodingException;
import java.util.List;
import util.SearchProperties;
import biz.CstCustomerBiz;
import com.opensymphony.xwork2.ActionSupport;
import entity.CstCustomer;

/**
 * 客户管理的Action
 * 
 * @author miao
 * 
 */
public class CustomerManagerAction extends ActionSupport {

	/*
	 * 调用业务类
	 */

	private CstCustomerBiz cstCustomerBiz;// 客户信息关系

	/*
	 * 封装数据
	 */

	private List<CstCustomer> customerList;// 客户信息关系

	/*
	 * 分页需要的代码
	 */

	final static int PAGE_SIZE = 3;// 每页的记录数
	private int number;// 当前页
	private int total;// 总页面
	private int count;// 总记录数
	private int prev;// 上一页
	private int next;// 下一页

	/*
	 * 组合查询的条件
	 */

	private int custNo;
	private String custName;
	private String custRegion;
	private String custManagerName;
	private String custLevelLabel;

	/*
	 * 从页面传来的值
	 */

	private int id;// 根据id查询数据
	private String name;// 根据名字查询数据

	// set注入

	public void setCstCustomerBiz(CstCustomerBiz cstCustomerBiz) {
		this.cstCustomerBiz = cstCustomerBiz;
	}

	// getter/setter方法

	public static int getPageSize() {
		return PAGE_SIZE;
	}

	public int getCustNo() {
		return custNo;
	}

	public void setCustNo(int custNo) {
		this.custNo = custNo;
	}

	public String getCustName() {
		return custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}

	public String getCustRegion() {
		return custRegion;
	}

	public void setCustRegion(String custRegion) {
		this.custRegion = custRegion;
	}

	public String getCustManagerName() {
		return custManagerName;
	}

	public void setCustManagerName(String custManagerName) {
		this.custManagerName = custManagerName;
	}

	public String getCustLevelLabel() {
		return custLevelLabel;
	}

	public void setCustLevelLabel(String custLevelLabel) {
		this.custLevelLabel = custLevelLabel;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) throws UnsupportedEncodingException {
		this.name = new String(name.getBytes("ISO-8859-1"), "utf-8");
	}

	public List<CstCustomer> getCustomerList() {
		return customerList;
	}

	public void setCustomerList(List<CstCustomer> customerList) {
		this.customerList = customerList;
	}

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getPrev() {
		return prev;
	}

	public void setPrev(int prev) {
		this.prev = prev;
	}

	public int getNext() {
		return next;
	}

	public void setNext(int next) {
		this.next = next;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	/**
	 * 计算总页数
	 * 
	 * @param count 数据总记录数
	 * @param size 页面数据条数
	 */
	private int calcTotalPage(int count, int size) {
		return count % size == 0 ? count / size : count / size + 1;
	}

	/**
	 * 组合查询,带分页
	 */
	public String findByProperties() {
		SearchProperties condition = new SearchProperties();
		if ("".equals(custName) && "".equals(custRegion) && "".equals(custManagerName)
				&& "".endsWith(custLevelLabel)) {
			// 查询所有的记录条数
			count = cstCustomerBiz.findCount();
		} else {
			// 封装查询条件
			condition = new SearchProperties(custName, custRegion, custManagerName, custLevelLabel);
			// 查询有条件的总记录数
			count = cstCustomerBiz.countCustomerByProperties(condition);
		}
		// 计算总页数
		total = calcTotalPage(count, PAGE_SIZE);
		// 页面的处理
		if (number == 0) {
			number = 1;
		}
		prev = number - 1;
		next = number + 1;
		if (prev < 1) {
			prev = 1;
		}
		if (next > total) {
			next = total;
		}
		customerList = cstCustomerBiz.getCustomerByProperties(condition, number, PAGE_SIZE);
		return SUCCESS;
	}

}

 

 

十一、spring的配置文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
	 http://www.springframework.org/schema/tx
	 http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
	 http://www.springframework.org/schema/aop
	 http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

	<!-- 会话工厂 -->
	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
		<property name="configLocation" value="classpath:hibernate.cfg.xml" />
	</bean>

	<!--注入dao类 -->
	<bean id="cstCustomerDao" class="dao.impl.CstCustomerDaoImpl">
		<description>客户信息关系接口</description>
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

	<!-- 注入biz -->
	<bean id="cstCustomerBiz" class="biz.impl.CstCustomerBizImpl">
		<description>客户信息关系业务</description>
		<property name="cstCustomerDao" ref="cstCustomerDao" />
	</bean>

	<!-- 注入action -->
	<bean id="customerManagerAction" class="action.CustomerManagerAction">
		<description>客户管理Action</description>
		<property name="cstCustomerBiz" ref="cstCustomerBiz" />
	</bean>

</beans>

 

 

十二、struts的配置文件

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>

	<!-- 由spring管理 -->
	<constant name="stuts.objectFactory" value="spring" />

	<!-- 打开开发模式 -->
	<constant name="struts.devMode" value="true" />

	<package name="action" extends="struts-default" namespace="/">
		<action name="search" class="customerManagerAction" method="findByProperties">
			<result name="success">/listTrue.jsp</result>
			<result name="input">/listShow.jsp</result>
		</action>
	</package>

</struts>    

 

 

  • 大小: 54.5 KB
分享到:
评论

相关推荐

    Struts2中使用标签实现组合查询和带分页的例子

    NULL 博文链接:https://z18022893621.iteye.com/blog/1956098

    struts2 <s:if>标签使用

    struts2 &lt;s:if&gt;标签使用struts2 &lt;s:if&gt;标签使用struts2 &lt;s:if&gt;标签使用struts2 &lt;s:if&gt;标签使用struts2 &lt;s:if&gt;标签使用struts2 &lt;s:if&gt;标签使用

    struts标签(如<html:form>)

    关于STRUTS标签的一些详细说明。 如:&lt;html:form&gt;的说明。

    Struts2中实现页面的跳转

    解决了&lt;jsp:forward/&gt;跳转no fond 的问题

    struts2<s:if>使用心得

    &lt;td&gt; &lt;s:set name="actorRef" value="actorId" /&gt; &lt;s:set name="taskName" value="name" /&gt; &lt;s:if test="#actorRef=='' or #actorRef==null"&gt;共享任务(&lt;a href="${pageContext.request.contextPath}/ga/...

    Struts 1.XX <html:file>的使用

    NULL 博文链接:https://12345678.iteye.com/blog/713954

    Struts2标签库

    &lt;%@ taglib uri="/struts-tags" prefix="s" %&gt; 结合例子,重点掌握以下标签的用法 (1) &lt;s:property&gt; (2) &lt;s:set&gt; (3) &lt;s:if&gt; 、&lt;s:elseif&gt;、&lt;s:else&gt; (4) &lt;s:iterator&gt; (5) &lt;s:include&gt; (6) &lt;s:form&gt;、&lt;s:hidden&gt; (7...

    Struts2标签库的所有

    &lt;%@ taglib uri="/struts-tags" prefix="s" %&gt; 结合例子,重点掌握以下标签的用法 (1) &lt;s:property&gt; (2) &lt;s:set&gt; (3) &lt;s:if&gt; 、&lt;s:elseif&gt;、&lt;s:else&gt; (4) &lt;s:iterator&gt; (5) &lt;s:include&gt; (6) &lt;s:form&gt;、&lt;s:hidden&gt; (7...

    struts2 标签库 帮助文档

    &lt;%@ taglib prefix="s" uri="/struts-tags" %&gt; 就能使用struts2.0的标签库 下面就介绍每个标签的具体应用实例说明:按字母排列 A: 1. 2. &lt;s:a href=""&gt;&lt;/s:a&gt;-----超链接,类似于html里的&lt;a&gt;&lt;/a&gt; 3. &lt;s:...

    struts2标签大全

    所有的s标签介绍-C: &lt;s:checkbox&gt;&lt;/s:checkbox&gt;-----复选框 &lt;s:checkboxlist list=""&gt;&lt;/s:checkboxlist&gt;-----多选框 &lt;s:combobox list=""&gt;&lt;/s:combobox&gt;-----下拉框 &lt;s:component&gt;&lt;/s:component&gt;-----图像符号 D:...

    struts2标签技术

    例2: 生成一个iterator,使用count属性。因为count属性值为3,所以只有前三个内容(aaa,bbb,ccc)在生成的iterator中。 Generate an iterator with count attribute &lt;s:generator val="%{'aaa,bbb,ccc,ddd,eee'}" ...

    Struts2实现分页

    struts实现数据库添删改查,以及分页 ArrayList&lt;Users&gt; list; UserService service; Users user; Pager page=new Pager(); public Pager getPage() { return page; } public void setPage(Pager page) { ...

    使用Struts的Action来对数据库进行增、删、改、查四项操作(源码)

    使用Struts的Action来对数据库进行增、删、改、查四项操作&lt;br/&gt;&lt;br/&gt;1、数据库MySQL,创建数据库 Pagination&lt;br/&gt; MySQL.sql用来创建表结构&lt;br/&gt;&lt;br/&gt;连接方式有两种,一种直接JDBC,一种通过连接池,代码中有说明...

    logic:iterate标签当遍历的collection为Map时的使用

    iterate id="destMap" name="srcMap"&gt;&lt;br&gt;&lt;br&gt; &lt;bean:define id="bean" name="destMap" property="value" /&gt;&lt;br&gt;&lt;br&gt; &lt;bean:write name="bean" property="name" /&gt;&lt;br&gt;&lt;br&gt;&lt;/logic:iterate&gt;&lt;br&gt;&lt;br&gt;2. Map里存放的是...

    JSP通信录管理平台

    使用技术:JSP+Struts+MySQL+TAG&lt;br/&gt; 通信录内容包括: 姓名、性别、通信地址、联系电话、电子邮件等&lt;br/&gt;&lt;br/&gt;支持增、删、改、查 &lt;br/&gt;&lt;br/&gt;查询支持多条件过滤、分页&lt;br/&gt;&lt;br/&gt; 注意:&lt;br/&gt;&lt;br/&gt;每个用户有...

    struts2 OGNL之&lt;s:property&gt;标签访问值栈(value stack)用法

    struts2 OGNL之&lt;s:property&gt;标签访问值栈(value stack)用法,希望能对大家有帮助

    struts与jsp 使用方法

    在action里面写了方法获取一个list,再将这个list的值放到jsp页面中显示出来,用的是&lt;s:iterator&gt;标签。

    Struts原理、开发及项目实施

    Struts原理、开发及项目实施&lt;br/&gt; Holen 2002-9-12&lt;br/&gt;&lt;br/&gt;1、 摘要&lt;br/&gt;2、 关键词&lt;br/&gt;3、 Framework&lt;br/&gt;4、 Struts的起源&lt;br/&gt;5、 Struts工作原理&lt;br/&gt;6、 Struts安装&lt;br/&gt;7、 一个实例&lt;br/&gt;8、 Struts优缺点...

    Struts2 + Spring2.5 + JFreeChart 实现的投票系统,2008年高考作文评价投票

    知识点:struts2,struts2模型驱动,Java反射,struts2插件使用,struts2与JFreeChart的集成开发,JFreeChart图表 &lt;br/&gt; 1、开发环境:MyEclipse6.0, Struts 2.0.11, Spring2.5.4, struts2-spring-plugin-2.0.11.1,...

    OA 办公自动化, DAO登陆设计

    &lt;%@ page language="java" pageEncoding="UTF-8"%&gt; &lt;%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %&gt; &lt;%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %&gt; &lt;%@ taglib uri="/WEB-INF/struts-...

Global site tag (gtag.js) - Google Analytics