目前 就是前台页面一个按钮,点击按钮 直接在客户端打开服务端的文件,不要弹出选择框。可以在浏览器上设置,但不能要求客户也设置吧。求 后台代码或者前台代码。插件也可以

解决方案 »

  1.   

    这是客户端浏览器决定的
    如果本地没安装adobe reader就无法打开PDF,这时候只能下载或保存吧
      

  2.   

    客户那都安装了 。window.open("");不知道 这个服务端地址怎么写。还要可能组长也不叫这样写。她要求直接打开。
      

  3.   

    我是13版本的,碰到pdf直接都是打开。然后在上面另存为就可以保存了这个特性也是后来的版本才有的,忘记从哪个版本开始了
      

  4.   

    是要直接点连接才行,后缀是.pdf
      

  5.   

    分享一下 就改了几个参数 
    /**
     * 用户打开帮助文档
     */
    public void openHelp() throws Exception{
    HttpServletResponse response = Struts2Utils.getResponse();
    String fileName = "文档管理系统使用文档.pdf"; //帮助文档路径
    String suffix = ZbwtStringUtil.substringAfterLast(fileName, ".");
    if (suffix != null) {
    response.setHeader("Content-Type", ZbwtXmlUtil
    .findContentTypeBySuffix(suffix));
    } else {
    response.setHeader("Content-Type", "application/vnd.ms-pdf");
    }
    InputStream bais = null;
    OutputStream os = null;
    bais = new FileInputStream("D:\\encrypt"
    + "/" + "文档管理系统使用文档.pdf");
    os = response.getOutputStream();
    byte bytes[] = new byte[1024];
    int i = 0;
    while ((i = bais.read(bytes)) != -1) {
    os.write(bytes, 0, i);
    }
    if (os != null) {
    os.close();
    }
    if (bais != null) {
    bais.close();
    }
    }前台提交地址 用 window.open("");