|
楼主 |
发表于 2020-5-26 13:53:02
|
显示全部楼层
平台默认的过滤是全过滤,7楼的链接是要创建不需要过滤的地址,所以这个没有参考意义;
9楼的我也试过,不管是pc3还是pc,错误都是一样的。提示是找不到pc3下的undefined/default.html,这个不管是pc还是pc3下都没有这个地址的。
我说了,通过反编译jar包,问题就在这段内容,第69行就是最后一行代码- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
- String targetUrl;
- HttpServletRequest req = (HttpServletRequest) request;
- HttpServletResponse res = (HttpServletResponse) response;
- HttpSession session = req.getSession();
- String username = "system";
- if (session != null) {
- // String username = AssertionHolder.getAssertion().getPrincipal().getName();
- System.out.println("!!!!!!!!!!!!!!!!!!!!!!."+username);
- if (SystemUtils.isNotEmptyString(username)) {
- String bsessionid = getBSessionID(req, username);
- String url = NetUtils.getRequestPath(req);
- if (this.urlMapping.containsKey(url) && !"true".equals(new StringBuilder(String.valueOf(req.getParameter("_login"))).toString()) && SystemUtils.isEmptyString(req.getParameter("$pageType"))) {
- String targetUrl2 = String.valueOf(req.getContextPath()) + this.urlMapping.get(url);
- if (targetUrl2.contains("?")) {
- targetUrl = String.valueOf(targetUrl2) + "&bsessionid=" + bsessionid + "&_login=true";
- } else {
- targetUrl = String.valueOf(targetUrl2) + "?bsessionid=" + bsessionid + "&_login=true";
- }
- Cookie cookie = new Cookie(BSESSIONID, bsessionid);
- cookie.setPath("/");
- res.addCookie(cookie);
- res.sendRedirect(targetUrl);
- return;
- }
- }
- }
- chain.doFilter(req, res);
- }
复制代码
|
|