![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
struts2
文章平均质量分 82
独立与自由
这个作者很懒,什么都没留下…
展开
-
Struts2的国际化
Struts2的国际化: (建立在java国际化基础之上) mess_zh_CN.properties:(该文件应放在类加载路径下) loginPage=登录页面 succTip=欢迎您已经登录 login=登录 加载全局资源文件: struts.xml: <constant name="struts.custom.i18n.resources" va...2014-07-03 10:32:32 · 119 阅读 · 0 评论 -
Convention插件与"约定"支持
使用Convention,必须将Struts2下的struts2-convention-plugin-*.*.*.jar复制到WEB-INF/lib路径下 Action的搜索和映射约定:(它会自动搜索位于action、actions、struts、struts2包下的所有java类) 会把如下java类当做Action: ...原创 2014-07-03 09:52:51 · 103 阅读 · 0 评论 -
使用PreResultListener
它是一个监听器接口,它可以在Action完成控制处理之后,系统转入实际的物理视图之间被回调 public class LoginRegistAction extends ActionSupport { ... public String execute() throws Exception { ActionInvocation invocation ...原创 2014-07-03 09:43:11 · 144 阅读 · 0 评论 -
Struts2的配置
Struts2应用开发步骤: 1.将Struts2的lib文件夹下的commons-fileupload-1.2.1.jar、commons-io-1.3.2.jar、freemarker- 2.3.16.jar、javassist-3.7.ga.jar、ognl-3.0.jar、struts2-core-2.2.1.jar、xwork-core-2.2.1.jar复制到 ...原创 2014-06-02 10:09:18 · 88 阅读 · 0 评论 -
OGNL表达式语言
OGNL表达式语言: (Action将数据放入其中,JSP页面可从中取出数据) 基本语法 #bar.foo.blah(如果需要访问的属性属于根对象,则可直接访问该属性,如blah,否则必须使用一个对象名作为前缀修饰该属性,#bar.blah) 属性访问器: Struts提供了一个特殊的OGNL PropertyAccessor(属性访问器),它可以自动搜寻Stack Context...原创 2014-07-03 11:01:59 · 112 阅读 · 0 评论