随笔分类 -  Java-实例代码

摘要:BirthAction.java BirthConverter.java: BirthAction-conversion.properties: Birth.java: index.jsp show.jsp 阅读全文
posted @ 2018-11-17 20:57 Roni_i 阅读(256) 评论(0) 推荐(0)
摘要:1.创建自增序列 2.对ID创建触发器 3.Userinfo.hbm.xml使得<generator class="increment"> 序列: 触发器: Userinfo.hbm.xml: DAO: Userinfo.java: 阅读全文
posted @ 2018-11-17 18:58 Roni_i 阅读(1185) 评论(0) 推荐(0)
摘要:1.oracle数据库分页 select * from (select a.*,rownum rc from 表名 where rownum=startrow 2.DB2数据库分页 Select * from (select rownumber() over() as rc,a.* from (select * from 表名 order by列名) as a) where r... 阅读全文
posted @ 2018-11-16 20:59 Roni_i 阅读(930) 评论(0) 推荐(0)
摘要:代码结构: UploadAction.java index.jsp struts.jsp success.jsp 阅读全文
posted @ 2018-11-15 15:03 Roni_i 阅读(428) 评论(0) 推荐(0)
摘要:开发环境: IDE:Myeclipse10.0 数据库:Oracle(SQL Developer) Web容器:Tomcat 7.0 JDK:1.6 Struts:2.0 Hibernate:3.3 数据库:(ID为主键,设置了序列以及触发器SEQUENCE_ID,使得ID自增) 注意事项: 创建项 阅读全文
posted @ 2018-11-15 13:19 Roni_i 阅读(498) 评论(0) 推荐(0)
摘要:package common; /** *字符串处理公用类 */ public class DealString { /** * 转换字符编码 由“iso-8859-1”西文转换为简体中文 */ public static String toGb(String uniStr){ String gbStr=""; if(un... 阅读全文
posted @ 2018-11-06 21:10 Roni_i 阅读(212) 评论(0) 推荐(0)
摘要:package common; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class DealTime { private Date time; private String strtime; private SimpleDat... 阅读全文
posted @ 2018-11-06 21:09 Roni_i 阅读(158) 评论(0) 推荐(0)
摘要:package common; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.ser... 阅读全文
posted @ 2018-11-06 21:08 Roni_i 阅读(281) 评论(0) 推荐(0)
摘要:1.工具类,生成随机验证码字符串 2. 3. 4. 阅读全文
posted @ 2018-11-06 20:43 Roni_i 阅读(828) 评论(0) 推荐(0)
摘要:import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Jiami { private static String jiami=null; public st... 阅读全文
posted @ 2018-11-06 20:42 Roni_i 阅读(160) 评论(0) 推荐(0)