rss· 投稿· 设为首页· 加入收藏· 繁體版
当前位置: 火魔网 » 程序开发 » Struts

使用struts的同步令牌避免form的重复提交

  一、使用方法1、 假如你要提交的页面为toSubmit.jsp;2、 在打开toSubmit.jsp的Action1中加入:saveToken(request),例如public ActionForwardexecute(   ActionMapping mapping,   ActionForm form,   HttpServletRequest request,   HttpServletResponse response)   throws Except... « 阅读全文

发布于: 2011-12-21 13:01:05

struts2为Action配置method属性

  3.2.    为Action配置method属性:将Action类中的每一个处理方法都定义成一个逻辑Action方法。<!DOCTYPE struts PUBLIC       "-//ApacheSoftware Foundation//DTD Struts Configuration 2.0//EN"       "http://struts.apache.org/dtds/struts-2.0.dtd"><struts>    <packa... « 阅读全文

发布于: 2011-12-16 11:56:44

简单理解Struts2中拦截器与过滤器的区别及执行顺序(图)

  struts2体系结构图:当接收到一个httprequest , a) 当外部的httpservletrequest到来时 b) 初始到了servlet容器 传递给一个标准的过滤器链 c)FilterDispatecher会去查找相应的ActionMapper,如果找到了相应的ActionMapper它将会将控制权限交给ActionProxy d)ActionProxy将会通过ConfigurationManager来查找配置struts.xml       i. 下一步将会... « 阅读全文

发布于: 2011-12-15 13:34:25

Struts2.2.3中Auto Completer tag

  In this section, we are going to describe theautocompleter tag. The autocompleter tag always displays a dropdownlist with the options that have at least a partial match withentered text in the textbox.Auto Completer ExampleIn this section, we ar... « 阅读全文

发布于: 2011-12-14 11:58:03

struts2 标签 s:iterator的使用

  struts2的s:iterator 可以遍历 数据栈里面的任何数组,集合等等 以下几个简单的demo: s:iterator 标签有3个属性:     value:被迭代的集合     id   :指定集合里面的元素的id     status 迭代元素的索引 1:jsp页面定义元素写法 数组或list    1. <s:iterator value="{'1','2','3','4','5'}" id='number'>    2.     <s:proper... « 阅读全文

发布于: 2011-12-10 08:14:33

OGNL表达式语言和struts标签

  原文:http://blog.csdn.net/feilong1105/article/details/64305991、OGNL表达式语言OGNL是ObjectGraphic Navigation Language(对象图导航语言)的缩写,它是一个开源项目。Struts 2框架使用OGNL作为默认的表达式语言。相对EL表达式,它提供了平时我们需要的一些功能,如:l      支持对象方法调用,如xxx.sayHello();l      支持类静态方法调用和值访问,表... « 阅读全文

发布于: 2011-12-09 10:47:05

Struts2中json插件配置

  1、更改继承的类,注json-default继承自struts-default <package name="default" extends="json-default">  2、action中的配置 <action name="testAction" class="com.json.action.TestAction" >   < xmlnamespace prefix ="v" ns ="urn:schemas-microsoft-com:vml... « 阅读全文

发布于: 2011-12-09 09:53:04

Struts常见异常信息和解决方法

  以下所说的struts-config.xml和ApplicationResources.properties等文件名是缺省时使用的,如果你使用了多模块,或指定了不同的资源文件名称,这些名字要做相应的修改。1、“NobeanfoundunderattributekeyXXX”在struts-confi... « 阅读全文

发布于: 2011-12-09 07:13:52

struts2环境搭建

    总结一点:无论使用什么框架,总有一点,保证访问网页速度快     struts2是在webwork2基础上研发过来,与struts1一样,struts2而是mvc构架,虽然名字相差不大,但是struts2与struts1编码格式基本不一样。   1>struts2不依赖于servletap... « 阅读全文

发布于: 2011-12-08 12:23:09

struts2 的struts.xml详细说明 (2011-11-30

  <package name="userInfo" namespace="/test"extends="struts-default">        <action name="helloworld"class="cn.userInfo.action.helloworldAction"method="execute">             <resultname="success">/WEB-INF/page/hello.jsp</r... « 阅读全文

发布于: 2011-12-08 09:18:57