
Struts
zq8465
活泼,善良
展开
-
Struts2 自定义标签
在用struts2写自定义标签时遇到了一些问题,说了一个多小时解决了,嗯就在这里做个备忘吧! (第一次写,,呵呵,有点怕出错,如果说的不好大家不要笑..呵呵) 说明一下我的环境:eclipse+tomcat 自定义标签编写分为以下几步: 1.编写UIBean: Java代码 @StrutsTag(description = "my ema转载 2012-03-30 15:58:56 · 372 阅读 · 0 评论 -
struts2.0 标签+ftl标签
直接调用后台方法代码 默认两种用法 ${!("")} ${default("")} getPieceByType为方法名,type为值 Ftl代码 默认两种用法 ${!("")} ${default("")} 默认两种用法 ${!("")} ${default("")} getPieceByType为方法名,type为值转载 2012-03-31 14:44:51 · 511 阅读 · 0 评论 -
Spring如何与struts2结合
1. Struts2的action由Spring来负责进行实例化 Struts.xml value="name"/> 2. 项目启动时由装载Spring Web.xml org.springframework.web.context.ContextLoaderListener转载 2012-03-31 10:28:01 · 287 阅读 · 0 评论 -
struts.xml 中配置常量constant详解
一、配置: 在struts2中配置常量的方式有三种: 在struts.xml文件中配置 在web.xml文件中配置 在sturts.propreties文件中配置 1.之所以使用struts.propreties文件配置,是因为为了保持与WebWork的向后兼容 2.在实际开发中,在web.xml中配置常量相比其他两种,需要更多的代码量,会降低了web.xml的可读性 3.转载 2012-03-31 10:37:31 · 953 阅读 · 1 评论 -
struts2教程- Interceptor(默认拦截器)介绍
Interceptor(拦截器)将Action共用的行为独立出来,在Action执行前后运行。这也就是我们所说的AOP(Aspect Oriented Programming,面向切面编程),它是分散关注的编程方法,它将通用需求功能从不相关类之中分离出来;同时,能够使得很多类共享一个行为,一旦行为发生变化,不必修改很多类,只要修改这个行为就可以。 Interceptor将很多功能从我们转载 2012-04-01 10:51:59 · 358 阅读 · 0 评论 -
struts2 跳转类型 result type=chain、dispatcher、redirect(redirect-action)
dispatcher 为默认跳转类型,用于返回一个视图资源(如:jsp) Xml代码 : /main.jsp /main.jsp 以上写法使用了两个默认,其完整的写法为: /maini.jsp 用于页面转发,页面跳转过程一直是同一个线程,Action中的数据一直保存在。 location只能是页面,不能是另一个action(可用type="ch转载 2012-04-01 10:41:36 · 424 阅读 · 0 评论 -
Struts2框架web.xml的<filter-class>,FilterDispatcher和StrutsPrepareAndExecuteFilter
struts2 org.apache.struts2.dispatcher.FilterDispatcher action2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter FilterDispatcher是早期struts2的过滤器,后期的都用StrutsPrepare转载 2012-04-01 11:03:00 · 692 阅读 · 0 评论