资源简介

前几天写的,感觉还可以的

资源截图

代码片段和文件信息

/**
 * 
 */
package com.sanqing.course.action;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.converters.BigDecimalConverter;
import org.apache.commons.beanutils.converters.BigIntegerConverter;
import org.apache.commons.beanutils.converters.ByteConverter;
import org.apache.commons.beanutils.converters.DoubleConverter;
import org.apache.commons.beanutils.converters.FloatConverter;
import org.apache.commons.beanutils.converters.IntegerConverter;
import org.apache.commons.beanutils.converters.LongConverter;
import org.apache.commons.beanutils.converters.ShortConverter;
import org.apache.commons.beanutils.converters.SqlDateConverter;
import org.apache.commons.beanutils.converters.SqlTimeConverter;
import org.apache.commons.beanutils.converters.SqlTimestampConverter;

import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.actions.DispatchAction;



/**
 * @author Administrator
 *
 */
public class baseDispatchAction extends DispatchAction {

 static {
     ConvertUtils.register(new BigDecimalConverter(null) BigDecimal.class);
     ConvertUtils.register(new BigIntegerConverter(null) BigInteger.class);
     ConvertUtils.register(new FloatConverter(null) Float.class);
     ConvertUtils.register(new DoubleConverter(null) Double.class);
     ConvertUtils.register(new ByteConverter(null) Byte.class);
     ConvertUtils.register(new IntegerConverter(null) Integer.class);
     ConvertUtils.register(new LongConverter(null) Long.class);
     ConvertUtils.register(new ShortConverter(null) Short.class);
     ConvertUtils.register(new SqlDateConverter(null) Date.class);
     ConvertUtils.register(new SqlTimeConverter(null) Time.class);
     ConvertUtils.register(new SqlTimestampConverter(null) Timestamp.class);
    }

    /**
 * 保存单条信息到Message的简化函数.
 */
protected void saveMessage(HttpServletRequest request String key
String... values) {
ActionMessages messages = new ActionMessages();
messages.add( ActionMessages.GLOBAL_MESSAGE
new ActionMessage(key values) );
saveMessages(request.getSession() messages);
}

/**
 * 保存单条信息到Message的简化函数.
 */
protected void saveError(HttpServletRequest request String key
String... values) {
ActionMessages errors = new ActionMessages();
errors.add( ActionMessages.GLOBAL_MESSAGE
new ActionMessage(key values) );
saveErrors(request.getSession() errors);
}

/**
 * 获取用户请求页数
 * @param request
 * @return
 */
protected int getPageNo(HttpServletRequest request) { 
   
String strPageNo = request.getParameter(“pageNo“);

int pageNo = 1;
if(strPageNo == null || strPageNo.equa

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-03-26 21:49  JavaPrj_17\
     文件        4340  2016-12-21 13:01  JavaPrj_17\.classpath
     目录           0  2014-03-26 21:59  JavaPrj_17\.myeclipse\
     文件         304  2014-03-26 21:17  JavaPrj_17\.mymetadata
     文件        1283  2014-03-26 21:18  JavaPrj_17\.project
     目录           0  2014-03-26 21:49  JavaPrj_17\.settings\
     文件        1040  2009-12-20 09:54  JavaPrj_17\.settings\com.genuitec.eclipse.j2eedt.core.prefs
     文件         130  2009-12-20 09:25  JavaPrj_17\.settings\org.eclipse.core.resources.prefs
     目录           0  2014-03-26 21:49  JavaPrj_17\src\
     文件        2752  2009-12-20 09:46  JavaPrj_17\src\applicationContext-actions.xml
     文件        1816  2009-12-20 09:46  JavaPrj_17\src\applicationContext-beans.xml
     文件        1776  2009-12-20 09:46  JavaPrj_17\src\applicationContext-common.xml
     目录           0  2014-03-26 21:49  JavaPrj_17\src\com\
     目录           0  2014-03-26 21:49  JavaPrj_17\src\com\sanqing\
     目录           0  2014-03-26 21:49  JavaPrj_17\src\com\sanqing\course\
     目录           0  2016-12-21 20:51  JavaPrj_17\src\com\sanqing\course\action\
     文件        3276  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\action\baseDispatchAction.java
     文件        5199  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\action\CourseAction.java
     文件        6902  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\action\CourseScheduleAction.java
     文件       11469  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\action\MarkAction.java
     文件        7231  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\action\StudentAction.java
     目录           0  2014-03-26 21:49  JavaPrj_17\src\com\sanqing\course\dao\
     目录           0  2014-03-26 21:49  JavaPrj_17\src\com\sanqing\course\daoImpl\
     文件        2922  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\daoImpl\CourseDAOImpl.java
     文件        6882  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\daoImpl\CourseScheduleDAOImpl.java
     文件        6076  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\daoImpl\MarkDAOImpl.java
     文件        6431  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\daoImpl\StudentDAOImpl.java
     文件        2991  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\daoImpl\TeacherDAOImpl.java
     文件        2811  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\daoImpl\TeamDAOImpl.java
     文件        3480  2009-12-20 09:46  JavaPrj_17\src\com\sanqing\course\daoImpl\UserDAOImpl.java
     文件         805  2009-12-20 09:47  JavaPrj_17\src\com\sanqing\course\dao\CourseDAO.java
............此处省略341个文件信息

评论

共有 条评论