摘要:
在拦截器中可以三种实现一:继承 AbstractInterceptor 类二:继承MethodFilterInterceptor类三:实现Interceptor 接口在实现Interceptor接口时,会多出init() 和 destroy() 方法拦截器的主体方法是:public String intercept(ActionInvocation arg0) throws Exception {// TODO Auto-generated method stubHttpServletRequest request = ServletActionContext.getRequest(); i. 阅读全文
摘要:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>告诉浏览器当前页的编码格式,包括发送的数据格式和接收的数据格式,pageEncoding指定jsp的编写时的编码格式contentType指定最终浏览器上的显示数据编码格式请求为post时req.setCharacterEncoding("utf-8"); resp.setCharacterEncoding("utf-8&q 阅读全文