URLConnection getOutputStream hangs

Hi,
I have an application using applet to servlet communication,the https communication is established by URLConnection.However after certain time of communication the applet just hangs at getOutputStream .without any error or exception.
The environment is JRE 1.4.2_07 and Tomcat with SSL enabled.I spent lot of time tracking this bug but could not find any answer.Any help or ideas are appreciated.
Thanks.

I want to bring to your notice that getOutputStream() hangs or blocks only for https but works fine with http,also not during start of applet but after changing the applet state.I assume it may not be the problem from URLConnection may be the applet looses the https authentication during state change and hangs in connect or getOutputStream().we are considering to move to HttpClient but not sure if its going to resolve this problem.Any ideas ar appreciated.
many thanks.

Similar Messages

  • URLConnection.getOutputStream() hang when applet displayed a second time

    This is happening on Linux using the 1.31_02 plugin.
    My applet uses a URLConnection object to get information from a servlet. This method is in it's own thread, and is periodically called to keep the display of the applet up to date.
    The second time the applet is displayed (navigate away from the page and then return), the applet hangs in the method URLConnection.getOutputStream().
    Note that this only happens on Linux browsers, it's fine on Windows.
    Is there any way to programatically force a reset on the URL? The only way I have been able to recover is to restart the browser.
    Thanks.

    I am having similar problem with URLConnection.getOutputStream() that hangs in Mozilla 1.2.1 browser when it tries to write to linux server. It never creates this object outputStream = new BufferedWriter( new OutputStreamWriter(connect.getOutputStream())); System.out.println before this line shows but the one after does not show at all. Can you help? I am using Java plug-in 1.3.1_02. I would appreciate any help.

  • UrlConnection.getOutputStream() is blocking

    I am running some server code using JDK1.3.0 on solaris in server mode. Initially when
    the server is started, I get a very quick response for urlConnection.getOutputStream()
    function. But after sometime (don't know exactly how many times or if the rest of the
    app is screwing up something), this call blocks for 4 minutes or so. I thought it could be
    a problem with the network and try to ran the same piece of code from command line
    and it works perfectly fine. So, looks like the JVM is getting corrupted or some file handlers
    problem?

    I figured out the problem to setting a wrong proxy in some part of the
    application. Once that piece of code is executed, every subsequent URL
    connection tries to use this wrong proxy and then tries without the proxy.

  • Help on URLConnection.getOutputStream() !!

    Hi,
    I dun understand why this code returns me an empty string...
    URL url = new URL ("http://localhost");
    URLConnection con = url.openConnection();
    con.setDoOutput(true);
    OutputStream os = con.getOutputStream();
    System.out.println( os.toString() );
    This is juz part of my code.... I got an error while trying to write.... And i found out that the error is here... It should return me a OutputStream object.... but when i tried OutputStream object.toString()... it returns me an empty string...
    Can anyone please help me??

    Hi,
    I'm dealing with a similar problem with an Outputstream ...
    Im trying to tunnel data thru the URLConnection ....
    when sending the data I have no problems, but when i want to send it to a remote host i get the following exception:
    java.io.IOException: Error writing to server
    at sun.net.www.protocol.http.HttpURLConnection.writeRequests(HttpURLConnection.java:269)
    at sun.net.www.protocol.http.HttpURLConnection.writeRequests(HttpURLConnection.java:277)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:564)
    at graphit.gojaplugins.ntrenderplugin.client.Publisher.send(Publisher.java:205)
    at graphit.gojaplugins.ntrenderplugin.client.Publisher.netCopy(Publisher.java:136)
    at graphit.gojaplugins.ntrenderplugin.client.PublishDialog$PublishRunner.run(PublishDialog.java:573)
    at java.lang.Thread.run(Thread.java:536)
    here is the code of my send Method:
    int contentLength = data.length;
    /* http://medusa:8080/servlet/goja/framework/servlet/GeodataPublisher */
    try {
    // diese Zeile wirft warnings beim compile, URLEncoder.encode(....) ist deprecated k�mmere mich um dieses Problem sp�ter
    // das hat wohl irgendwie mit den Zeichens�tzen bei verschiedenen Sprachumgebungen zu tun.
    String url = "http://hades:8080/servlet/graphit/gojaplugins/ntrenderplugin/server/GeodataPublisher?sourceFile="+ URLEncoder.encode(source) + "&multipart=" + multipart + "&username=" + URLEncoder.encode(this.username) + "&password=" + URLEncoder.encode(this.password) + "&lastPart="+URLEncoder.encode(""+lastPart)+"&isShared="+isShared+"&isGeoset="+isGeoset+"&gstName="+URLEncoder.encode(geosetName);
    URL serverURL = new URL(url);
    URLConnection con = serverURL.openConnection();
    //System.out.println( serverURL.toString() );
    //System.out.println(con.toString());
    con.setUseCaches(false);
    con.setDoOutput(true);
    con.setDoInput(true);
    con.setRequestProperty("Content-Type", "multipart/form-data");
    con.setRequestProperty("Content-Length","" + contentLength);
    //con.connect();
    System.out.println("permission necessary: "+con.getPermission());
    OutputStream out = con.getOutputStream();
    out.write(data);
    out.flush();
    out.close();
    InputStream in = con.getInputStream();
    int returnCode = in.read();
    con = null;
    serverURL = null;
    in.close();
    System.out.println("returncode " + returnCode);
    //TODO: hier m�ssen die Returncodes des Servers behandelt werden!!!
    if (returnCode == 92) throw new RenderPluginException(RenderPluginException.AUTHENTIFICATIONFEHLER_BEIM_PUBLISHING);
    if (returnCode == 91) throw new RenderPluginException(RenderPluginException.SERVER_CHECKWRITEACCESS_FAILED);
    if (returnCode == 90) throw new RenderPluginException(RenderPluginException.SERVER_INTERNAL_IO_ERROR);
    }catch (IOException ioe) {
    Some words about the server side: As server I have an Apache Tomcat Servlet Container, which
    handles my request ....
    Unfortunately I can't use any other protocol than http for transferring my data ...
    Maybe there is someone who can help me ....

  • URLConnection getLastModified hangs

    Hi.
    I (am at least planning to) use the getLastModified method of URLConnection to create local caching. I'm using this currently, and it works like a charm - stores timestamp and new entry if updated, if no timestamp available no caching - but when it comes to a certain file i'm trying to access it just "hangs".
    I'm running a library on a tomcat/apache installation, and my (relevant) code is this:
    static Boolean bDebug = true;
    if( getURLLastModified( url ) > 0 )
      // do some caching stuff
    public static long getURLLastModified(String incomingURL)
      try
        URL url = new URL(incomingURL);
        URLConnection uc = url.openConnection();
        if(bDebug) System.out.println("URL : " + uc.getURL().toString());
        if(bDebug) System.out.println("MODIFIED : " + uc.getLastModified());
        if(bDebug) System.out.println("getLastModified works");
        return uc.getLastModified();
      catch(Exception ex)
        if(bDebug) System.out.println(ex.toString());
    }I can access the "special" file using my browser - renders without a problem, and i can wget it from my server - so no connectivity issues.
    But, as mentioned, when i'm trying to retrieve the timestamp of the file using getURLLastModified it just hangs - apparently indefinitely.
    That is - my tomcat instance is hanging ang not able to server anything, while the apache works (static files can be served).
    Is there any way of avoiding this somehow? Some kind of timeout on getLastModified or something?
    Any help on this topic will be higly appreciated :)

    Set a read timeout on the URLConnection.
    And close it before you exit that method!

  • Applet hangs during https communication

    I have an application using applet to servlet communication,the https communication is established by URLConnection.However after certain time of communication the applet just hangs at getOutputStream .without any error or exception.
    The environment is JRE 1.4.2_07 and Tomcat with SSL enabled.I spent lot of time tracking this bug but could not find any answer.
    I want to bring to your notice that getOutputStream() hangs or blocks only for https but works fine with http,also not during start of applet but after changing the applet state.I assume it may not be the problem from URLConnection may be the applet looses the https authentication during state change and hangs in connect or getOutputStream().we are considering to move to HttpClient but not sure if its going to resolve this problem.Any ideas ar appreciated.
    many thanks.

    As requested here is the full trace , marked in bold where the communication is hanging.The applet has loaded twice in this case. Any comments will be helpful as its very urgent.
    Java(TM) Plug-in: Version 1.4.2_07
    Using JRE version 1.4.2_07 Java HotSpot(TM) Client VM
    User home directory = C:\Dokumente und Einstellungen\jmohammad.SSOL
    Loading user-defined proxy configuration ...
    Done.
    Loading proxy configuration from Internet Explorer ...
    Done.
    Loading direct proxy configuration ...
    Done.
    Proxy Configuration: No proxy
    Cache is disabled by user
    Dump system properties ...
    acl.read = +
    acl.read.default =
    acl.write = +
    acl.write.default =
    application.home = C:\PROGRA~1\Java\J2RE14~1.2_0
    awt.toolkit = sun.awt.windows.WToolkit
    browser = sun.plugin
    browser.vendor = Sun Microsystems, Inc.
    browser.version = 1.1
    deployment.browser.path = C:\Programme\Internet Explorer\iexplore.exe
    deployment.browser.vm.iexplorer = true
    deployment.browser.vm.mozilla = true
    deployment.cache.max.size = 0
    deployment.console.startup.mode = SHOW
    deployment.javapi.cache.enabled = false
    deployment.javapi.jre.1.5.0_05.args =
    deployment.javapi.jre.1.5.0_05.osarch = x86
    deployment.javapi.jre.1.5.0_05.osname = Windows
    deployment.javapi.jre.1.5.0_05.path = C:\Programme\Java\jre1.5.0_05
    deployment.javapi.lifecycle.exception = true
    deployment.javaws.jre.0.enabled = true
    deployment.javaws.jre.0.location = http://java.sun.com/products/autodl/j2se
    deployment.javaws.jre.0.osarch = x86
    deployment.javaws.jre.0.osname = Windows
    deployment.javaws.jre.0.path = C:\Programme\Java\j2re1.4.2_07\bin\javaw.exe
    deployment.javaws.jre.0.platform = 1.4
    deployment.javaws.jre.0.product = 1.4.2_07
    deployment.javaws.jre.0.registered = true
    deployment.javaws.jre.1.enabled = true
    deployment.javaws.jre.1.location = http://java.sun.com/products/autodl/j2se
    deployment.javaws.jre.1.osarch = x86
    deployment.javaws.jre.1.osname = Windows
    deployment.javaws.jre.1.path = C:\IDE\jdk1.3.1\jre\bin\javaw.exe
    deployment.javaws.jre.1.platform = 1.3
    deployment.javaws.jre.1.product = 1.3.1
    deployment.javaws.jre.1.registered = true
    deployment.javaws.jre.2.enabled = true
    deployment.javaws.jre.2.location = http://java.sun.com/products/autodl/j2se
    deployment.javaws.jre.2.osarch = x86
    deployment.javaws.jre.2.osname = Windows
    deployment.javaws.jre.2.path = C:\Programme\Java\jre1.5.0_05\bin\javaw.exe
    deployment.javaws.jre.2.platform = 1.5
    deployment.javaws.jre.2.product = 1.5.0_05
    deployment.javaws.jre.2.registered = true
    deployment.javaws.splash.cache = C:\Dokumente und Einstellungen\jmohammad\Anwendungsdaten\Sun\Java\Deployment\javaws\cache\splashes\splash.xml
    deployment.javaws.splash.index = C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment\cache\javaws\splash\splash.xml
    deployment.javaws.version = javaws-1.4.2_07
    deployment.javaws.viewer.bounds = 0,0,687,497
    deployment.system.cacerts = C:\PROGRA~1\Java\J2RE14~1.2_0\lib\security\cacerts
    deployment.system.home = C:\WINDOWS\Sun\Java\Deployment
    deployment.system.jssecacerts = C:\PROGRA~1\Java\J2RE14~1.2_0\lib\security\cacerts
    deployment.system.profile = C:\WINDOWS
    deployment.system.security.policy = file:/C:/WINDOWS/Sun/Java/Deployment/security/java.policy
    deployment.system.tray.icon = true
    deployment.user.cachedir = C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment\cache
    deployment.user.certs = C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment\security\deployment.certs
    deployment.user.extdir = C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment\ext
    deployment.user.home = C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment
    deployment.user.jssecerts = C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment\security\deployment.jssecerts
    deployment.user.logdir = C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment\log
    deployment.user.profile = C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten
    deployment.user.security.policy = file:/C:/Dokumente%20und%20Einstellungen/jmohammad.SSOL/Anwendungsdaten/Sun/Java/Deployment/security/java.policy
    deployment.user.tmpdir = C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment\cache\tmp
    deployment.version = 1.5.0
    file.encoding = Cp1252
    file.encoding.pkg = sun.io
    file.separator = \
    file.separator.applet = true
    http.agent = Mozilla/4.0 (Windows XP 5.1)
    http.auth.serializeRequests = true
    https.protocols = SSLv3,SSLv2Hello
    java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob = sun.awt.windows.WPrinterJob
    java.class.path = C:\PROGRA~1\Java\J2RE14~1.2_0\classes
    java.class.version = 48.0
    java.class.version.applet = true
    java.endorsed.dirs = C:\PROGRA~1\Java\J2RE14~1.2_0\lib\endorsed
    java.ext.dirs = C:\PROGRA~1\Java\J2RE14~1.2_0\lib\ext
    java.home = C:\PROGRA~1\Java\J2RE14~1.2_0
    java.io.tmpdir = C:\DOKUME~1\JMOHAM~1.SSO\LOKALE~1\Temp\
    java.library.path = C:\Programme\Internet Explorer;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Programme\Internet Explorer;;C:\j2sdk1.4.2\bin;C:\apache-ant-1.5.3\bin;C:\oracle\ora92\bin;C:\Programme\Oracle\jre\1.3.1\bin;C:\Programme\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\ULTRAE~1;C:\tools
    java.protocol.handler.pkgs = sun.plugin.net.protocol|sun.plugin.net.protocol
    java.runtime.name = Java(TM) 2 Runtime Environment, Standard Edition
    java.runtime.version = 1.4.2_07-b05
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Sun Microsystems Inc.
    java.specification.version = 1.4
    java.util.prefs.PreferencesFactory = java.util.prefs.WindowsPreferencesFactory
    java.vendor = Sun Microsystems Inc.
    java.vendor.applet = true
    java.vendor.url = http://java.sun.com/
    java.vendor.url.applet = true
    java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
    java.version = 1.4.2_07
    java.version.applet = true
    java.vm.info = mixed mode
    java.vm.name = Java HotSpot(TM) Client VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Sun Microsystems Inc.
    java.vm.specification.version = 1.0
    java.vm.vendor = Sun Microsystems Inc.
    java.vm.version = 1.4.2_07-b05
    javaplugin.cache.disabled = true
    javaplugin.cache.size = 0
    javaplugin.console = show
    javaplugin.exception = true
    javaplugin.jre.params = -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    javaplugin.jre.path = Default
    javaplugin.jre.type = Default
    javaplugin.maxHeapSize = 96m
    javaplugin.nodotversion = 142_07
    javaplugin.proxy.config.type = direct
    javaplugin.proxy.usebrowsersettings = true
    javaplugin.trace = true
    javaplugin.trace.option = basic|net|security|ext|liveconnect
    javaplugin.version = 1.4.2_07
    javaplugin.vm.options = -Djava.class.path=C:\PROGRA~1\Java\J2RE14~1.2_0\classes -Xbootclasspath/a:C:\PROGRA~1\Java\J2RE14~1.2_0\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.4.2_07 -Djavaplugin.nodotversion=142_07 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\J2RE14~1.2_0 -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect -Djava.protocol.handler.pkgs=sun.plugin.net.protocol
    line.separator = \r\n
    line.separator.applet = true
    os.arch = x86
    os.arch.applet = true
    os.name = Windows XP
    os.name.applet = true
    os.version = 5.1
    os.version.applet = true
    package.restrict.access.netscape = false
    package.restrict.access.sun = true
    package.restrict.definition.java = true
    package.restrict.definition.netscape = true
    package.restrict.definition.sun = true
    path.separator = ;
    path.separator.applet = true
    sun.arch.data.model = 32
    sun.boot.class.path = C:\PROGRA~1\Java\J2RE14~1.2_0\lib\rt.jar;C:\PROGRA~1\Java\J2RE14~1.2_0\lib\i18n.jar;C:\PROGRA~1\Java\J2RE14~1.2_0\lib\sunrsasign.jar;C:\PROGRA~1\Java\J2RE14~1.2_0\lib\jsse.jar;C:\PROGRA~1\Java\J2RE14~1.2_0\lib\jce.jar;C:\PROGRA~1\Java\J2RE14~1.2_0\lib\charsets.jar;C:\PROGRA~1\Java\J2RE14~1.2_0\classes;C:\PROGRA~1\Java\J2RE14~1.2_0\lib\plugin.jar
    sun.boot.library.path = C:\PROGRA~1\Java\J2RE14~1.2_0\bin
    sun.cpu.endian = little
    sun.cpu.isalist = pentium i486 i386
    sun.io.unicode.encoding = UnicodeLittle
    sun.java2d.fontpath =
    sun.net.client.defaultConnectTimeout = 120000
    sun.os.patch.level = Service Pack 2
    trustProxy = true
    user.country = US
    user.dir = C:\Dokumente und Einstellungen\jmohammad.SSOL\Desktop
    user.home = C:\Dokumente und Einstellungen\jmohammad.SSOL
    user.language = en
    user.name = jmohammad
    user.timezone =
    user.variant =
    Done.
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    Registered modality listener
    Invoking JS method: document
    Invoking JS method: URL
    Referencing classloader: sun.plugin.ClassLoaderInfo@14acfcd, refcount=1
    Loading applet ...
    Initializing applet ...
    Starting applet ...
    Connecting https://10.96.8.57:8443/SIThreePViewer/applets/PassThru_1_01.jar with no proxy
    Connecting https://10.96.8.57:8443/SIThreePViewer/applets/PassThru_1_01.jar with cookie "JSESSIONID=243FF5B4D70B9F9F97DE12DEC05FF456"
    Loading Root CA certificates from C:\PROGRA~1\Java\J2RE14~1.2_0\lib\security\cacerts
    Loaded Root CA certificates from C:\PROGRA~1\Java\J2RE14~1.2_0\lib\security\cacerts
    Loading Https Root CA certificates from C:\PROGRA~1\Java\J2RE14~1.2_0\lib\security\cacerts
    Loaded Https Root CA certificates from C:\PROGRA~1\Java\J2RE14~1.2_0\lib\security\cacerts
    Loading JPI Https certificates from C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment\security\deployment.jssecerts
    Loaded JPI Https certificates from C:\Dokumente und Einstellungen\jmohammad.SSOL\Anwendungsdaten\Sun\Java\Deployment\security\deployment.jssecerts
    Loading certificates from JPI session certificate store
    Loaded certificates from JPI session certificate store
    Checking if certificate is in JPI session certificate store
    Checking if Https certificate is in JPI permanent certificate store
    Check if certificate can be verified using certificates in Root CA certificate store
    Certificate to be verified:
    Version: V1
    Subject: CN=Boris Pradl, OU=WEB, O=Dr. Ing. h.c. F. Porsche AG, L=Stuttgart, ST=Baden-Wuerttemberg, C=DE
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    c35e99d0 2f5798b0 30592005 1e84fb5f a57c2db9 a970b747 a8766e74 eafe7624
    2232e7f1 2896022a 49596866 b1ac4ebd f7a3f884 16025e27 d080c50b 86402262
    3c354699 4ca6542d d36c9155 31dd8d53 01539ff8 04ebbd40 5c243a33 4fb3d907
    e4b454e9 038cff6b 6ce3166a 9652d24a 9ce66fee c8bbf6f5 63bf7e4a 27ba744d
    Validity: [From: Thu Dec 02 09:03:44 CET 2004,
                   To: Wed Mar 02 09:03:44 CET 2005]
    Issuer: CN=Boris Pradl, OU=WEB, O=Dr. Ing. h.c. F. Porsche AG, L=Stuttgart, ST=Baden-Wuerttemberg, C=DE
    SerialNumber: [    41aecc60]
    Algorithm: [MD5withRSA]
    Signature:
    0000: 42 D6 0E 25 E3 18 C3 F4 FF 93 CC CA 08 44 F8 8E B..%.........D..
    0010: 03 BD 37 4E 73 01 ED 1F 8A 18 71 55 41 EE 7E B1 ..7Ns.....qUA...
    0020: 33 22 CD 7E E4 81 DC 06 9C F6 A3 32 90 79 82 23 3".........2.y.#
    0030: E1 69 2C 8B A0 11 4E 2A 06 AE 8E 5C AC 54 F6 2D .i,...N*...\.T.-
    0040: 9F 64 AA 33 51 EB 4C 65 00 4C CC 5E B7 5B 58 5D .d.3Q.Le.L.^.[X]
    0050: 12 C7 B5 7F A9 28 18 E2 35 51 07 D7 A1 11 A6 01 .....(..5Q......
    0060: DD 88 38 05 AD B4 5E EC 88 E0 7C 66 5C 5E B5 82 ..8...^....f\^..
    0070: EA B8 CF 5A 6A 9E 1B F6 9A CF E0 63 40 0C 3F CA ...Zj......c@.?.
    Comparing certificate against Root CA certificate:
    Version: V3
    Subject: CN=Equifax Secure eBusiness CA-1, O=Equifax Secure Inc., C=US
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    ce2f19bc 17b777de 93a95f5a 0d174f34 1a0c98f4 22d959d4 c46846f0 b435c585
    0320c6af 45a52151 4541eb16 5836326f e2506264 f9fd519c aa24d9f4 9d832a87
    0a21d312 38346c8d 006e5aa0 d942ee1a 2195f952 4c555ac5 0f384f46 fa6df82e
    35d61d7c ebe2f0b0 7580c8a9 13acbe88 ef3a6eab 5f2a3862 02b0127b fe8fa603
    Validity: [From: Mon Jun 21 06:00:00 CEST 1999,
                   To: Sun Jun 21 06:00:00 CEST 2020]
    Issuer: CN=Equifax Secure eBusiness CA-1, O=Equifax Secure Inc., C=US
    SerialNumber: [    04]
    Certificate Extensions: 4
    [1]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 4A 78 32 52 11 DB 59 16 36 5E DF C1 14 36 40 6A Jx2R..Y.6^...6@j
    0010: 47 7C 4C A1 G.L.
    [2]: ObjectId: 2.16.840.1.113730.1.1 Criticality=false
    NetscapeCertType [
    SSL CA
    S/MIME CA
    Object Signing CA]
    [3]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: 4A 78 32 52 11 DB 59 16 36 5E DF C1 14 36 40 6A Jx2R..Y.6^...6@j
    0010: 47 7C 4C A1 G.L.
    [4]: ObjectId: 2.5.29.19 Criticality=true
    BasicConstraints:[
    CA:true
    PathLen:2147483647
    Algorithm: [MD5withRSA]
    Signature:
    0000: 75 5B A8 9B 03 11 E6 E9 56 4C CD F9 A9 4C C0 0D u[......VL...L..
    0010: 9A F3 CC 65 69 E6 25 76 CC 59 B7 D6 54 C3 1D CD ...ei.%v.Y..T...
    0020: 99 AC 19 DD B4 85 D5 E0 3D FC 62 20 A7 84 4B 58 ........=.b ..KX
    0030: 65 F1 E2 F9 95 21 3F F5 D4 7E 58 1E 47 87 54 3E e....!?...X.G.T>
    0040: 58 A1 B5 B5 F8 2A EF 71 E7 BC C3 F6 B1 49 46 E2 X....*.q.....IF.
    0050: D7 A0 6B E5 56 7A 9A 27 98 7C 46 62 14 E7 C9 FC ..k.Vz.'..Fb....
    0060: 6E 03 12 79 80 38 1D 48 82 8D FC 17 FE 2A 96 2B n..y.8.H.....*.+
    0070: B5 62 A6 A6 3D BD 7F 92 59 CD 5A 2A 82 B2 37 79 .b..=...Y.Z*..7y
    Comparing certificate against Root CA certificate:
    Version: V1
    Subject: CN=VeriSign Class 1 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    dd84d4b9 b4f9a7d8 f304789c de3ddc6c 1316d97a dd245166 c0c72659 0dac0608
    c294d133 1ff08335 1f6e1bc8 deaa6e15 4e5427ef c46d1aec 0be30ef0 44a557c7
    40581ea3 471f71ec 60f66d94 c81839ed fe421856 dfe44c49 10784e01 76356312
    36dd66bc 010436a3 5568d5a2 3609acab 21265406 ad3fca14 e0accaad 061d95e2
    f89df1e0 60ffc27f 752b4ccc dafe8799 21eabafe 3e54d7d2 5978db3c 6ecfa013
    001ab827 a1e4be67 96caa0c5 b39cddc9 759eeb30 9a5fa3cd d9ae7819 3f23e95c
    db29bdad 55c81b54 8c63f6e8 a6eac737 125ca329 1e02d9db 1f3bb4d7 0f564781
    15044aaf 8327d1c5 5888c1dd f6aaa7a3 18da68aa 6d1151e1 bf656b9f 9676d13d
    Validity: [From: Fri Oct 01 02:00:00 CEST 1999,
                   To: Thu Jul 17 01:59:59 CEST 2036]
    Issuer: CN=VeriSign Class 1 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
    SerialNumber: [    8b5b7556 8454850b 00cfaf38 48ceb1a4]
    Algorithm: [SHA1withRSA]
    Signature:
    0000: AB 66 8D D7 B3 BA C7 9A B6 E6 55 D0 05 F1 9F 31 .f........U....1
    0010: 8D 5A AA D9 AA 46 26 0F 71 ED A5 AD 53 56 62 01 .Z...F&.q...SVb.
    0020: 47 2A 44 E9 FE 3F 74 0B 13 9B B9 F4 4D 1B B2 D1 G*D..?t.....M...
    0030: 5F B2 B6 D2 88 5C B3 9F CD CB D4 A7 D9 60 95 84 _....\.......`..
    0040: 3A F8 C1 37 1D 61 CA E7 B0 C5 E5 91 DA 54 A6 AC :..7.a.......T..
    0050: 31 81 AE 97 DE CD 08 AC B8 C0 97 80 7F 6E 72 A4 1............nr.
    0060: E7 69 13 95 65 1F C4 93 3C FD 79 8F 04 D4 3E 4F .i..e...<.y...>O
    0070: EA F7 9E CE CD 67 7C 4F 65 02 FF 91 85 54 73 C7 .....g.Oe....Ts.
    0080: FF 36 F7 86 2D EC D0 5E 4F FF 11 9F 72 06 D6 B8 .6..-..^O...r...
    0090: 1A F1 4C 0D 26 65 E2 44 80 1E C7 9F E3 DD E8 0A ..L.&e.D........
    00A0: DA EC A5 20 80 69 68 A1 4F 7E E1 6B CF 07 41 FA ... .ih.O..k..A.
    00B0: 83 8E BC 38 DD B0 2E 11 B1 6B B2 42 CC 9A BC F9 ...8.....k.B....
    00C0: 48 22 79 4A 19 0F B2 1C 3E 20 74 D9 6A C3 BE F2 H"yJ....> t.j...
    00D0: 28 78 13 56 79 4F 6D 50 EA 1B B0 B5 57 B1 37 66 (x.VyOmP....W.7f
    00E0: 58 23 F3 DC 0F DF 0A 87 C4 EF 86 05 D5 38 14 60 X#...........8.`
    00F0: 99 A3 4B DE 06 96 71 2C F2 DB B6 1F A4 EF 3F EE ..K...q,......?.
    Comparing certificate against Root CA certificate:
    Version: V1
    Subject: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 2 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    a7880121 742ce71a 03f098e1 973c0f21 08f19cdb 97e99afc c2040613 be5f52c8
    cc1e2c12 562cb801 692ccc99 1fadb096 ae7904f2 1339c17b 98ba082c e8c28413
    2caa69e9 09f4c7a9 02a442c2 234f4ad8 f00ea2fb 316cc9e6 6f992707 f5e6f44c
    789e6deb 4686fab9 86c954f2 b2c4afd4 461c5ac9 1530ff0d 6cf52d0e 6dce7f77
    Validity: [From: Mon May 18 02:00:00 CEST 1998,
                   To: Wed Aug 02 01:59:59 CEST 2028]
    Issuer: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 2 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US
    SerialNumber: [    b92f60cc 889fa17a 4609b85b 706c8aaf]
    Algorithm: [SHA1withRSA]
    Signature:
    0000: 72 2E F9 7F D1 F1 71 FB C4 9E F6 C5 5E 51 8A 40 r.....q.....^Q.@
    0010: 98 B8 68 F8 9B 1C 83 D8 E2 9D BD FF ED A1 E6 66 ..h............f
    0020: EA 2F 09 F4 CA D7 EA A5 2B 95 F6 24 60 86 4D 44 ./......+..$`.MD
    0030: 2E 83 A5 C4 2D A0 D3 AE 78 69 6F 72 DA 6C AE 08 ....-...xior.l..
    0040: F0 63 92 37 E6 BB C4 30 17 AD 77 CC 49 35 AA CF .c.7...0..w.I5..
    0050: D8 8F D1 BE B7 18 96 47 73 6A 54 22 34 64 2D B6 .......GsjT"4d-.
    0060: 16 9B 59 5B B4 51 59 3A B3 0B 14 F4 12 DF 67 A0 ..Y[.QY:......g.
    0070: F4 AD 32 64 5E B1 46 72 27 8C 12 7B C5 44 B4 AE ..2d^.Fr'....D..
    Comparing certificate against Root CA certificate:
    Version: V1
    Subject: OU=Class 4 Public Primary Certification Authority, O="VeriSign, Inc.", C=US
    Signature Algorithm: MD2withRSA, OID = 1.2.840.113549.1.1.2
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    d0b275f6 78d0ae5a 50f4e950 a99f8cd7 ef919470 e8d22490 768985d6 dface601
    173280f0 9d9347bc 9a659d1f 97aebfe9 86756320 89bd8058 9d040c9d a8c124e9
    0be53178 bdfc2d0c 376a9e78 80e94675 f9eda3fb 137bc8c1 4cd2a3ef f53cb062
    8f4a5d3b dd95678f 13b9c13c d6a7269b ecc33b7a d94dbc6d 9be81501 e3f047a9
    Validity: [From: Mon Jan 29 01:00:00 CET 1996,
                   To: Sat Jan 01 00:59:59 CET 2000]
    Issuer: OU=Class 4 Public Primary Certification Authority, O="VeriSign, Inc.", C=US
    SerialNumber: [    02a60000 01]
    Algorithm: [MD2withRSA]
    Signature:
    0000: 53 DD D3 F0 9C 24 7E 40 AA E2 FC 00 1A D7 DA 0C S....$.@........
    0010: FC 32 61 B8 15 0D 96 F3 FA 57 1B 7F 33 7C AF E9 .2a......W..3...
    0020: 98 9A 61 C8 7A B3 B7 FF B1 DC 99 83 DC AC 12 FC ..a.z...........
    0030: 70 C9 1F 38 42 ED 44 F6 80 2E 5B 6B 33 69 AC 9C p..8B.D...[k3i..
    0040: D3 5C E7 5F 5A 18 C7 B1   2D 79 04 96 41 91 99 41  .\._Z...-y..A..A
    0050: B1 3C 0D BA 84 39 C6 3B   97 F0 26 C9 8E EE BD CC  .<...9.;..&.....
    0060: 42 95 FF 1E C7 02 3F 54   0C 78 F5 BC AA 60 7C 02  B.....?T.x...`..
    0070: 69 E8 DC AC E2 02 76 61   C4 3E 03 EA D2 8A 24 D1  i.....va.>....$.
    Comparing certificate against Root CA certificate:
    Version: V1
    Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    cbba9c52 fc781f1a 1e6f1b37 73bdf8c9 6b941230 4ff03647 f5d0910a f517c8a5
    61c11640 4dfb8a61 90e57620 c111067d ab2c6ea6 f511418e fa2dad2a 6159a467
    264cd0e8 bc525b70 200458d1 7ac9a469 bc831764 ad058bbc d058ce8d 8cf5ebf0
    42490b9d 97276732 6ee1ae93 151c70bc 204d2f18 de9288e8 6c855711 1ae97ee3
    261154a2 45965583 ca3089e8 dcd8a3ed 2a803f7f 7965573e 15206608 2f9593bf
    aa472fa8 4697f012 e2fec20a 2b51e676 e6b746b7 e20da6cc a8c34c59 5589e6e8
    535c1cea 9df06216 0ba7c95f 0cf0dec2 76ceaff7 6af2fa41 a6a23314 c9e57a63
    d39e6237 d585659e 0ee65324 741b5e1d 12535bc7 2ce78349 3b15ae8a 68b95797
    Validity: [From: Fri Oct 01 02:00:00 CEST 1999,
                   To: Thu Jul 17 01:59:59 CEST 2036]
    Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G3, OU="(c) 1999 VeriSign, Inc. - For authorized use only", OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
    SerialNumber: [    9b7e0649 a33e62b9 d5ee9048 7129ef57]
    Algorithm: [SHA1withRSA]
    Signature:
    0000: 11 14 96 C1 AB 92 08 F7 3F 2F C9 B2 FE E4 5A 9F ........?/....Z.
    0010: 64 DE DB 21 4F 86 99 34 76 36 57 DD D0 15 2F C5 d..!O..4v6W.../.
    0020: AD 7F 15 1F 37 62 73 3E D4 E7 5F CE 17 03 DB 35 ....7bs>.._....5
    0030: FA 2B DB AE 60 09 5F 1E 5F 8F 6E BB 0B 3D EA 5A .+..`._._.n..=.Z
    0040: 13 1E 0C 60 6F B5 C0 B5 23 22 2E 07 0B CB A9 74 ...`o...#".....t
    0050: CB 47 BB 1D C1 D7 A5 6B CC 2F D2 42 FD 49 DD A7 .G.....k./.B.I..
    0060: 89 CF 53 BA DA 00 5A 28 BF 82 DF F8 BA 13 1D 50 ..S...Z(.......P
    0070: 86 82 FD 8E 30 8F 29 46 B0 1E 3D 35 DA 38 62 16 ....0.)F..=5.8b.
    0080: 18 4A AD E6 B6 51 6C DE AF 62 EB 01 D0 1E 24 FE .J...Ql..b....$.
    0090: 7A 8F 12 1A 12 68 B8 FB 66 99 14 14 45 5C AE E7 z....h..f...E\..
    00A0: AE 69 17 81 2B 5A 37 C9 5E 2A F4 C6 E2 A1 5C 54 .i..+Z7.^*....\T
    00B0: 9B A6 54 00 CF F0 F1 C1 C7 98 30 1A 3B 36 16 DB ..T.......0.;6..
    00C0: A3 6E EA FD AD B2 C2 DA EF 02 47 13 8A C0 F1 B3 .n........G.....
    00D0: 31 AD 4F 1C E1 4F 9C AF 0F 0C 9D F7 78 0D D8 F4 1.O..O......x...
    00E0: 35 56 80 DA B7 6D 17 8F 9D 1E 81 64 E1 FE C5 45 5V...m.....d...E
    00F0: BA AD 6B B9 0A 7A 4E 4F 4B 84 EE 4B F1 7D DD 11 ..k..zNOK..K....
    Comparing certificate against Root CA certificate:
    Version: V3
    Subject: CN=Entrust.net Client Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.), O=Entrust.net
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    9374b4b6 e4c54bd6 a1687f62 d5ecf751 57b3724a 98f5d089 c9ad63cd 4d35516a
    84d4adc9 68796fb8 eb11db87 ae5c2451 13f15425 84af292b 9fe380e2 d9cbddc6
    45493488 905e0197 efea53a6 ddfcc1de 4b2a25e4 e935fa55 0506e589 7aeaa411
    573bfc7c 3d36cd67 356da4a9 2559bd66 f5f927e4 9567d63f 92805ef2 347d2b85
    Validity: [From: Mon Feb 07 17:16:40 CET 2000,
                   To: Fri Feb 07 17:46:40 CET 2020]
    Issuer: CN=Entrust.net Client Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.), O=Entrust.net
    SerialNumber: [    389ef6e4]
    Certificate Extensions: 8
    [1]: ObjectId: 1.2.840.113533.7.65.0 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 10 30 0E 1B 08 56 35 2E 30 3A 34 2E 30 03 02 ..0...V5.0:4.0..
    0010: 04 90 ..
    [2]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 84 8B 74 FD C5 8D C0 FF 27 6D 20 37 45 7C FE 2D ..t.....'m 7E..-
    0010: CE BA D3 7D ....
    [3]: ObjectId: 2.16.840.1.113730.1.1 Criticality=false
    NetscapeCertType [
    SSL CA
    S/MIME CA
    Object Signing CA]
    [4]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: 84 8B 74 FD C5 8D C0 FF 27 6D 20 37 45 7C FE 2D ..t.....'m 7E..-
    0010: CE BA D3 7D ....
    [5]: ObjectId: 2.5.29.31 Criticality=false
    CRLDistributionPoints [
    [DistributionPoint:
    [CN=CRL1, CN=Entrust.net Client Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/GCCA_CPS incorp. by ref. (limits liab.), O=Entrust.net]
    [6]: ObjectId: 2.5.29.15 Criticality=false
    KeyUsage [
    Key_CertSign
    Crl_Sign
    [7]: ObjectId: 2.5.29.16 Criticality=false
    PrivateKeyUsage: [
    From: Mon Feb 07 17:16:40 CET 2000, To: Fri Feb 07 17:46:40 CET 2020]
    [8]: ObjectId: 2.5.29.19 Criticality=false
    BasicConstraints:[
    CA:true
    PathLen:2147483647
    Algorithm: [MD5withRSA]
    Signature:
    0000: 4E 6F 35 80 3B D1 8A F5 0E A7 20 CB 2D 65 55 D0 No5.;..... .-eU.
    0010: 92 F4 E7 84 B5 06 26 83 12 84 0B AC 3B B2 44 EE ......&.....;.D.
    0020: BD CF 40 DB 20 0E BA 6E 14 EA 30 E0 3B 62 7C 7F ..@. ..n..0.;b..
    0030: 8B 6B 7C 4A A7 D5 35 3C BE A8 5C EA 4B BB 93 8E .k.J..5<..\.K...
    0040: 80 66 AB 0F 29 FD 4D 2D BF 1A 9B 0A 90 C5 AB DA .f..).M-........
    0050: D1 B3 86 D4 2F 24 52 5C 7A 6D C6 F2 FE E5 4D 1A ..../$R\zm....M.
    0060: 30 8C 90 F2 BA D7 4A 3E 43 7E D4 C8 50 1A 87 F8 0.....J>C...P...
    0070: 4F 81 C7 76 0B 84 3A 72 9D CE 65 66 97 AE 26 5E O..v..:r..ef..&^
    Comparing certificate against Root CA certificate:
    Version: V1
    Subject: CN=GTE CyberTrust Global Root, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    950fa0b6 f0509ce8 7ac788cd dd170e2e b094d01b 3d0ef694 c08a94c7 06c89097
    c8b8641a 7a7e6c3c 53e13728 73607fb2 9753079f 53f96d58 94d2af8d 6d886780
    e6edb295 cf7231ca a51c72ba 5c02e764 42e7f9a9 2cd63a0d ac8d42aa 240139e6
    9c3f0185 570d5887 45f8d385 aa936926 85704880 3f1215c7 79b41f05 2f3b6299
    Validity: [From: Thu Aug 13 02:29:00 CEST 1998,
                   To: Tue Aug 14 01:59:00 CEST 2018]
    Issuer: CN=GTE CyberTrust Global Root, OU="GTE CyberTrust Solutions, Inc.", O=GTE Corporation, C=US
    SerialNumber: [    01a5]
    Algorithm: [MD5withRSA]
    Signature:
    0000: 6D EB 1B 09 E9 5E D9 51 DB 67 22 61 A4 2A 3C 48 m....^.Q.g"a.*<H
    0010: 77 E3 A0 7C A6 DE 73 A2 14 03 85 3D FB AB 0E 30 w.....s....=...0
    0020: C5 83 16 33 81 13 08 9E 7B 34 4E DF 40 C8 74 D7 [email protected].
    0030: B9 7D DC F4 76 55 7D 9B 63 54 18 E9 F0 EA F3 5C ....vU..cT.....\
    0040: B1 D9 8B 42 1E B9 C0 95 4E BA FA D5 E2 7C F5 68 ...B....N......h
    0050: 61 BF 8E EC 05 97 5F 5B B0 D7 A3 85 34 C4 24 A7 a....._[....4.$.
    0060: 0D 0F 95 93 EF CB 94 D8 9E 1F 9D 5C 85 6D C7 AA ...........\.m..
    0070: AE 4F 1F 22 B5 CD 95 AD BA A7 CC F9 AB 0B 7A 7F .O."..........z.
    Comparing certificate against Root CA certificate:
    Version: V3
    Subject: CN=Entrust.net Secure Server Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.), O=Entrust.net
    Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    c7c15f4e 71f1cef0 60860fd2 587fd333 972d17a2 7530b596 64262f68 c344aba8
    75e60067 34579e65 c7229b73 e6d3dd08 0e3755aa 2546816c bdfea8f6 7557578c
    906c4ac3 3e8b4b43 0ac91156 9a9a2722 99cf559e 61d902e2 7cb67c38 07dce37f
    4f9ab903 4180b675 67130b9f e85736c8 5d0036de 6614da6e 761f4f37 8c821389
    Validity: [From: Fri Feb 04 18:20:00 CET 2000,
                   To: Tue Feb 04 18:50:00 CET 2020]
    Issuer: CN=Entrust.net Secure Server Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.), O=Entrust.net
    SerialNumber: [    389b113c]
    Certificate Extensions: 8
    [1]: ObjectId: 1.2.840.113533.7.65.0 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 10 30 0E 1B 08 56 35 2E 30 3A 34 2E 30 03 02 ..0...V5.0:4.0..
    0010: 04 90 ..
    [2]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: CB 6C C0 6B E3 BB 3E CB FC 22 9C FE FB 8B 92 9C .l.k..>.."......
    0010: B0 F2 6E 22 ..n"
    [3]: ObjectId: 2.16.840.1.113730.1.1 Criticality=false
    NetscapeCertType [
    SSL CA
    S/MIME CA
    Object Signing CA]
    [4]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: CB 6C C0 6B E3 BB 3E CB FC 22 9C FE FB 8B 92 9C .l.k..>.."......
    0010: B0 F2 6E 22 ..n"
    [5]: ObjectId: 2.5.29.31 Criticality=false
    CRLDistributionPoints [
    [DistributionPoint:
    [CN=CRL1, CN=Entrust.net Secure Server Certification Authority, OU=(c) 2000 Entrust.net Limited, OU=www.entrust.net/SSL_CPS incorp. by ref. (limits liab.), O=Entrust.net]
    [6]: ObjectId: 2.5.29.15 Criticality=false
    KeyUsage [
    Key_CertSign
    Crl_Sign
    [7]: ObjectId: 2.5.29.16 Criticality=false
    PrivateKeyUsage: [
    From: Fri Feb 04 18:20:00 CET 2000, To: Tue Feb 04 18:50:00 CET 2020]
    [8]: ObjectId: 2.5.29.19 Criticality=false
    BasicConstraints:[
    CA:true
    PathLen:2147483647
    Algorithm: [MD5withRSA]
    Signature:
    0000: 62 DB 81 91 CE C8 9A 77 42 2F EC BD 27 A3 53 0F b......wB/..'.S.
    0010: 50 1B EA 4E 92 F0 A9 AF A9 A0 BA 48 61 CB EF C9 P..N.......Ha...
    0020: 06 EF 1F D5 F4 EE DF 56 2D E6 CA 6A 19 73 AA 53 .......V-..j.s.S
    0030: BE 92 B3 50 02 B6 85 26 72 63 D8 75 50 62 75 14 ...P...&rc.uPbu.
    0040: B7 B3 50 1A 3F CA 11 00 0B 85 45 69 6D B6 A5 AE ..P.?.....Eim...
    0050: 51 E1 4A DC 82 3F 6C 8C 34 B2 77 6B D9 02 F6 7F Q.J..?l.4.wk....
    0060: 0E EA 65 04 F1 CD 54 CA BA C9 CC E0 84 F7 C8 3

  • InputStream in = urlconnection.getInputStream();

    Dear All,
    I am trying to zip a file in the client side and sending it to the server side machine......there, i am trying to unzip it and writting it over there...for this, i am using a seperate program in the client side and in the server side.................................
    In the client program, after opening all the necessary streams and all formalities, i am using the code...
    "InputStream in = urlconnection.getInputStream();
    while (in.read()!=-1);"
    only if i use the above code, the zipped file is transfered to my server machine...but in this case, the link with the server is not getting disconnected...i mean the command prompt remains alive, without stopping...what i inferred is, my control is got into the above said "InputStream in = urlconnection.getInputStream();"...indefinitely...
    so i tried of removing the above said statement.....in this case, the zipped file is NOT getting written in my server machine....
    what to do???
    any suggestions please...waiting for the reply very anxiously, refreshing this site for every 2 minutes....
    sakthivel s.
    snippet code for ur reference...
    Client side
    try
    ZipOutputStream zipoutputstream = new ZipOutputStream(urlconnection.getOutputStream());
    ZipEntry zipentry = new ZipEntry(filename);
    zipentry.setMethod(ZipEntry.DEFLATED);
    zipoutputstream.putNextEntry(zipentry);
    byte bytearray[] = new byte[1024];
    File file = new File(filenamedir);
    FileInputStream fileinputstream = new FileInputStream(file);
    BufferedInputStream bufferedinputstream = new BufferedInputStream(fileinputstream);
    int length = 0;
    while((length=bufferedinputstream.read(bytearray)) != -1)
    zipoutputstream.write(bytearray,0,length);
    fileinputstream.close();
    bufferedinputstream.close();
    zipoutputstream.flush();
    zipoutputstream.finish();
    zipoutputstream.closeEntry();
    zipoutputstream.close();
    InputStream in = urlconnection.getInputStream();
    while (in.read()!=-1); // the said while loop....................
    System.runFinalization();
    urlconnection.getInputStream().close();
    urlconnection.disconnect();
    the way of connecting witht the server : (just a snippet of the code)
    URL serverURL = new URL("http://192.168.10.55:8001/servlet/uploadservlet");
    HttpURLConnection.setFollowRedirects(true);
    urlconnection= (HttpURLConnection)serverURL.openConnection();
    urlconnection.setDoOutput(true);
    urlconnection.setRequestMethod("POST");
    urlconnection.setDoOutput(true);
    urlconnection.setDoInput(true);
    urlconnection.setUseCaches(false);
    urlconnection.setAllowUserInteraction(true);
    urlconnection.setRequestProperty("Cookie",cookie);
    urlconnection.connect();
    Server Side:
    javax.servlet.ServletInputStream servletinputstream = httpservletrequest.getInputStream();
    ZipInputStream zipinputstream = new ZipInputStream(servletinputstream);
    ZipEntry zipentry = null;
    String directory="c:\\test"; // the unzipped file should be written to this directory...
    try
    File file = new File(directory);
    if(!file.exists())
    file.mkdirs();
    catch(Exception exp)
    {System.out.println("I am from Server: " + exp);}
    try
    zipentry = zipinputstream.getNextEntry();
    if(zipentry != null)
    int slash = zipentry.getName().lastIndexOf(File.separator) + 1;
    String filename = zipentry.getName().substring(slash);
    File file1 = new File(directory + File.separator + filename);
    FileOutputStream fostream = new FileOutputStream(file1);
    BufferedOutputStream bufferedoutputstream = new BufferedOutputStream(fostream);
    byte abyte0[] = new byte[1024];
    for(int index = 0; (index = zipinputstream.read(abyte0)) > 0;)
    bufferedoutputstream.write(abyte0, 0, index);
    servletinputstream.close();
    bufferedoutputstream.flush();
    bufferedoutputstream.close();
    zipinputstream.closeEntry();
    zipinputstream.close();
    fostream.flush();
    fostream.close();
    catch(IOException ioexception)
    {System.out.println("IOException occured in the Server: " + ioexception);ioexception.printStackTrace();}
    P.S: I am not getting any error in the server side or cleint side...the only problem is, the command prompt(where i am running my cleint program) is getting standing indefinitely...i have to use control-c to come to the command prompt again...this is because of the while looop said in the client machine....if i remove it...the file is not gettting transfered...what to do????

    snoopybad77 wrote:
    I can't, I'm using java.net.URL and java.net.URLConnection....Actually you are using HttpURLConnection.
    java.net.URLConnection is an abstract class. The concrete implementation returned by openConnection for an HTTP based URL is HttpURLConnection. So you might want to try the previous suggestion and otherwise examining the methods of HttpURLConnection to see how they might be helpful to you.

  • Facing problems with URLConnection under high load

    Hi,
    I have a piece of code that acts as a load balancer. Under high load scenario - 200+ different simulataneous users, it throws some errors.
    Following is a snippet from that code -
                   URL url = new URL(site);
                   URLConnection urlconnection = url.openConnection();
                   urlconnection.setDoInput(true);
                   urlconnection.setDoOutput(true);
                   urlconnection.setUseCaches(false);
                   DataOutputStream dataoutputstream =
                             new DataOutputStream(urlconnection.getOutputStream());
                   dataoutputstream.writeBytes(posServiceRequest);
                   dataoutputstream.flush();
                   dataoutputstream.close();
                   InputStream inputstream = urlconnection.getInputStream();
                   httpservletresponse.setContentType(urlconnection.getContentType());
                   rewriteStreams(inputstream, httpservletresponse.getOutputStream());
                   inputstream.close();
    Somewhere after around 200 odd users, this piece of code throws an error - "Error writing to server", a stacktrace print shows that the error occurs at the following line -
    InputStream inputstream = urlconnection.getInputStream();
    Any pointers would be appreciated.
    Thanks,
    -rahul

    More information please. What is the exception class, what is its entire text, and what is the stack trace.

  • Zipinput/output stream

    Dear All,
         I have a problem over here, in the transfer of file from my client machine to the server machine....I am zipping the file in the client machine and sending to the server machine....In the server machine I am trying to unzip it and write it over there....
    For contacting my server, initially i am getting the authentication.....it is all correct....no problem with the authentication work...the problem over here is.............i am having 3 files to be transfered to my server machine...the first file is getting transfered....after that the command prompt is just standing idle....it is not even coming to the prompt state...it is not even thowing any errors in the server console or in the client machine....
    Below is my complete code....
    Client program: (simple java program)
    import java.io.BufferedInputStream;
    import java.io.IOException;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import java.net.*;
    import java.sql.*;
    class testprogram
    HttpURLConnection urlconnection = null;
    public static void main(String args[])
    String file1="F:/Domino/Data/Applications/Groupware/HP/input/Invcor02/param/new1.txt";
    String file2="F:/Domino/Data/Applications/Groupware/HP/input/Invcor02/param/new2.txt";
    String file3="F:/Domino/Data/Applications/Groupware/HP/input/Invcor02/param/new3.txt";
    String name1="new1.txt";
    String name2 ="new2.txt";
    String name3="new3.txt";
    testprogram tt=new testprogram();
    try
    tt.makeConnection();
    tt.zipper(file1,name1);
    tt.zipper(file2,name2);
    tt.zipper(file3,name3);
    tt.disconnectConnection();
    catch(Exception e){}
    public void zipper(String file,String name) throws Exception
    try
    ZipOutputStream zipoutputstream = new ZipOutputStream(urlconnection.getOutputStream());
    ZipEntry zipentry = new ZipEntry(name);
    zipentry.setMethod(ZipEntry.DEFLATED);
    zipoutputstream.putNextEntry(zipentry);
    byte bytearray[] = new byte[1024];
    File filedir = new File(file);
    FileInputStream fileinputstream = new FileInputStream(filedir);
    BufferedInputStream bufferedinputstream = new BufferedInputStream(fileinputstream);
    int length = 0;
    while((length=bufferedinputstream.read(bytearray)) != -1)
    zipoutputstream.write(bytearray,0,length);
    fileinputstream.close();
    bufferedinputstream.close();
    zipoutputstream.flush();
    zipoutputstream.finish();
    zipoutputstream.closeEntry();
    zipoutputstream.close();
    System.out.println("I am here...");
    InputStream in = urlconnection.getInputStream();
    while (in.read()!=-1);
    catch(Exception exp)
    {System.out.println("I am from client:      " + exp);}
    /* to make the URL connection with the server - begin */
    public void makeConnection()
    /* Authentication work is done over here - begin */
    String setcookie="";
    String cookie="";
    try
    URL theurl = new URL("http://192.168.10.55:8001/names.nsf?login&username=sakthivel&password=12345");
    HttpURLConnection.setFollowRedirects(false);
    HttpURLConnection hurl = (HttpURLConnection)theurl.openConnection();
    hurl.connect();
    setcookie = hurl.getHeaderField ("set-cookie");
    int index=setcookie.indexOf(";");
    cookie=(setcookie.substring(0,index)).trim();
    hurl.disconnect();
    hurl=null;
    theurl=null;
    catch(Exception exp){exp.printStackTrace();}
    /* Authentication work is done over here - end */
    /* to make the URL connection with the server - begin */
    try
    URL serverURL = new URL("http://192.168.10.55:8001/servlet/FileUploadServlet");
    urlconnection= (HttpURLConnection)serverURL.openConnection();
    urlconnection.setDoOutput(true);
    urlconnection.setRequestMethod("POST");
    urlconnection.setRequestProperty("Cookie",cookie);
    catch(Exception exp)
    {System.out.println("Client machine:   Error in Making Connection" + exp );}
    /* to make the URL connection with the server - end */
    /* to disconnect the URL connection with the server - begin */
    public void disconnectConnection()
    try
    System.runFinalization();
    urlconnection.disconnect();
    urlconnection.getInputStream().close();
    catch(Exception exp)
    {System.out.println("Client machine:   Error gets fired while disconnecting the connection" + exp);}
    /* to disconnect the URL connection with the server - end */
    My Server side Program(servlet program)
    import java.io.BufferedOutputStream;
    import java.io.IOException;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipInputStream;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class FileUploadServlet extends HttpServlet
    public void init() throws ServletException
    public void doPost(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws ServletException, IOException
         try{UnzipAndWriteToDir(httpservletrequest, httpservletresponse);}
         catch(Exception exp){System.out.println("I am from server............" + exp);}
    public void UnzipAndWriteToDir(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws Exception
    javax.servlet.ServletInputStream servletinputstream = httpservletrequest.getInputStream();
    ZipInputStream zipinputstream = new ZipInputStream(servletinputstream);
    ZipEntry zipentry = null;
    String directory="c:\\test";
    try
    File file = new File(directory);
    if(!file.exists())
    file.mkdirs();
    catch(Exception exp)
    {System.out.println("I am from Server: " + exp);}
    try
    zipentry = zipinputstream.getNextEntry();
    if(zipentry != null)
    int slash = zipentry.getName().lastIndexOf(File.separator) + 1;
    String filename = zipentry.getName().substring(slash);
    File file1 = new File(directory + File.separator + filename);
    BufferedOutputStream bufferedoutputstream = new BufferedOutputStream(new FileOutputStream(file1));
    byte abyte0[] = new byte[1024];
    for(int index = 0; (index = zipinputstream.read(abyte0)) > 0;)
    bufferedoutputstream.write(abyte0, 0, index);
    bufferedoutputstream.flush();
    bufferedoutputstream.close();
    zipinputstream.closeEntry();
    zipinputstream.close();
    catch(IOException ioexception)
    {System.out.println("IOException occured in the Server:   " + ioexception);}
    }     // end of the method...
    } // end of the class
    P.S: Here, I am using the Domino Server, which is same as the Web Logic Server......Pl. post a reply....hanging over here for the past one week...any suggestion is highly appreciated....

    I have done what you describe with a "Transfer Object". I've used a wrapper around the files to be transfered with the actual files held in an array and seperate fields for status and quantity. It greatly simplified my logic to tranfer multiple files especially where there were divers requests for prossessing to be done on the files.

  • Uploading files through HTTP

    Hi All.
    I am trying to create a moduel for uploading files to a web server using HTTP multipart encripted request.
    Well, generally it works, but it is very very slow, and sometimes, with large files (15 MB and above) it gets stuck !
    I did not write the multipart parser myself, but downloaded it, and I tried several implementations, and they all have the same problems.
    I am using IBM WebSphere (3.5.5) with IBM HTTP Server as app/web server.
    My questions are:
    1.
    ===
    Is the HTTP protocol should be able to upload file with (theoretically) any size (maybe I am trying to do something that is not possible...) ?
    2.
    ===
    Does the servlet engines receive ALL the request object before handling the servlets methods (i.e. wll the file be uploaded to the memory first, and only then can be written to the disk) ?
    Thanks a lot, Udi

    The code for client is :
         fileinputstream = new FileInputStream(s);
                   byte abyte0[] = new byte[fileinputstream.available()];
                   fileinputstream.read(abyte0);
                   URL url = new URL(s2 + "artius.rgm.rater.RaterServlet");
                   URLConnection urlconnection = url.openConnection();
                   urlconnection.setDoOutput(true);
                   urlconnection.setDoInput(true);
                   urlconnection.setUseCaches(false);
                   objectoutputstream = new ObjectOutputStream(urlconnection.getOutputStream());
                   objectoutputstream.writeObject(abyte0);
                   objectoutputstream.close();
                   objectinputstream = new ObjectInputStream(urlconnection.getInputStream());
                   Hashtable hashtable = (Hashtable)objectinputstream.readObject();
    And server is :
              out = new ObjectOutputStream(response.getOutputStream());
              in =new ObjectInputStream(request.getInputStream());
              byte[] b =(byte[])in.readObject(); //hangs here.
    Pradeep

  • Read file from URL and save to FTP

    Hi,
    I have worked in java few years back, now I am out of touch. My friend asked me to create an applet program for him which he can use to download a file from remote location to his ftp server.
    For e.g.
    File
    http://www.demo.com/filename.avi
    Saved to
    ftp://username:password@ftpsite_address/foldername
    I was searching for the classes which I can use to achieve this functionality.
    To save to FTP
    URL url = new URL("ftp://username:[email protected]/folder/filename");
    URLConnection urlconnection = url.openConnection();
    long l = urlconnection.getContentLength();
    OutputStream outputstream = null;
    outputstream = urlconnection.getOutputStream();Using the above code I can get the outputstream to which I can write.
    I am now stuck here, have some doubts.
    What all classes should I use to read a file like
    http://www.demo.com/filename.avi
    I know I can use URL to open connection to URLS and then streams to read the url.
    I am interested in knowing the class which I should use to read any type of file. File can be zip/avi/rar or anything else.
    What all method of the class should I use to read the file which will support all type of files.
    Which classes should I use to write the files. The files are going to be huge in terms of size.
    I have searched everywhere but every place different classes are used.
    Any help is appreciated.

    Ok now I have started coding but facing a problem.
    [PHP]try {
         URL url = new URL("http://url_to_file/test.txt");
         URLConnection urlconnection = url.openConnection();
         long l = urlconnection.getContentLength();
         fTextArea.append("Content Length = " + l);
         BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
         String line;
         while ((line = in.readLine()) != null)
              fTextArea.append("\n"+line);
         in.close();
    } catch (Exception e) {
    fTextArea.append(e);
    return;
    [PHP]
    When I run this code locally it works fine but when run in browser it shows security exception
    java.security.AccessControlException: access denied (java.net.SocketPermission site:80 connect,resolve)
    What should I do to resolve this error. Sorry for being such a noob but do not have much info about this.

  • How to writing an image from my applet to my apache webserver

    hi everyone,
    i have a big problem, writing an image from my applet to my apache
    webserver. i tried three way's of writing that file. every way was
    described in forums to solve this problem, but non of them worked and
    i don't know why. i'll give you the code of my writing-methods and
    describe, what happen when i test them, in order someone of you can
    give me an usefull tip, where the problem is.
    as inputparameter i give my method a new URL referring to
    http://localhost/test.jpg (this is the same directory, where my applet
    is loaded from, so i should have reading and writing permission,
    havn't i? while i'm developing, my applet runs on the same pc as my
    webserver, just in case you're wondering about localhost) and a
    selfmade BufferedImage (i already testet if it is not null and shows
    the correct things ... all ok).
    1. try:
    private void writeImageToServer(URL fileURL,BufferedImage img){
    try {
    URLConnection urlConnection = fileURL.openConnection();
    urlConnection.setDoOutput(true);
    OutputStream urlout = urlConnection.getOutputStream();
    BufferedOutputStream out = new BufferedOutputStream(urlout);
    ImageIO.write(img,"jpg",out);
    out.close(); // i also tried without this line -> same result
    // additionally a question: do i need
    out.close()?
    catch( IOException e ){
    e.printStackTrace();
    result:
    test.jpg doesn't appear in the webroot. but some very strange messages
    in the error.log of my apacheserver:
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageOutputStreamSpi
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageReaderSpi
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageInputStreamSpi
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageWriterSpi
    [Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
    exist: c:/programme/apache
    group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageTranscoderSpi
    i cannot explain this lines to myself, because my apache should have
    nothing to do with java. all my javacode is executed on the client
    side in the browser. do this messages mean i have to add the ImageIO
    package from the sdk to my jar-applet. the jre, used by my iexplorer,
    doesn't contain this files in the meta-inf/services directory of
    rt.jar, but that's version 1.4.2_03, the same as my sdk, and the
    rt.jar contains the corresponding classfiles at javax.imageio.spi. so
    i'm realy confused by this messages.
    2. try:
    private void writeImageToServer(URL fileURL,BufferedImage img){
    try {
    URLConnection urlConnection = fileURL.openConnection();
    urlConnection.setDoOutput(true);
    OutputStream urlout = urlConnection.getOutputStream();
    BufferedOutputStream out = new BufferedOutputStream(urlout);
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    encoder.encode(img);
    out.close(); // same comments as above
    catch( IOException e ){
    e.printStackTrace();
    result:
    nothing. no error-messages in the error.log, no exceptions in the
    java-console and no test.jpg in the webroot. i searched my whole
    harddrives for it: nothing. isn't this the way, the JPEGImageEncoder
    works?
    3. try:
    private void writeImageToServer(URL fileURL,BufferedImage img){
    try {
    File file = new File(fileURL.toString);
    file.createNewFile();
    BufferedOutputStream out = new BufferedOutputStream(new
    FileOutputStream(file));
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    encoder.encode(img);
    out.close(); // same comments as above
    catch( Exception e ){
    e.printStackTrace();
    result:
    the SecurityManager denies this action with "access denied" while
    calling createNewFile(). well, this way was dedicated to run from an
    application, not from an applet. i'd have to sign my applet to get the
    rights to do this, or i can edit java.policy on my client, what i
    don't want, because i cannot do this on every client, the applet will
    run, when i'm finished with it. this brings me to the question: does
    anybody know's how to sign my applet and give it full access to the
    harddrive and the webserver without paying 400$ to VeriSign for a
    commercial CA? i want to do this by myself, without paying anything
    and without giving a lot of information to another company.
    i would realy appreciate, if someone could give me a hint where i am
    wrong or how to do this correct.
    thank you very much
    [email protected]

    You hold several misconceptions. The first is that an applet can write to a server without help from the server. That will never work on a real server (though it might work in testing, if the server is on the same PC as the applet). Applets cannot get a File object that points to any place on the server.
    If you write a servlet designed for accepting image uploads, the applet can communicate back to that servlet and feed it the bytes of the image. There are other technologies that can replace the servlet, of course (PHP, ASP..) but I mention that because you say you are running Apache - and that is very Java oriented.
    For more help on servlets, try the [Web Tier APIs - Java Servlet|http://forums.sun.com/forum.jspa?forumID=33] forum.

  • Applet does not work with a proxy server.URgent

    Hi,
    I have an asp page being hosted from a IIS server.
    The asp page has an applet which gets data from a server side component which is hosted as a service on the server side.For connection to the server I am using URLConnection object and trying to connect over a TCP connection.
    The problem occurs when I use an proxy in the middle.
    I have changed the browser settings to include the proxy.
    The following is the error I recieve:
    Full :http://172.25.11.63:4590/
    <-------------------------------->
    OPening input stream
    in Run ::::
    ERROR: Created data socket but can't open stream on
    it.172.25.11.63:4590//
    172.25.11.63:4590//
    java.io.FileNotFoundException: 172.25.11.63:4590//
         at com/ms/net/wininet/http/HttpInputStream.connect
         at com/ms/net/wininet/http/HttpInputStream.<init>
         at com/ms/net/wininet/http/HttpURLConnection.createInputStream
         at com/ms/net/wininet/WininetURLConnection.getInputStream
         at TalkClientApplet.rendezvous
         at TalkClientApplet.actionPerformed1
         at TalkClientApplet.start
         at com/ms/applet/AppletPanel.securedCall0
         at com/ms/applet/AppletPanel.securedCall
         at com/ms/applet/AppletPanel.processSentEvent
         at com/ms/applet/AppletPanel.run
         at java/lang/Thread.run
    ...Disconnecting.
    Following is my code.
    url = new URL("http://" + host +":"+i);
    urlconnection = url.openConnection();
    urlconnection.setDoOutput(true);
    urlconnection.setDoInput(true);
    System.out.println("Successfully opened the URL connection at " + "http://" + host + ":" + i );
              System.out.println ("Protocol: " + url.getProtocol());
              System.out.println ("Host :" + url.getHost());     
              System.out.println ("Port :" + url.getPort());
              System.out.println ("File :" + url.getFile() );
              System.out.println ("Full :" + url.toExternalForm());
              System.out.println ("<-------------------------------->");
    os = new BufferedWriter(new OutputStreamWriter(urlconnection.getOutputStream()));
    System.out.println("OPening input stream ");
    // is = new DataInputStream(urlconnection.getInputStream());
         System.out.println(urlconnection.getInputStream());
    is = new DataInputStream(urlconnection.getInputStream());
    The exact place where I get the error is whn i call URLConnection.openInputStream().
    Usually this error comes with a malformed URL.But the same code words without a proxy.Also I am not making any changes to my code in both scenarios that is with or without proxy.
    Please help.This is urgent and a showstopper

    Thanks for your nice solution, but unfortunatelly it does not work with lines longer than 100 chars with Netscape. It works fine with IE and appletviewer too.
    Example:
    I use this code:
    try {
                URL url = new URL(protocol,hostName,portNumber,URLstring);
                InputStream in = url.openStream();
                BufferedInputStream bis = new BufferedInputStream(in);
                StringBuffer input = new StringBuffer(60);
                int c;
                while ((c = bis.read()) != -1){
                    System.out.print((char)c);
                    input.append((char)c);
                bis.close();
                dataFromServer = input.toString();
            catch(Exception ex) {
                ex.printStackTrace();
            }I use input file test.html with exactly 100 chars ('a')
    Netscape Java Console:
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadataFromServer : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaI use input file test.html with exactly 101 chars ('a')
    Netscape Java Console:
    ?JL?yyxk?cedataFromServer : ?

  • How can i login to a website using java

    hi,
    i tried to write a java program to which will take username and password and login to a given site. but some how its not working. i am actually trying to login to the follwoing website:
    https://roundup.ffmpeg.org/roundup/ffmpeg/
    can anyone provide some example program to login to this website.
    br
    mahbubul-syeed

    Hi,
    i am really sorry... but i am new in this forum and i did not know this. here is my code that i have written. it did not show any error and displays the content of the page but did not logged in. please give your comment.. i badly need a solution.
    package myUtility_files;
    import java.net.*;
    import java.io.*;
    public class LogInByHttpPost {
         //private static final String POST_CONTENT_TYPE = "application/x-www-form-urlencoded";
    private static final String LOGIN_ACTION_NAME = "submit";
    private static final String LOGIN_USER_NAME_PARAMETER_NAME = "__login_name";
    private static final String LOGIN_PASSWORD_PARAMETER_NAME = "__login_password";
    private static final String LOGIN_USER_NAME = "mahbubul";
    private static final String LOGIN_PASSWORD = "mahbubul007";
    private static final String TARGET_URL = "http://roundup.ffmpeg.org/roundup/ffmpeg/";
    public static void main (String args[])
    LogInByHttpPost httpUrlBasicAuthentication = new LogInByHttpPost();
    httpUrlBasicAuthentication.httpPostLogin();
    public void httpPostLogin ()
    try
    // Prepare the content to be written
    // throws UnsupportedEncodingException
    String urlEncodedContent = preparePostContent(LOGIN_USER_NAME, LOGIN_PASSWORD);
    HttpURLConnection urlConnection = doHttpPost(TARGET_URL, urlEncodedContent);
    //String response = readResponse(urlConnection);
    System.out.println("Successfully made the HTPP POST.");
    //System.out.println("Recevied response is: '/n" + response + "'");
    BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));
                   String inputLine;
                   while ((inputLine = in.readLine()) != null)
                        System.out.println(inputLine);
    catch(IOException ioException)
         ioException.printStackTrace();
    System.out.println("Problems encounterd.");
    private String preparePostContent(String loginUserName, String loginPassword) throws UnsupportedEncodingException
    // Encode the user name and password to UTF-8 encoding standard
    // throws UnsupportedEncodingException
    String encodedLoginUserName = URLEncoder.encode(loginUserName, "UTF-8");
    String encodedLoginPassword = URLEncoder.encode(loginPassword, "UTF-8");
    String content = "login=" + LOGIN_ACTION_NAME +" &" + LOGIN_USER_NAME_PARAMETER_NAME +"="
    + encodedLoginUserName + "&" + LOGIN_PASSWORD_PARAMETER_NAME + "=" + encodedLoginPassword;
    return content;
    public HttpURLConnection doHttpPost(String targetUrl, String content) throws IOException
    HttpURLConnection urlConnection = null;
    DataOutputStream dataOutputStream = null;
    try
    // Open a connection to the target URL
    // throws IOException
    urlConnection = (HttpURLConnection)(new URL(targetUrl).openConnection());
    // Specifying that we intend to use this connection for input
    urlConnection.setDoInput(true);
    // Specifying that we intend to use this connection for output
    urlConnection.setDoOutput(true);
    // Specifying the content type of our post
    //urlConnection.setRequestProperty("Content-Type", POST_CONTENT_TYPE);
    // Specifying the method of HTTP request which is POST
    // throws ProtocolException
    urlConnection.setRequestMethod("POST");
    // Prepare an output stream for writing data to the HTTP connection
    // throws IOException
    dataOutputStream = new DataOutputStream(urlConnection.getOutputStream());
    // throws IOException
    dataOutputStream.writeBytes(content);
    dataOutputStream.flush();
    dataOutputStream.close();
    return urlConnection;
    catch(IOException ioException)
    System.out.println("I/O problems while trying to do a HTTP post.");
    ioException.printStackTrace();
    // Good practice: clean up the connections and streams
    // to free up any resources if possible
    if (dataOutputStream != null)
    try
    dataOutputStream.close();
    catch(Throwable ignore)
    // Cannot do anything about problems while
    // trying to clean up. Just ignore
    if (urlConnection != null)
    urlConnection.disconnect();
    // throw the exception so that the caller is aware that
    // there was some problems
    throw ioException;
    br
    mahbubul-syeed
    Edited by: mahbubul-syeed on Jun 11, 2009 5:07 AM

  • Problem while Calling a CGI pgm From Java with code sample

    Hey guys,
    I am calling a CGI program from java servlet, while calling cgi program I am passing encoded(Base64) content via post process,
    My problem is the encoded data is not posted as expected, the encoded data is corrupting. But when I send encoded data in a text file, cgi program is perfectly decoding and working fine.
    Here I am doing Base64 encoding as per requirement, I cannot avoid this encoding.
    My doubt is about OutputStreamWriter constructor argument , In OutputStream Constructor I am passing one argument is OutputStream object and another argument is encoding type. I tried with ASCII, US-ASCII & UTF-8 .
    My code is as follows, please help me to resolve this issue.
    URL url = new URL("CGI server path");
    URLConnection urlConnection = url.openConnection();
    urlConnection.setDoOutput(true);
    OutputStream os = urlConnection.getOutputStream();
    BufferedOutputStream buffer = new BufferedOutputStream(os);
    OutputStreamWriter  writer = new
                                                   OutputStreamWriter(buffer, "US-ASCII");
    writer.write(encodedPDF-Content);
    writer.write("\r\n");
    writer.flush();
    writer.close();
    here encodedPDF-Content is String and it's size is 9565 bytes

    Whenever you read something in java into string (with Reader implementation) it expects source to contain text in encoding you specified. It then decodes it and makes 16 bit unicode string from it. Whenever you store string using Writers it does reverse operation with specified encoding (may be different than this which you used to read source) and stores text as a sequence of bytes made of 16 bit unicode string. So, passing text back and forth between programs with the help of files or I/O you can make mistake at both reading and writing encoding. Check for it.
    Now, when C programm or other application reads file it may take another assumptions about encoding or may even completly ignore it and read source as a binary file. Then, if you have a source text as a file and have to pass it to other application never do it using Reader/Writer. User raw InputStream/OutputStream instead what will preserve all information unchanged.
    here encodedPDF-Content is String and it's size is 9565 byteHow id you get this info? String.length() gets you how many chars is in it, it will be half the number of bytes. If you see your input file beeing 9565 bytes long, see my above statements.

Maybe you are looking for