Hi,
I have the following filter:
/**
* filters parameters: ContentType and expires.
*/
public void doFilter(ServletRequest req, ServletResponse resp,
FilterChain chain) throws IOException, ServletException {
if (filterConfig == null)
return;
System.out.print(req.getCharacterEncoding());
System.out.print(req.getContentLength());
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) resp;
System.out.print(request.getCharacterEncoding());
System.out.print(response .getContentLength());
in both prints I get:
NULL
-1
I am sending a jps page.
What could be the problem?