ITeye博客

struts

共 10 篇文章

修复struts严重漏洞:升级struts2.2到 struts2.3.1

为什么要修复请看新闻: http://www.iteye.com/news/28053 简单测试你的action地址: http://www.yourdomian.com/test.action?redirect:http://www.baidu.com 是否跳转到百度 修复struts严重漏洞:升级struts2.2到 struts2.3.1 需要升级以下包: struts2-core-2.3.15.1.jar struts2-spring-plugin-2.3.15.1.jar xwork-core-2.3.15.1.jar commons-lang3-3.1.jar ognl-3.0.…

2013-07-19 12:39 · struts · Struts · 漏洞

session失效通过头信息判断跳转

/** * 拦截用户是否登录跳转到登录页 * 页面请求和ajax异步请求都能跳转 */ @Component public class SessionInterceptor extends AbstractInterceptor { private static String APPLICATION_JSON = "application/json"; private static String SESSION_DESTROYED = "{\"destroyed\":true}"; private static final Log logger = LogFactory.getLog(Ses…

2013-03-13 18:06 · JAVA · struts · Ajax · jQuery

Struts2 DateTypeConverter转换类

package com.msd.payCenter.web.converter; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import org.apache.commons.lang.StringUtils; import com.msd.payCenter.commons.util.RegexUtil…

2012-09-07 14:44 · struts · Struts2 · DateTypeConverter

解决使用jquery.form ajaxSubmit文件上传,返回中文乱码问题

使用jquery.form ajaxSubmit文件上传,遇到一个很奇怪的问题,chrome浏览器、firefox浏览器都表现正常,就部分同事IE8浏览器出现乱码。 后台代码检查了一下与前几个项目都一样,调试了一下最后response.write 出来的时候中文显示也是正常。 按照网上的说法:文件格式UTF-8、过滤器也是UTF-8格式过滤 jsp也加上了以下代码: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <html> <head> <meta http-e…

2012-07-26 14:52 · struts · Web · Web · 乱码

Struts2极速表单验证框架(注解)

项目介绍 Struts 2 极速表单验证框架 最快速的后台表单验证框架 简洁,快速的验证语法 无需编写验证提示信息 错误消息在指定地方显示 支持组合验证 易于扩展 基于标准的Java Annotaction添加验证,易于和现有项目的无缝集成 特殊应用场景支持,如:密码确认,结束日期必须大于开始日期 支持前后台一致的验证规则 下载地址: https://code.google.com/p/struts-plus/downloads/list 作者:刘长炯 beansoft http://www.beansoft.biz/ 为什么使用此框架 一直都在寻找一个简单、好用的Struts2后台验证框,…

2012-07-19 17:19 · struts · Struts2 · quickValidation · struts验证框架

Struts2 Error setting expression xxxxx with value

WARNING: [51:05.968] Error setting expression 'XXXXX' with value '[Ljava.lang.String;XXXX' 请求参数名称写错或Action对应的参数没写setter方法

2012-01-12 16:55 · struts · Struts2 · error

Struts2 与 Velocity 实例

Struts2 与 Velocity 实例 测试路径: http://localhost:port/Velocity http://localhost:port/Velocity/list.ohtml

2012-01-09 12:16 · struts · Struts2 · velocity

Open quote is expected for attribute "{1}" associated with an element type

Open quote is expected for attribute "{1}" associated with an element type "class". at (null:20:10) 细一看发现 配置文件属性少写了双引号

2011-09-20 18:10 · struts · struts2.0

推荐Struts2资料

Struts2专栏: 一步一步跟我学Struts2专栏 摘: 《MVC with Webwork2 – Xwork 》—— potian著 《MVC with Webwork2 – Xwork _下载》 这是一本专门讲解Xwork的电子书,作者是 potian 。关于potian不用费更多口舌去介绍了。这本书对于Xwork讲解之深入要远远超过Xwork自己的文档,特别是Xwork的核心功能OGNL部分的讲解是独一无二的,强烈推荐! 这本书写作的时候是针对Webwork2的,尽管现在Struts2已经取代Webwork2,但是Struts2的核心仍然是Xwork,因此这本书的价值并没有任何的降…

2011-05-15 15:59 · struts · MVC · Webwork

Struts配置连接池错误解决问题及实例

http://hi.baidu.com/dburu/blog/item/55a32e0196a5dd0e7bec2c81.html 1、Cannot create JDBC driver of class '' for connect URL '' 问题:找不到jdbc驱动,但是提示信息里的class值为null,所以,可以断定Tomcat没有找到Server.xml里的Resource配置信息。 可能的原因包括:(1)没有配置Resource;(2)Resource配置信息放置的位置错误。(3)一个不容易发现的错误,driverClassName和url拼写错误。解决办法:确认Resour…

2009-01-27 22:11 · struts · SQL Server · Struts · SQL · 配置管理 · Tomcat