- 博客(18)
- 资源 (3)
- 收藏
- 关注
原创 OpenSymphony, RIP
半夜中醒来,写点东西,以记念OpenSymphony.先pray一下: OpenSymphony, Rest in Peace...事情起源于,刚Clean了下project,忽然发现MyEclipse下所有validator xml的dtd都无效...心头涌上一股不祥的预感!!于是跟踪openSymphony站点上的dtd url,结果显示的是"Unfortunately...
2011-06-05 00:43:46
114
原创 jp人开发的一个Helios插件-Properties Editor
http://propedit.sourceforge.jp/index_en.html
2011-05-28 14:02:43
169
原创 同时跑两个Tomcat
在一台机子上同时跑两个Tomcat,要注意的是端口的冲突问题.修改下面三处地方就可以了: (1) 修改http访问端口(默认为8080端口)<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8080" minPro...
2011-05-04 15:53:02
150
原创 Itext-PDF
http://www.itextpdf.com A powerful tool to manipulate PDF documents.
2011-04-28 15:28:10
116
在Struts2下使用[拦截器]配合[session监听器]实现在线会员统计与防止重复登录
(哈,这标题可真够长的...) 需求:1.管理员后台可显示当前在线访客数以及在线会员数(在线会员要求列出详细清单).2.某个客户端非法退出(直接关闭浏览器或断电啥的)后,接着他重新登录系统.在线统计上要做到保持登录统计的准确性与完整性.3.防止多个客户端同时使用一个帐户异地登录(后登录者踢掉先登录者,并通知先登录者被迫下线). 1.监听器SessionListen...
2010-07-06 00:55:12
87
使用freemarker生成静态化页面
这几天才开始用freemarker,不是用来作view层,而是在struts2框架下进行页面的静态化处理.如果把freemarker作为view层来使用那非常方便,直接在配置文件的result中设置type为freemarker.除了性能上的所谓区别外,在配置上跟普通的jsp作为view层没什么区别. 而目前想要使用它来生成静态化html文件,想在ftl里面使用struts2的标签.....
2010-04-27 20:56:27
166
原创 Strust2.1.6 类型转换异常处理(type conversion, exception handle)
最近遇到一个问题,例如表单中有个age字段,为int类型,但是该属性没填或者填的是字符串.当表单提交的时候,struts2的拦截器会对age字段进行类型转换.我使用了验证框架的是required与int验证器对该字段进行了验证.可以肯定的是,转换失败的话确实能够返回到view层,并且能提示自定义的转换异常信息.但是,在myeclipse的控制台依然会打印setAge()异常,说og...
2010-03-06 17:41:57
216
Tomcat 6.0 Logger的配置
*author 谭剑##################################################################################################################在Apache官方网站上已声明,对于Tomcat6.0的版本,把<logger>元素嵌套在<Context>元素中不再合法....
2009-09-03 15:02:23
132
Never forget a .jar again!!
After adding Hibernate and Spring capability to the project, and all the configuration files(web.xml, applicationContext.xml) being well configged, one problem should be taken attention to, though it ...
2009-08-24 20:04:44
189
A New Problem Comes Up.
when using spring transactional annotation, there exists a very important problem that is ignored easily.that is:after configuring the applicationContext.xml, and add an annotation "@transactional...
2009-08-17 22:57:45
78
About the "Date".
When a user registers, a timestamp should be marked down together with other information.then the property "RegisterTime" of UserBean should be of type "Date", the mapping type in hbm.xml should be ...
2009-07-21 21:08:22
96
An Inconspicuous Problem
some strange relationship among the three parts:1. whether the Action is "stateful" or not;2. whether the property "scope" in tag "bean" in ApplicationContext.xml is singleton or prototype;3. wh...
2009-07-20 23:16:16
86
Struts2.1.6的一个bug
配置文件,通过redirectAction传值,虽运行正常,但控制台输出异常:Caught OgnlException while setting property 'xxx.id' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class: ognl.ObjectPropertyA...
2009-07-11 02:51:15
138
原创 Hibernate多表查询结果处理
如果我们在Hibernate中需要查询多个表的不同字段,那么如何来获取Hibernate多表查询的结果呢?有两种方式:1、 对各个字段分别转化成对应类型,如下: Query q = session.createQuery(" select members, classInfo.className " + " from Members members, C...
2009-06-26 13:32:41
128
Spring + Hibernate spring管理事务
spring配置事务处理,选择annotation驱动的方式.1.在配置文件中加入schema. xmlns:tx="http://www.springframework.org/schema/tx"http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-t...
2009-06-26 01:41:04
109
SSH整合框架下使用log4j要注意的问题
先说说怎样使用该插件.1.导入jar包.2.创建"xxx.properties"文件,放在src目录下. 3.在web.xml中添加入下配置: <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/cl...
2009-06-25 03:45:30
121
Struts2使用Json-plugin的NoSuchMethodError
最近学习Struts2+JsonPlugin的整合.上apache官网仔细走了一遍,在下面这个问题上卡死了.java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; at com.googlecode.jsonplugin.JSONRe...
2009-06-20 21:14:22
124
从网络工程师转为JAVA程序员的尴尬.
07年大学毕业后,我到了一家网络设备公司去工作,那是家网络设备代理商。我的职位是网络工程师,负责网络设备售前技术支持、售后上门调试及客户网络故障的排查。在工作中逐渐地熟悉了路由与交换设备的安装调试及网络排障,作为个人能力证明的一些厂家认证也拿了几个。虽然待遇有3K,工作稳定。但是逐渐地也觉得网络及硬件设备存在很多限制,巧妇难为无米之炊,硬件技术支持严重依赖于设备,缺乏创造性;且经常独自出差调试...
2009-03-03 22:06:10
3182
5
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人