gzgz
what is Formula One for Java 8.0  ??

解决方案 »

  1.   

    Formula One for Java ,提供了JAVA调用Excel的接口,该问题的重点在于,SSL中好像无法调出嵌入在HTML中的其他文件格式(如:"application/vnd.ms-excel");
      

  2.   

    If you are running a standalone application, or want to use SSL over your own sockets and avoid using URL or URLConnection, then you need to obtain an implementation of the Java Secure Socket Extension, or JSSE. Sun provides a reference implementation of JSSE, along with sample programs, which you can download from http://java.sun.com/products/jsse/. It comes in both a "domestic version" (US/Canada) and an "export version" (all other countries). 
      

  3.   

    import javax.net.ssl.*;
    import java.io.*;
    import java.net.*;
    import java.security.*;public class SSLSocketClient {  public static void main(String args[]) throws Exception {    String urlString = (args.length == 1) ? 
          args[0] : "http://www.verisign.com/index.html";
        URL url = new URL(urlString);    Security.addProvider(
          new com.sun.net.ssl.internal.ssl.Provider());    SSLSocketFactory factory = 
          (SSLSocketFactory)SSLSocketFactory.getDefault();
        SSLSocket socket = 
          (SSLSocket)factory.createSocket(url.getHost(), 443);    PrintWriter out = new PrintWriter(
            new OutputStreamWriter(
              socket.getOutputStream()));
        out.println("GET " + urlString + " HTTP/1.1");
        out.println();
        out.flush();    BufferedReader in = new BufferedReader(
          new InputStreamReader(
          socket.getInputStream()));    String line;    while ((line = in.readLine()) != null) {
          System.out.println(line);
        }    out.close();
        in.close();
      }
    }
      

  4.   

    My problem is, I can not download a html page with content type "application/vnd.ms-excel" generated by a serverlet on IBM Websphere with SSL option turned on.
    The html page, which generate an excel page on client browser works well when SSL turned off, but failed when on.
    I have heard of things like this happend elsewhere and I have no idea why.
    I will be very grateful if you may help me or ask me more details about my question, by email or telephone. [email protected]      (010)66069966-8838
      

  5.   

      至急,下面代码,在HTTP使用正常,HTTPS中,出现异常,为什么???
      public void Paint()
      {
        try
        {
          //SSL访问时,加这一句就出错:
          setContentType("application/vnd.ms-excel"); 
        }
        catch(Throwable e)
        {
          System.out.println(e.getMessage());
        }
      }