Struts2自定义类型转换: 从前台接受到的类型全部是字符串,Struts2自带的一些基本类型转换有时不能满足我们的特别需要,如:日期字符串输入格式,还有一些自定义的类,直接传到后台,我们需要一些自己的转换器: 例: 我有一个Point类型: package cn.jnit.bean; public class Point { private Integer x; private Integer y; public Point() { } public Point(Integer x, Int…
1.在Struts2自定义拦截器有三种方式: -->实现Interceptor接口 public class QLInterceptorAction implements Interceptor{ private static final long serialVersionUID = 1L; public void destroy() { } public void init() {} public String intercept(ActionInvocation arg0) throws…