Set set = new HashSet() {{ add("one"); add("two"); }}     不废话,如上的代码所示。 原来写代码,一直循规蹈矩这样子写 public class xx{ Set set = new HashSet(); xx(){ set.add("one"); set.add("two"); } } ...
大家都知道使用PropertyOverrideConfigurer配置覆盖string型的属性或者简单类型的属性非常简单 如 beanName.property=123 今天发现原来也可以设置List或者Map的 beanName.propertyList[0]=xx beanName.propertyMap[key]=yyy 但是怎样重新指定属性的引用呢? 如 beanName.property=bean1 (bean1是其它bean的ID) 但是会报错,我尝试这样beanName.property(ref)=bean1也同样报错!!! 列位兄弟大家看看该咋办
哈哈,终于可以用struts2了。以前没用过webwork,几天看下来,觉得这种mvc比较强。 原来在struts 1 中访问tiles定义的页面需要配置org.apache.struts.tiles.actions.DefinitionDispatcherAction,真是很麻烦! 到如今的struts2中可以使用强大的通配符action配置就可以轻松搞定,配置如下: <action name="tiles-*"> <result type="tiles">{1}</result> </action> 访问tiles定义bar,通过url: tiles ...
2007-03-30

struts 2 .0.6 版本时 文件上传

关键字: struts2
今天在试用struts2时碰到文件上传的问题。最后发现必须配置      org.apache.struts2.dispatcher.ActionContextCleanUp才可以正常工作,而且我没有并在文档中发现这个说明。希望大家不再遇到同样的问题
jimichan
搜索本博客
我的相册
6c3caa48-8d6c-31c4-b19a-3164052c9d00-thumb
m1.JPG
共 2 张
最近加入圈子
存档
最新评论