![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
STRUTS2
LightSoldier
这个作者很懒,什么都没留下…
展开
-
最简单的Struts配置
1。基础的应用所需要的架包 struts2-core-2.x.x jar : Struts2框架的可信类库 xwork-2.x.x.jar :XWork类库, Strts2在其上构建 ognl-2.6.x.jar:对象图导航语言(Object Graph Navigation Language),struts2框架通过其读写对象的属性 freemarker-2.3.x.jar:st...2011-04-16 18:56:17 · 97 阅读 · 0 评论 -
编辑Struts配置的时候报错? Eclipse没有提示?
因为Eclipse不知道Struts DTD 文件,所以没有提示,可以手动为Eclipse添加DTD文件 首先在下载的struts2 包中查找 *.dtd 就可以找到了 然后在eclipse中点击window->preference->在左上角输入xml->选中XML Catalog-> 点击右边的Add 接下来选中你...2011-04-16 19:17:13 · 83 阅读 · 0 评论 -
Action的搜索顺寻
Action的搜索顺寻 http://ip:port/project/package/actionName http://localhost:8080/struts2/first/helloworldhttp://localhost:8080/struts2/first/wrong1/wrong2/wrong2/helloworld上列两个地址都可以反问到HelloWorldAct...2011-04-16 19:21:12 · 91 阅读 · 0 评论 -
Action 的各项默认配置值
Action的各项默认配置值 action没有class,默认为com.opensymphony.xwork2.ActionSupportaction没有method,默认为action的execute方法;result没有name,默认为success 配置一 <action name="index"> <result>admin/main.action<...2011-04-16 19:25:16 · 110 阅读 · 0 评论 -
Result的转发类型
Result的转发类型 1.requestDispatcher 内部请求转发(默认)2.redrect 浏览器重定向(页面不能放置在WEB-INF下)3.redrectAction 重定向Action <action name="redirectAction"> <result type="redirectAction"> <param name="ac...2011-04-16 19:30:34 · 110 阅读 · 0 评论 -
为Action属性注入值
当一些属性不适合固定的写入时适合使用这种方式。要为某一个属性提供set方法,如果需要使用则同样要提供get方法。 public class HelloWorldAction{ private String savePath; public void setSavePath(String savePath){ this.savePath = savePath; } ...2011-04-16 19:35:44 · 97 阅读 · 0 评论