首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

过滤器重定向有关问题,

2013-01-05 
过滤器重定向问题,急急急急急。。。。if ((a.indexOf(path_1) ! -1)true) {System.out.println(trtruetrue

过滤器重定向问题,急急急急急。。。。
if ((a.indexOf(path_1) != -1)==true) {
System.out.println("trtruetruetruetruetruetruetruetruetruetrueue");
chain.doFilter(request, response);
}else{
System.out.println("falsefalsefalsefalsefalsefalsefalsefalse");
httpResponse.sendRedirect(location);
}

为什么我的重定向不跳转,如果我放到true就可以跳,怎么办啊?解决全给分吧
[解决办法]
不跳转是什么情景?没报错?没提升机? 没任何反应? location是神马东西
[解决办法]
if ((a.indexOf(path_1) != -1)==true) {
System.out.println("trtruetruetruetruetruetruetruetruetruetrueue");
chain.doFilter(request, response);
}else{
System.out.println("falsefalsefalsefalsefalsefalsefalsefalse");
httpResponse.sendRedirect(location);
}
你的意思是页面上打印出来的是trtruetruetruetruetruetruetruetruetruetrueue么?
那就是执行了第一个方法呗。
如果打印falsefalsefalsefalsefalsefalsefalsefalse还没有跳转,那就是你的xml没有配置上相应的路径。

热点排行