struts2
冰玉翔龙
这个作者很懒,什么都没留下…
展开
-
页面设置List<User>参数及后台获取
页面代码:[code="html"]Insert title here 姓名: 年龄: 姓名: 年龄: [/code]action代码:[code="java"]public class ListDemoAction extends ActionSupport { private static fina...原创 2012-12-11 14:33:35 · 311 阅读 · 0 评论 -
struts2 自定义身份证验证器
struts2的验证器是用的xwork里面的验证,自定义验证器就是根据源码继承已有的字段验证器而来。具体步骤如下:1.展开xwork-2.0.4.jar,com.opensymphony.xwork2.validator.validators目录下有个default.xml,将它复制到项目根目录下改名叫validators.xml。验证框架首先在根目录下找validators.xml文件,...原创 2012-09-08 18:47:03 · 81 阅读 · 0 评论 -
struts2异步访问
一、编写异步Action代码[code="java"]/** * Ajax1Action.java * action * Function: TODO * * version date author * ────────────────────────────────── * 1.0 2013-9-21 songjy * * ...原创 2013-09-21 17:18:04 · 124 阅读 · 0 评论 -
struts2-json-plugin插件的使用
一、编写Action类[code="java"]/** * AjaxJsonAction.java * action * Function: TODO * * version date author * ────────────────────────────────── * 1.0 2013-9-21 songjy * * ...原创 2013-09-21 19:44:22 · 115 阅读 · 0 评论 -
struts2传递参数时造成的404问题记录
今天使用form表单提交数据时提示404错误,但当我直接在浏览器中输入URL链接时,可以正常访问,这有点邪门啊!后来发现是传递的参数问题,如下:[code="html"][/code]修改后如下:[code="html"][/code]怀疑是参数格式问题,造成struts2解析参数出错,本应提示参数格式有误等类型错误,但struts2却提示404错误!...原创 2015-06-29 20:44:45 · 567 阅读 · 0 评论 -
getOutputStream() has already been called for this response
错误信息:[color=red]SEVERE: Servlet.service() for servlet jsp threw exceptionjava.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.conne...原创 2015-07-24 09:55:02 · 273 阅读 · 0 评论