
Struts2
文章平均质量分 59
chenzhongwei99
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Struts2 配置文件提示
原创 2012-12-04 09:01:12 · 305 阅读 · 0 评论 -
Struts2 OGNL
jsp: 访问值栈中的action的普通属性: 访问值栈中PO.User里的普通属性(get set方法): 访问值栈中cat里的dog里的属性(get set方法): 访问值栈中action的普通方法: 访问值栈中字段的普通方法: 访问值栈中cat里的普通方法: 访问静态方法:原创 2012-12-11 11:31:58 · 326 阅读 · 0 评论 -
Global Result 动态结果集 和 传参结果集
jsp:type:1type=1type:2type=2其他其他 action:public class GlobalResults extends ActionSupport{ private int Type; private String jsp; @Override public String execute() throws Excepti原创 2012-12-07 15:23:04 · 603 阅读 · 0 评论 -
Struts2 默认Action
/Default.jsp 通过以上配置就可以实现默认Aciton. 但是当struts.xml配置里有: /{1}.jsp 就会报错,如果是这种通配符不影响默认Action的配置. /Person.j原创 2012-12-07 11:44:47 · 333 阅读 · 0 评论 -
Struts2 中文乱码问题
我现在使用的是2.1.6的版本正常来说在struts.xml里添加 i18n 这句话就OK了。但是通过网上查询,目前是个BUG。说是下个版本才更正. 因此,我在web.xml里做了修改.把2.1.6的fiter-class注释掉,更改为2.0版本的fiter-class,就可以避免中文乱码的问题.但是不知道会不会引起其他问题. str原创 2012-12-06 15:01:46 · 308 阅读 · 0 评论 -
Struts2 接受参数方法
jsp: 账号: 密码: acceptparameter';document.f.submit()"/>原创 2012-12-06 14:45:14 · 406 阅读 · 0 评论 -
Struts2 Result Type
/dispatcher.jsp /redirect.jsp redirect action跳转到另一个aci原创 2012-12-07 14:52:27 · 269 阅读 · 0 评论 -
Struts2工作流程
1.用户提交请求.2.服务器接受请求进行处理.3.找到web.xml.4.在web.xml里找到Filter.5.读取struts.xml.6.找到相应的action进行处理,跳转页面.原创 2012-12-05 08:15:01 · 273 阅读 · 0 评论 -
Struts2 action定义和通配符定义
1.用'!'来定义方法 jsp: add!add.action>用!来调用add方法 action: public String add() throws Exception { return SUCCESS; } struts.xml:原创 2012-12-05 11:16:56 · 681 阅读 · 0 评论 -
Struts2直接跳转到web.xml里的默认路径
如果在浏览器里直接输入项目名:http://localhost:8080/Struts2Action01/那么不会在struts.xml里找到相应的action,所以又跳回到web.xml里找到默认的路径(Index.jsp)。原创 2012-12-05 08:20:12 · 918 阅读 · 1 评论 -
Struts2的jsp和action路径解决方案
Index.jsp: String path = request.getContextPath(); //jsp配置绝对路径(如果不是在跟目录下可以在'/'后面添加你的文件夹名称)String jspPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+p原创 2012-12-05 08:58:46 · 2375 阅读 · 0 评论 -
Strtus2 配置
Strtus2 Jar 包: Strtus.xml: Struts2的web.xml:原创 2012-12-04 08:51:57 · 329 阅读 · 0 评论