openConnection () generates ClassCastException -Weblogic Servlet

Discussions

Web tier: servlets, JSP, Web frameworks: openConnection () generates ClassCastException -Weblogic Servlet

  1. Hi,

    I am trying to open a secure connection to another server from a servlet using JSSE. I am using url.openConnection () to get the HttpsURLConnection.
    The servlet when deployed on Apache webserver work fine, the connection is established without any problem, however when I try the sam servlet on WEBLOGIC 5.1 SP9 ClassCastException is thrown.

    Looks like under weblogic environment url.openConnection () returns an instance of weblogic.net.http.HttpsURLConnection instead of javax.net.ssl.HttpsURLConnection.

    Is there any way to configure the weblogic to return java HttpsURLConnection object rather that weblogic object?

    Thanks in advance
  2. Hi,

    I am trying to open a secure connection to another server from a servlet using JSSE. I am using url.openConnection () to get the HttpsURLConnection.
    The servlet when deployed on Apache webserver work fine, the connection is established without any problem, however when I try the sam servlet on WEBLOGIC 5.1 SP9 ClassCastException is thrown.

    Looks like under weblogic environment url.openConnection () returns an instance of weblogic.net.http.HttpsURLConnection instead of javax.net.ssl.HttpsURLConnection.

    Is there any way to configure the weblogic to return java HttpsURLConnection object rather that weblogic object?

    Thanks in advance