1, JSP code
String chart1URL=c. akeSession (request, "chart1");
2, the filter
Public void doFilter (ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
It the req=(it) request;
HttpServletResponse resp=(HttpServletResponse) response;
The HttpSession session.=the req getSession (true);
Resp. SetContentType (" text/HTML ");
Resp. SetCharacterEncoding (" utf-8 ");
PrintWriter out=resp. GetWriter ();
String request_uri=the req. GetRequestURI ();
String ctxPath=the req. GetContextPath ();
String uri=request_uri. Substring (ctxPath. Length ());
If (uri. The contains (" Login. JSP ") | | uri. The contains (" Login ") | | uri. The contains (" getchart ") | | uri. The contains (" PNG ") | | uri. The contains (" JPG ") | | uri. The contains (" CSS ") | | uri. The contains (" js ") | | uri. The contains (" testchart. JSP ")) {
Chain. DoFilter (request, response);
} else {
if(null !=session. The getAttribute (" user ")) {
Chain. DoFilter (request, response);
} else {
Out.println (" you have not login, please login first! Return to the login page after 3 seconds, ");
Resp. SetHeader (" refresh ", "3; Url="+ ctxPath +"/Login JSP ");
return;
}
}
}
3, the problem
Report without filter shows normal, filters, pictures don't show,
[to solve, looking forward to the great god reply!!!]