
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 · 141 阅读 · 0 评论 -
编辑Struts配置的时候报错? Eclipse没有提示?
因为Eclipse不知道Struts DTD 文件,所以没有提示,可以手动为Eclipse添加DTD文件首先在下载的struts2 包中查找 *.dtd 就可以找到了 然后在eclipse中点击window->preference->在左上角输入xml->选中XML Catalog-> 点击右边的Add 接下来选中你...2011-04-16 19:17:13 · 116 阅读 · 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 · 141 阅读 · 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 · 155 阅读 · 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 · 140 阅读 · 0 评论 -
为Action属性注入值
当一些属性不适合固定的写入时适合使用这种方式。要为某一个属性提供set方法,如果需要使用则同样要提供get方法。 public class HelloWorldAction{ private String savePath; public void setSavePath(String savePath){ this.savePath = savePath; }...2011-04-16 19:35:44 · 132 阅读 · 0 评论