`
huobengluantiao8
  • 浏览: 1030896 次
文章分类
社区版块
存档分类
最新评论

loveJ总结

 
阅读更多

1.struts2和spring集成时如果使用struts2的convention功能,需要spring使用注解注入,不然会造成注入失败,NullPointerException!

2.struts2中可以使用${request.getContext}得到项目根目录。

3.struts2和freemarker结合它们的标签不能嵌套,需要使用el表达式进行转换。

4.struts2中的convention功能会优先匹配execute方法,使用时注意。

5.struts2中fielderror标签样式的修改

你将struts-core*中的template解出来,然后你把它放到项目的WEB-INF下,在struts.properties中添加代码
struts.ui.theme=simple
struts.ui.templateDir=WEB-INF/template
然后修改下simple下的fielderror.ftl文件,将该文件中的 <li>和 </li>删除;

或者完全拷贝simple的内容定义一个自己的UI;
比如将simple拷贝一份命名为default,同样修改fielderror.ftl,在新建一个文件为theme.properties,添加内容parent = simple

再修改struts.properties的struts.ui.theme=default;这样每个文件的theme就不要指定了


6.jquery Validationengine 提示框不会自动消失原因是
<input type="text" name="user.nickname" class="validate[maxSize[6]]" value="2312312312312" id="user.name"/>
id使用 id="user.name"该种形式,如果使用id=“user”则不会发生,这个是个bug。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics