String url="/myapps/shop/eshop.jsp";
可能是你的路径错了。好看看自己的路径。

解决方案 »

  1.   

    "../shop/error.jsp"改为"./shop/error.jsp"试试看
      

  2.   

    response.sendRedirect(url);
    试试看
      

  3.   

    String url="/myapps/shop/eshop.jsp";改为String url="/shop/eshop.jsp";
      

  4.   

    url="shop/eshop.jsp";肯定是路径写错了!
      

  5.   

    没有写错啊!
    我用response.sendRedirect("/myapps/shop/eshop.jsp");
    就可以的!但我现在一定要用ServletContext sc=getServletContext();
    RequestDispatcher rd=sc.getRequestDispatcher(url);rd.forward(req,res);该如何做?
      

  6.   

    url改成:String url="/shop/eshop.jsp";
    转向代码改成如下:
    ServletContext sc=this.getServletContext();
    RequestDispatcher rd=sc.getRequestDispatcher(url);
    rd.forward(req,res);
      

  7.   

    其实以后出现这种错误的时候,看看你的IE地址栏显示的路径你就马上可以发现错在那里了。PS:你的文件存在吗?