ssm框架项目一配置web.xml中的listener就报404,注释掉监听器就可以出来初始页面,错误信息如下:
[。img=https://img-bbs.csdn.net/upload/201904/15/1555313650_399709.jpg][/img]
求助。

解决方案 »

  1.   

    你的信息太少,他人无法判断错误,把web.xml 以及其他配置文件贴下,好分析问题.
      

  2.   

    在拦截器中
      //访问login.jsp时,才放过,并且login.jsp的后续操作,继续执行,不拦截
            if (servletPath.equals("你的初始页")) {
                chain.doFilter(req, res);
                return;
    }else {
    Object s=request.getSession().getAttribute("name");
    if(s!=null){
     chain.doFilter(req, res);
     return;
    }else{
    String contextPath=request.getContextPath();
              response.setCharacterEncoding("utf-8");
        request.setCharacterEncoding("utf-8");
    response.setContentType("text/html");
    PrintWriter pw = response.getWriter();
    //否则拦截,跳转指定的页面


    pw.print("<script>window.top.location.href='"+contextPath + "指定的页面链接"+";</script>");
      

  3.   

    看一下你的web.xml是怎么写的