
struts2+spring
yezi1305
这个作者很懒,什么都没留下…
展开
-
struts2和struts1中select标签的使用
struts2: > > struts1: for(int i=1; i %> >原创 2009-10-22 11:16:00 · 955 阅读 · 0 评论 -
[转]Struts2+hibernate例子
流程: Hibernate的工作方式:核心:Session,SessionFactory, configuration。操作:在myeclispse中,先添加Hibernate capabilities,然后就是在Database Explore中,找到数据库的表, 进行映射处理。 Struts2:转载 2011-06-21 09:51:00 · 1218 阅读 · 1 评论 -
根据字符判断是否需要转码
最近在进行mysql数据库移植的时候遇到乱码问题,因为原来的数据库编码是latin1的,而新库是utf-8的,移植到新库中的数据中文全部是乱码,解决方法是通过判断字符集页面相应的进行相应的转码,或者是逐个读取表中数据转码后再插入正常的数据。下文是如何进行字符的字符集判断。转载自:http://blog.chinaunix.net/u3/95893/showart_2001787.html原创 2009-12-09 15:28:00 · 1278 阅读 · 1 评论 -
(转)SSH问题总结
本文转载自:http://fantlam.blogbus.com/logs/27339525.html 2008-07-20 22:25:27,531 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path reso转载 2009-12-09 13:46:00 · 569 阅读 · 0 评论 -
Struts2拦截器的使用(详解)
本文转载自:http://blog.chinaunix.net/u2/86974/showart_1742723.html 如何使用struts2拦截器,或者自定义拦截器。特别注意,在使用拦截器的时候,在Action里面必须最后一定要引用struts2自带的拦截器缺省堆栈defaultStack,如下(这里我是引用了struts2自带的checkbox拦截器): 0(必须加,否则出错转载 2009-12-03 16:36:00 · 494 阅读 · 0 评论 -
Struts2标签实现for循环【select】
在struts2及webwork中要实现如:for(int i=0;i Java代码 counter: counter: 其中first属性指定循环起始值,last指定循环终止值,其它相关属性可以查看org.apache.struts2.util.Counter类源码。在下转载 2009-12-01 10:01:00 · 1324 阅读 · 0 评论 -
mysql别名取不出值(getColumnLabel和getColumnName的区别)
本文转载自:http://203.208.39.132/search?q=cache:y8EthTZt3rEJ:zhangjiansheng.blogspot.com/2007/03/getcolumnlabel-vs-getcolumnname.html+getcolumnname+getcolumnlabel&cd=1&hl=zh-CN&ct=clnk&gl=cn&st_usg=ALhdy2_转载 2009-11-30 17:10:00 · 6893 阅读 · 1 评论 -
Struts2.0异常总结
1、异常信息:The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet f转载 2009-11-23 10:03:00 · 1486 阅读 · 1 评论 -
struts2 doubleselect用法及示例
本文转载自:http://hi.baidu.com/shiweichensi/blog/item/476f1a89126b3318c9fc7a62.htmlhttp://blog.sina.com.cn/s/blog_6145ed810100ebo6.html~type=v5_one&label=rela_prevarticlestruts2中s:select标签的使用转载 2009-11-10 13:47:00 · 1798 阅读 · 2 评论 -
Illegal attempt to associate a collection with two open session
本文转载自:http://whq0417.blog.163.com/blog/static/12795144120098150238663/?NI5TH7NZFE=yiFfuCpBty Hibernate交给spring 管理了... 我的出现上述问题了..代码如下: /** 修改 **/ public void update(Object entity) {转载 2009-11-06 14:50:00 · 3751 阅读 · 1 评论 -
struts2防止重复提交和等待画面
本文转载自:http://hi.baidu.com/menglinxi_a/blog/item/8bdc6ade9579325295ee37ee.html双击制御 有些时候一些操作会非常的耗费时间(Long Lived Operation),例如这个数据库的导出,表表生成等。有些时候程序的使用者看到很长时间服务器没有反应,倾向于多次点击提交按钮。这样恰恰相反,由于重新使服务器运行相同的长时间操转载 2009-10-27 14:35:00 · 739 阅读 · 0 评论 -
struts2格式化日期和时间
本文参考自:http://www.360doc.com/showWeb/0/0/8042943.aspx struts2 中的默认的日期输出并不符合我们的中文日常习惯.以下是我知道的在struts2中进行日期格式化输出的几种方式.1.利用 进行格式化.如:就是将属性birthday按yyyy-MM-dd的格式进行输出.2.利用进行格式化.如: 或者" /> 还有一种是通过国转载 2009-10-29 15:41:00 · 3698 阅读 · 2 评论 -
[转]Struts2 + Spring + Hibernate + DWR 项目布署笔记
本文转载自:http://51jsr.javaeye.com/blog/294756 SSHD的布署主要分为五部分,分别是:建立web项目、整合Struts2到新建的web项目、为项目添加Spring和Hibernate并做好必要的整合配置、整合Spring和Struts2、添加DWR到web项目。 项目布署 ·建立web项目 在Eclipse的菜单栏中,选择 文件->转载 2009-10-29 11:17:00 · 668 阅读 · 0 评论 -
struts2中设置select、radio默认选中已设置的值
eg: 0"/> 男 女 男 女 ------------------------------------------------------------------------原创 2009-10-29 11:10:00 · 3903 阅读 · 0 评论 -
struts2解决中文乱码
本文转载自:http://chunpeng.javaeye.com/blog/163926终于在自己的项目中引入struts2了,但一上来就来一个中文乱码的问题。google了半天找了几个不痛不痒的结果,很是不满意。又调试了半天,终于 解决了中文乱码的问题。总结一下,中文乱码,首先要区分是页面乱码、action乱码,还是数据库乱码。大致的原理是java使用unicode编码转载 2009-10-23 15:32:00 · 532 阅读 · 0 评论 -
如何在Spring中注入servlet配置组件?
在servlet中可用此取得publicservice业务服务对象:public class RetrievedataproxyBean extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOExcept转载 2009-10-21 17:30:00 · 595 阅读 · 0 评论 -
java类和servlet中访问spring中的bean
servlet 的访问spring中的bean: ServletContext application=null; WebApplicationContext wac=null; application = getServletContext(); wac = WebApplicationContextUtils.getWebApplicationConte转载 2012-02-04 16:18:30 · 500 阅读 · 0 评论