登录过滤器的问题
在WEB.XML中配置好了,没有任何问题,以下是代码 <filter> <filter-name>checkLogon</filter-name> <filter-class> desoft.util.CheckLogon</filter-class> </filter> <filter-mapping> <filter-name>checkLogon</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter> <filter-name>CharactorEncocedingFilter</filter-name> <filter-class> desoft.util.CharactorEncocedingFilter </filter-class> <init-param>encoding UTF-8 </init-param> </filter> 但是在.JAVA文件中老师说少了个参数,每次SESSION 结束后,在刷新时,登陆界面就只会出现在 mainFrame中,才用的是 3栏式的FRAME结构,请高手看看少 了个什么参数,以下是过滤类源代码: public class CheckLogon implements Filter { protected FilterConfig filterConfig; public void destroy() { lterConfig=null; } public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest)servletRequest; HttpServletResponse response = (HttpServletResponse)servletResponse; UserinformationVO uservo = (UserinformationVO) tSession().getAttribute("users"); intln(uservo); boolean requestLoginAction=false; if( tRequestURI().endsWith(" ")){ String query = tQueryString(); if( dexOf(" ")!=-1){ requestLoginAction=true; } } if( tRequestURI().endsWith(" ml")|| tRequestURI().endsWith("adminlogin.jsp")|| tRequestURI().endsWith(".gif")|| tRequestURI().endsWith(".jpg")||requestLoginAction){ Filter(servletRequest, servletResponse); return; } if(uservo==null){ intln("uservo==null"); ndRedirect( tContextPath()+"/ ml"); return ; } Filter(servletRequest, servletResponse); } public void init(FilterConfig config) throws ServletException { lterConfig = config; intln("Check Logon is initing......."); } }
这个东西很会把英文字母打错,再检查一下!!
回不回是系统的事情
答:google "java 缓冲池"详情>>
答:百度里搜张孝祥 非常好的视频教程详情>>