response.getWriter()
.print(   "<script language=javaScript> alert(\"您已经购买!\");window.location=\"/bookshop/cart.do?method=SearchOrDown&idd=" +request.getParameter("id")+"&standanid="+request.getParameter("id").trim()+"\" </script>");
            return null;我想要在ACTION里写个带提示信息跳转,出现404
return new ActionForward  就好使。  希望有人能解答

解决方案 »

  1.   

    为什么不用
    return mapping.findForward("anywhere");这样也能控制一下转向
      

  2.   

    ajiax已经跳出方法 下面的return 你还要跳  你想想可以吗?????
      

  3.   

    你试一下return mapping.findForward(""); 因该就不用return new ActionForward;
    我们都用一个""我想这里是不是因为response.getWriter() .print("")只是写脚本try {
    hyddbiz.delHyddByIDInBiz(listId);
    out.print("<script>alert('删除成功!!');</script>");
    } catch (Exception e) {
    out.print("<script>alert('删除失败!!');</script>");
    e.printStackTrace();
    }
    response.sendRedirect("hyAction.do?operate=hyddPageList");
    return null;这样可以返回为空