`
arantam
  • 浏览: 40915 次
  • 性别: Icon_minigender_1
  • 来自: 广州
文章分类
社区版块
存档分类
最新评论
文章列表
半夜中醒来,写点东西,以记念OpenSymphony. 先pray一下: OpenSymphony, Rest in Peace... 事情起源于,刚Clean了下project,忽然发现MyEclipse下所有validator xml的dtd都无效...心头涌上一股不祥的预感!! 于是跟踪openSymphony站点上的dtd url,结果显示的是"Unfortunately, OpenSymphony has seen it's final days..."云云... 惊呆.顿时不知如何是好... 急忙找了几个鸡肠站,幸好. Oh, so here you ...
http://propedit.sourceforge.jp/index_en.html
在一台机子上同时跑两个Tomcat,要注意的是端口的冲突问题.修改下面三处地方就可以了:   (1) 修改http访问端口(默认为8080端口) <Connector   className="org.apache.coyote.tomcat4.CoyoteConnector"   port="8080"                                 minProcessors="5"   maxProcessors="75"                              ...
http://www.itextpdf.com   A powerful tool to manipulate PDF documents.
(哈,这标题可真够长的...)   需求: 1.管理员后台可显示当前在线访客数以及在线会员数(在线会员要求列出详细清单). 2.某个客户端非法退出(直接关闭浏览器或断电啥的)后,接着他重新登录系统.在线统计上要做到保持登录统计的准确性与完整性. 3.防止多个客户端同时使用一个帐户异地登录(后登录者踢掉先登录者,并通知先登录者被迫下线).     1.监听器SessionListener (web.xml的代码略) /** * 创建session */ public void sessionCreated(HttpSessionEvent se) { Onl ...
这几天才开始用freemarker,不是用来作view层,而是在struts2框架下进行页面的静态化处理. 如果把freemarker作为view层来使用那非常方便,直接在配置文件的result中设置type为freemarker.除了性能上的所谓区别外,在配置上跟普通的jsp作为view层没什么区别.   而目前想要使用它来生成静态化html文件,想在ftl里面使用struts2的标签..上网找了一堆资料,介绍如下:   1.将S2标签库定义文件放到WEB-INF目录下,也就是把struts2-core- 2.0.6.jar中的struts-tag.tld放到WEB-INF目录下.拷 ...
最近遇到一个问题,例如表单中有个age字段,为int类型,但是该属性没填或者填的是字符串. 当表单提交的时候,struts2的拦截器会对age字段进行类型转换. 我使用了验证框架的是required与int验证器对该字段进行了验证. 可以肯定的是,转换失败的话确实能够返回到view层,并且能提示自定义的转换异常信息. 但是,在myeclipse的控制台依然会打印setAge()异常,说ognl method not found, 程序没有找到setAge(String age)方法...   在网上找了几天,只找到这种解决方法: => 把PO类的age属性类型改为包装类,In ...
*author 谭剑 ##################################################################################################################在Apache官方网站上已声明,对于Tomcat6.0的版本,把<logger>元素嵌套在<Context>元素中不再合法.原文如下:An important consequence for Tomcat 6.0 is that the <Logger> element found in previous ver ...
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 is a piece of cake. Yep, just a piece of cake, but i missed it and problem happened. Never forget to ...
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" in Service, a problem must be taken attention to: the ".jar" file that conflict ...
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 "timestamp", and in MySQL, the column type should be "DateTime&quo ...
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. whether the property "dynamic-update=true" makes sense in hiber ...
配置文件,通过redirectAction传值,虽运行正常,但控制台输出异常: Caught OgnlException while setting property 'xxx.id' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. - Class: ognl.ObjectPropertyAccessor File: ObjectPropertyAccessor.java Method: getProperty Caused by: ognl.NoSuchProp ...
如果我们在Hibernate中需要查询多个表的不同字段,那么如何来获取Hibernate多表查询的结果呢?有两种方式: 1、 对各个字段分别转化成对应类型,如下:   Query q = session.createQuery(" select members, classInfo.className " +            " from Members members, ClassInfo classInfo " +            " where members.level = classInfo.class ...
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-tx-2.0.xsd"   2.声明事务管理器   <bean id="transactionManager" class=&quo ...
Global site tag (gtag.js) - Google Analytics