本帖最后由 Octavus 于 2013-09-11 10:53:49 编辑

解决方案 »

  1.   

    那么请问如何手动返回404错误?
    response.sendError(response.SC_NOT_FOUND);
      

  2.   

      PrintWriter pw= response.getWriter();  
          response.setContentType("text/html;charset=gb2312  ");
          pw.write("靠,文件没有了你赶紧找老板去吧!");
          pw.close();
      

  3.   

    有更牛逼的处理方式吗?比如什么东西都不返回。
    其实我主要想知道servlet不同的返回方式对浏览器页面的影响。
    正常下载时,比如点A页面的某个下载按钮,然后弹出一下载框,对页面没有任何影响。
    我想知道有没有其他非跳转的方式