随笔分类 -  jsp

 
Action里跳转到错误页的另一种方法(struts1.2)
摘要:ActionMessages meg = new ActionMessages();meg.add("*.error", new ActionMessage("*.error")); this.saveErrors(request, meg);return mapping.getInputForward(); 阅读全文
posted @ 2008-05-29 21:29 Fei飞 阅读(792) 评论(1) 推荐(0)
mysql中文配置
摘要:Dos下连接mysql后,运行一下几项就可以插入中文了:SET character_set_client = gbk; SET character_set_connection = gbk; SET character_set_database = gbk; SET character_set_results = gbk; SET character_set_server = gbk; SET c... 阅读全文
posted @ 2008-04-05 04:39 Fei飞 阅读(663) 评论(0) 推荐(1)
js实现按钮控制加减
摘要: 阅读全文
posted @ 2008-03-17 21:34 Fei飞 阅读(3180) 评论(1) 推荐(0)
Could not execute JDBC batch update
摘要:Exception in thread "main" org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update 原因与解决: 1.因为Hibernate Tools(或者Eclipse本身的Database Explorer)生成*.hbn.xml工具中包含有catalog="***"(*表... 阅读全文
posted @ 2008-03-17 17:17 Fei飞 阅读(4828) 评论(2) 推荐(0)
用js获取select所选的值
摘要:投票项目 : 或: 姚明 买努 科比 text中就显示了select所选的内容 阅读全文
posted @ 2008-03-13 22:03 Fei飞 阅读(12262) 评论(2) 推荐(1)
struts中,防止F5刷新,造成重复投票方法
摘要:现声明一个变量p:int p; 在 public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) 函数里加入一个if语句 if(p==1){ return mapping.findFo... 阅读全文
posted @ 2008-03-11 21:03 Fei飞 阅读(778) 评论(3) 推荐(0)
类型转换和页面获取值(总爱忘的)
摘要:String转化为int int i = Integer.parseInt([String]); int i = Integer.valueOf([String]).intValue(); 另外: int i =Double.parseDouble([String]); int转化为String String s = String.valueOf(i); String s = Intege... 阅读全文
posted @ 2008-02-18 20:42 Fei飞 阅读(198) 评论(0) 推荐(0)
JDBCTM中Statement接口提供的execute、executeQuery和executeUpdate之间的区别
摘要:Statement 接口提供了三种执行 SQL 语句的方法:executeQuery、executeUpdate 和 execute。使用哪一个方法由 SQL 语句所产生的内容决定。 方法executeQuery 用于产生单个结果集的语句,例如 SELECT 语句。 被使用最多的执行 SQL 语句的方法是 executeQuery。这个方法被用... 阅读全文
posted @ 2008-02-17 21:25 Fei飞 阅读(1996) 评论(0) 推荐(0)
struts标签库
摘要:struts标签库 一.html标签 1.html元素的标签: a1. 链接中的name a2. 链接到站点外 a3. 同一个应用 如:包含请求参数: 包含单个请求变量: //要有范围 包含多个请求变量: url b.: //也可以包含单个或多个请求变量 2.基本表单标签:,,,, Cancel :Action中的取消事件: Fo... 阅读全文
posted @ 2008-02-16 11:20 Fei飞 阅读(1553) 评论(0) 推荐(0)
由Action跳转到错误页
摘要:利用以下代码返回到input指定的页面: ActionMessages errors = new ActionMessages(); errors.add("error", new ActionMessage("error.login")); super.saveErrors(request,errors); return mapping.get... 阅读全文
posted @ 2008-02-15 17:42 Fei飞 阅读(256) 评论(0) 推荐(0)
sh中的错误和解决方案
摘要:当Web层和Struts整合后,就抛出如下异常: %%%% Error Creating SessionFactory %%%% java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer in... 阅读全文
posted @ 2008-02-14 20:16 Fei飞 阅读(969) 评论(0) 推荐(0)
rs.*
摘要:rs.absolute(...)允许你指定结果集的绝对位置, 如果没有它,假如你要取第1000条记录的数据,就只能rs.next()1000次了:) rs.isAfterLast()是一种特殊的状态,表征已到达结果集的结尾,此时你如果调用rs.next()就会抛出异常 rs.next();//向后滚动 rs.getRow();//得到当前行号 rs.absolute(n);//光标定位到n行 rs... 阅读全文
posted @ 2008-02-14 00:29 Fei飞 阅读(253) 评论(0) 推荐(0)
WebProject在Tomcat启动时默认界面的修改
摘要:在启动WebProject时, 默认界面为“index.jsp”, 若想修改默认面,只需打开WebProject/WebRoot/WEB-INF/web.xml, 然后做如下改动就行了 “要修改的默认面名称”.jsp 阅读全文
posted @ 2008-02-01 09:25 Fei飞 阅读(741) 评论(1) 推荐(0)
struts,和Hibernate优点
摘要:struts框架将视图(JSP)(可以将文本图片分离),业务逻辑(Action),模型(ActionForm)分离,方便了维护,加快了运行速度。 Hibernate可以很容易连接数据库,然后通过三个简单的类操作数据库(读取数据库类(单独一个vo包);数据库操作脚本类;实现功能类(这两者单独一个pojo类包))。个人理解。 阅读全文
posted @ 2008-01-29 10:34 Fei飞 阅读(1219) 评论(2) 推荐(0)
FEI计算器
摘要:虽然技术含量不高,但是操作起来还行 ff计算器 阅读全文
posted @ 2007-12-23 12:28 Fei飞 阅读(156) 评论(0) 推荐(0)