会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
smilelily126
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
下一页
2016年7月27日
Struts2 INPUT的代码演示
摘要: login.jsp 引入标签<%@ taglib prefix="s" uri="/struts-tags" %><s:fielderror name="username"></s:fielderror> LoginAction.java this.addFieldError("username",
阅读全文
posted @ 2016-07-27 09:59 smilelily126
阅读(389)
评论(0)
推荐(0)
编辑
2016年7月26日
Struts2接受参数
摘要: 使用Action的属性接收参数 访问地址:http://localhost:8080/HelloWord/login.jsp login.jsp LoginAction.java web.xml struts.xml 使用DomainModel接收参数 访问地址:http://localhost:8
阅读全文
posted @ 2016-07-26 16:41 smilelily126
阅读(149)
评论(0)
推荐(0)
编辑
2016年7月25日
Struts2后缀
摘要: Struts2后缀, 1、struts.xml,其中value可变。 访问路径:http://localhost:8080/HelloWord/helloword_add.html 2、web.xml,其中<param-value>html</param-value>值可变。 访问路径:http:/
阅读全文
posted @ 2016-07-25 17:24 smilelily126
阅读(117)
评论(0)
推荐(0)
编辑
Struts2默认Action
摘要: 默认Action,所有未找到路径显示error.jsp页面。 <default-action-ref name="index"></default-action-ref><action name="index"> <result>/error.jsp</result></action> struts
阅读全文
posted @ 2016-07-25 17:10 smilelily126
阅读(185)
评论(0)
推荐(0)
编辑
Struts2指定多个配置文件
摘要: 指定多个配置文件<include file="***.xml"></include> struts.xml helloword.xml
阅读全文
posted @ 2016-07-25 16:54 smilelily126
阅读(153)
评论(0)
推荐(0)
编辑
Struts2动态方法调用
摘要: 动态方法调用就是为了解决一个Action对应多个请求的处理,以免Action太多。 1、指定method属性 struts.xml 访问路径: http://localhost:8080/HelloWord/addAction.action http://localhost:8080/HelloWo
阅读全文
posted @ 2016-07-25 16:30 smilelily126
阅读(139)
评论(0)
推荐(0)
编辑
Struts2中Action搜索顺序
摘要: Action搜索顺序http://localhost:8080/struts2(项目名)/path1/path2/path3/helloword.action根据struts.xml文件进行判断第一步:判断package是否存在,如:path1/path2/path3/ 存在:第二步:判断acito
阅读全文
posted @ 2016-07-25 16:26 smilelily126
阅读(260)
评论(0)
推荐(0)
编辑
Struts2访问Servlet API
摘要: 访问Servlet API,Struts2提供了三种方式去访问Servlet API。ActionContext实现***Aware接口ServletActionContext
阅读全文
posted @ 2016-07-25 16:25 smilelily126
阅读(104)
评论(0)
推荐(0)
编辑
Struts2核心文件
摘要: web.xml 任何MVC框架都需要与Web应用整合,这就得借助于web.xml文件,只有配置在web.xml文件中Servlet才会被应用加载。通常,所有的MVC框架都需要Web应用加载一个核心控制器,对于struts2框架而言,需要加载StrutsPrepareAndExecuteFilter,
阅读全文
posted @ 2016-07-25 15:34 smilelily126
阅读(137)
评论(0)
推荐(0)
编辑
Struts2搭建demo
摘要: 以struts-2.3.24为例。 搭建Struts2环境步骤: 1、下载相关jar包 Apache Struts官方网站 http://struts.apache.org/、http://people.apache.org/builds/struts/ struts-2.5.2\apps :样例包
阅读全文
posted @ 2016-07-25 10:46 smilelily126
阅读(152)
评论(0)
推荐(0)
编辑
上一页
1
2
3
下一页
公告