2014年8月20日
摘要:
1:采用手工编写代码实现。通过继承ActionSupport类,然后重写vlidate方法,validate方法会校验跟execute同样签名的方法,当某个数据校验失败时,我们应该调用addFieldError()这个方法向系统的FieldError添加信息,如果校验失败了,Struts2会自动转发...
阅读全文
posted @ 2014-08-20 15:55
暮光之眼
阅读(274)
推荐(0)
摘要:
一、标签处理类:package cn.conris.sys.form;import java.io.IOException; import java.util.Enumeration;import javax.servlet.http.HttpServletRequest;import javax...
阅读全文
posted @ 2014-08-20 13:11
暮光之眼
阅读(202)
推荐(0)
摘要:
一、标签处理类:/** * ClassName: PagerTag.java * created on Oct 21, 2008 * Copyrights 2008 qjyong All rights reserved. * EMail: qjyong@gmail.com */package...
阅读全文
posted @ 2014-08-20 11:31
暮光之眼
阅读(225)
推荐(0)
2014年8月11日
摘要:
Struts2接收checkbox的值:HTML:B1B2B3B4Action:private List listCheckbox;public List getListCheckbox() {return listCheckbox;}public void setListCheckbox(List...
阅读全文
posted @ 2014-08-11 15:52
暮光之眼
阅读(725)
推荐(0)
摘要:
Spring属于轻量级还是重量级框架? 这需针对使用Spring的功能而言,比如我们常使用其核心服务整合SSH,这样则为轻量级。如果使用其大部分服务则可以理解为重量级。普通JAVA项目环境下预加载Spring —applicationContext.xmlAbstractApplicationCon...
阅读全文
posted @ 2014-08-11 15:51
暮光之眼
阅读(104)
推荐(0)
摘要:
public static void main(String[] args) {outer: for (int i = 0; true; i++) {inner: for (int j = 0; true; j++) {System.out.println("i=" + i + "------j="...
阅读全文
posted @ 2014-08-11 14:36
暮光之眼
阅读(220)
推荐(0)
摘要:
public class Test {public static void main(String[] args) {String str = "";// list转字符串List list = new ArrayList();list.add("A");list.add("B");list.add...
阅读全文
posted @ 2014-08-11 14:28
暮光之眼
阅读(689)
推荐(0)
摘要:
ArrayList提供了一个将List转为数组的一个非常方便的方法toArray。toArray有两个重载的方法:1.list.toArray();2.list.toArray(T[] a);对于第一个重载方法,是将list直接转为Object[] 数组;第二种方法是将list转化为你所需要类型的数...
阅读全文
posted @ 2014-08-11 14:09
暮光之眼
阅读(191)
推荐(0)
摘要:
使用过SSH注解的屌丝们都知道,要想使用注解需要在applicationContext.xml配置文件里面开启注解配置,开启方式如下:1.头部声明需加入xmlns:context="http://www.springframework.org/schema/context"http://www.sp...
阅读全文
posted @ 2014-08-11 11:22
暮光之眼
阅读(1514)
推荐(0)
2014年7月31日
摘要:
已连接空闲例程命令create spfile from pfile='路径';E:\oracle\product\10.2.0\db_1\admin\orcl\pfile\init.ora.62201354056
阅读全文
posted @ 2014-07-31 09:15
暮光之眼
阅读(337)
推荐(0)