java filter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
// TODO Auto-generated method stub
// place your code here
//System.out.println("testfilter");
System.out.println(request.getCharacterEncoding());
System.out.println(request.getContentLength());
System.out.println(request.getContentType());
System.out.println(request.getLocalAddr());
System.out.println(request.getLocalName());
System.out.println(request.getLocalPort());
System.out.println(request.getProtocol());
System.out.println(request.getRemoteAddr());
System.out.println(request.getRemoteHost());
System.out.println(request.getRemotePort());
System.out.println(request.getScheme());
System.out.println(request.getServerName());
System.out.println(request.getServerPort());
System.out.println(request.getAsyncContext());
System.out.println(request.getAttributeNames());
System.out.println(request.getDispatcherType());
System.out.println(request.getInputStream());
System.out.println(request.getLocale());
System.out.println(request.getLocales());
System.out.println(request.getParameterMap());
System.out.println(request.getParameterNames());
System.out.println(request.getServletContext());
// pass the request along the filter chain
chain.doFilter(request, response);
}
----
null
-1
null
140.1.1.1
140.1.1.1
80
HTTP/1.1
111.1.1.1
111.1.1.1
53313
http
140.1.1.1
80
null
java.util.Collections$2@21caf0b6
REQUEST
org.apache.catalina.connector.CoyoteInputStream@a2c31a1
zh_TW
java.util.Collections$2@12814e0f
{}
java.util.Collections$2@672bc446
org.apache.catalina.core.ApplicationContextFacade@6a630494
// TODO Auto-generated method stub
// place your code here
//System.out.println("testfilter");
System.out.println(request.getCharacterEncoding());
System.out.println(request.getContentLength());
System.out.println(request.getContentType());
System.out.println(request.getLocalAddr());
System.out.println(request.getLocalName());
System.out.println(request.getLocalPort());
System.out.println(request.getProtocol());
System.out.println(request.getRemoteAddr());
System.out.println(request.getRemoteHost());
System.out.println(request.getRemotePort());
System.out.println(request.getScheme());
System.out.println(request.getServerName());
System.out.println(request.getServerPort());
System.out.println(request.getAsyncContext());
System.out.println(request.getAttributeNames());
System.out.println(request.getDispatcherType());
System.out.println(request.getInputStream());
System.out.println(request.getLocale());
System.out.println(request.getLocales());
System.out.println(request.getParameterMap());
System.out.println(request.getParameterNames());
System.out.println(request.getServletContext());
// pass the request along the filter chain
chain.doFilter(request, response);
}
----
null
-1
null
140.1.1.1
140.1.1.1
80
HTTP/1.1
111.1.1.1
111.1.1.1
53313
http
140.1.1.1
80
null
java.util.Collections$2@21caf0b6
REQUEST
org.apache.catalina.connector.CoyoteInputStream@a2c31a1
zh_TW
java.util.Collections$2@12814e0f
{}
java.util.Collections$2@672bc446
org.apache.catalina.core.ApplicationContextFacade@6a630494
留言
張貼留言