Socket Connection Vs HTTP connection

I'm trying to get a better understanding of which to use to connect a midlet to a servlet.
Does anybody know of any advantages socket connections have over http connections i.e performance or anything you can think of? Or is there any reason http connections seem like better practice for this type of communication (servlet-midlet) besides portability across MIDP
I'll appreciate your opinions

HTTP is a particular kind of socket connection. If what you're doing is plain old HTTP, then HttpConnection is easier to use. If you need something more than HTTP, then use SocketConnection.

Similar Messages

  • Remote connection via http connection-URL access

    Hello all,
    I would like to connect to the customer Business object system from our solution manager. The customer has configured http connection and has opened the connection in marketplace and has maintained http connection-URL access. The URL has also been maintained.
    I have added the corresponding entry also in my hosts file. But i am not able to access the customer URL.
    Anyone please tell me how to do remote connection for the connection type "http connection - URL access".
    Thanks,
    Aishwarya.

    Hi Tim,
    I am getting "The page cant be displayed" error while trying the BO system's URL in my browser.
    Please tell me which of the below methods i can use:
    1. By directly connecting to the BO system URL from the browser (is it possible?)
    2. By using VPN connection
    3. By installing diagnostic agent in solution manager
    4. By following the steps in this link:
    Establishing a Connection Using a Destination (SM59) - Components of SAP Communication Technology - SAP Library
    Regards,
    Aishwarya.

  • Can't connect to HTTPS connections in all browsers suddenly

    Here's the issue, I suddenly noticed I cant connect in an HTTPS connection, they all have a line thru them, so while I am logged in here, the https has a red line through it. The only thing I've installed is Calibre and some plugins to go with my Kindle DX. What are my option to fix?

    can't not connect to https connections in all browsers suddenly..
    me too..
    Surprise surprise.

  • TMG Proxy not connecting internal HTTPS connection

    Dear All,
    I am working government org, and there are many internal HTTP and HTTPS sites which is going/thought to proxy tmg(2010) server.internal clients are able to connect to http sites but they are not connect to https sites and all server application are come
    to internal intranet network
    i am trying to add https access rule and some basic troubleshooting but governmant clients not able to open internal application https sites.
    my question is that is that possible?
    if possible how to make a rule or redirect https connection?
    Thanks for advanced

    Hi,
    Pelase check the article below.
    In some business scenarios, internal clients protected by Microsoft Internet Security and Acceleration (ISA) Server 2004 may require access to secure Internet Web sites. This scenario can be configured as follows:
            Configure a tunneled Secure Sockets Layer (SSL) end-to-end secure HTTP (HTTPS) connection between the internal client and the external Web site.
            Configure clients to request the external Web site using Hypertext Transfer Protocol (HTTP), and then redirect the request from the ISA Server computer to the site using HTTPS.
    Configuring Internal Client Acess to Web Sites over SSL
    https://technet.microsoft.com/en-us/library/cc302568.aspx
    Best Regards,
    Joyce
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Making http connection

    hi..
    i try to make a connection to servlet when i press the submit button from midlet. the submit button getting the value from the textfield to query data from database. the db connection is ok, but im still confuse about the http connection code to servlet from midp to servlet. my server name is http:\\localhost:8000
    thank you...

    HttpConnection hc=null;
    String urlstring="http://localhost/test.cgi"
    hc=(HttpConnection) Connector.open(urlstring);
    this is how u connect through http connection
    the method u mentioned is for socket connection

  • How  to create and test HTTP connection for proxy

    HI
    Can anybody help me by providing step by step guide for how to create a HTTP connection for inbound abap proxy?
    How i will get sure that connection is working properly?
    Thanks
    Debraj

    Hi Debraj,
       You should be able to do that in SM59 of the XI Box.
    Create the connection under "HTTP Connections to R/3 System".
    Provide the Target Host IP Address.Service Number and Path Prefix.
    Select the logon procedure as SAP Standard.
    SSL Inactive.
    Provide Logon details.
    Regards,
    Ravi

  • HTTP Connections to Ext. Server - SM59 - Application Server

    Hi Experts,
    first of all its my first post, I hope I can provide any infos you need to give me some advice.
    Well, I've setup in SM59 a new connection-type "HTTP Connections to Ext. Server" (Type G). It is a stupid webserver in our LAN that returns a simple "hello world" (i've setup this webserver as first step to test the functionality of this connection type). No authentication or any other specialities like proxies or SSL.
    Now, if i test the connection out of the central instance, everything runs fine, I receive an answer.
    BUT: if i make this test from one of our application servers i get nothing at all. No output, no failure, simply nothing which means in my opinion that its not working.
    What do you think about this?
    Thanks in advance
    Edited by: Stefan Gruber on Feb 4, 2009 1:25 PM

    >ah, I see! There has to be running a service "icm/server_port_xxx = PROT=HTTP, PORT=NNNN".
    Exactly !
    I usually put this parameter in the DEFAULT profile because I want all my application servers to listen to the same HTTP port.
    >Merci beaucoup!
    You are welcome !
    Olivier

  • Howto connect with http to a socket - header problem?

    Hi
    i am writing a midlet that connects via http to a server with a java socket.
    i can receive the data, but when i try to return data to the sockets outputstream,
    the midlet doesnt receive it and waits endlessly.
    Do i have to send a http header in the return connection?
    Does anybody have another idea?
    if not, how do i send the header and how should it look like?
    Thanks for your help.
    Mathis

    if you use a socket connection you need to talk the language the server understands, means, you need to send the commands that are specified in the rfc for the protocol you use. means, talking to a webserver is different that talking to pop3 server or to a ftp server.....
    and, just for your information: sockets are not requiered in the j2me specification, means that not all vendors have implemented socket protocol into their devices. only required is http.

  • Connection refused when trying to getOutputStream from https connection

    Hi all !
    I want to make an https connection with a server to send/get the request/response
    What can be the cause of the following error in the following code testHttps.java?
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at Test.testHttps.main(testHttps.java:46)
    Exception in thread "main" java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
    at Test.testHttps.main(testHttps.java:51)
    testHttps.java
    package Test;
    import java.io.;
    import java.net.;
    import javax.net.ssl.*;
    public class testHttps {
    public static void main(String args[]) throws Exception {
    //System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
    // Create a trust manager that does not validate certificate chains
    TrustManager[] trustAllCerts = new TrustManager[]{
    new X509TrustManager() {
    public java.security.cert.X509Certificate[] getAcceptedIssuers() {
    return null;
    public void checkClientTrusted(
    java.security.cert.X509Certificate[] certs, String authType) {
    public void checkServerTrusted(
    java.security.cert.X509Certificate[] certs, String authType) {
    // Install the all-trusting trust manager
    try {
    SSLContext sc = SSLContext.getInstance("SSL");
    sc.init(null, trustAllCerts, new java.security.SecureRandom());
    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
    } catch (Exception e) {
    System.out.println("Error" e);
    // Now you can access an https URL without having the certificate in the truststore
    try {
    URL url = new URL("https://..............");-->//address of the server given here
    URLConnection conn = url.openConnection();
    HttpsURLConnection urlConn = (HttpsURLConnection) conn;
    urlConn.setDoOutput(true);
    OutputStreamWriter wr = null;
    try{
    wr = new OutputStreamWriter(conn.getOutputStream());
    catch(Exception e){
    e.printStackTrace();
    BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
    String str;
    while( (str=in.readLine()) != null) {
    System.out.println(str);
    } catch (MalformedURLException e) {
    System.out.println("Error in SLL Connetion" +e);
    HostnameVerifier hv = new HostnameVerifier()
    public boolean verify(String urlHostName, SSLSession session)
    System.out.println("Warning: URL Host: " urlHostName " vs. "
    session.getPeerHost());
    return true;
    want to ignore certificate validation.
    plese help me..
    hi brucechapman, as you suggested me, i posted in Core API- networking forum, now please gimme a solution
    Thanks in advance.

    hi brucechapman,
    ran the NetTest program, got the following exception:
    trigger seeding of SecureRandom
    done seeding SecureRandom
    Exception in thread "main" java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at java.net.URL.openStream(Unknown Source)
         at Test.NetTest.main(NetTest.java:40)
    NetTest.java:40 -- InputStream is = url.openStream(); at this ling throwing exception.
    For the following program, i have added the argument -Djavax.net.ssl.trustStore=cacerts
    i have exported the certificate from IE and added to the keystore.
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.security.Security;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    public class Communicator {
    public static void main(String[] args) {
    try {
    int port = 34443;
         String strReq = "xml content ";
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
    SSLSocket socket = (SSLSocket) factory.createSocket("jyoti-win2k8-32", port);
    //Writer out = new OutputStreamWriter(socket.getOutputStream());
    //out.write("GET http://" + "hostname" + "/ HTTP 1.1\r\n");
    // out.write("\r\n");
    //out.write(strReq);
    //out.flush();
    OutputStreamWriter wr = null;
    try{
         wr = new OutputStreamWriter(socket.getOutputStream());
         catch(Exception e){
              e.printStackTrace();
         System.out.println("got output stream");
         try{
         wr.write(strReq);
         //System.out.println("response code : "+conn.getResponseCode());
         System.out.println("written");
         wr.flush();
         catch(IOException e){
              e.printStackTrace();
    InputStreamReader is = new InputStreamReader(socket.getInputStream(),"UTF8") ;
         BufferedReader rd = new BufferedReader(is);
         String line;int count=0;
         System.out.println("rd "+rd);
         while ((line = rd.readLine()) != null) {
              System.out.println("line "+line );
              System.out.println(count++);
              // Process line...
         System.out.println(count);
    rd.close();
    BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    int c;
    while ((c = in.read()) != -1) {
    System.out.write(c);
    //out.close();
    in.close();
    socket.close();
    } catch(IOException ex) {
    ex.printStackTrace();
    Exception :
    javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
         at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
         at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
         at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
         at sun.nio.cs.StreamEncoder.flush(Unknown Source)
         at java.io.OutputStreamWriter.flush(Unknown Source)
         at Test.Communicator.main(Communicator.java:55)
    Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
         at sun.security.validator.PKIXValidator.<init>(Unknown Source)
         at sun.security.validator.Validator.getInstance(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
         ... 7 more
    Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
         at java.security.cert.PKIXParameters.setTrustAnchors(Unknown Source)
         at java.security.cert.PKIXParameters.<init>(Unknown Source)
         at java.security.cert.PKIXBuilderParameters.<init>(Unknown Source)
         ... 19 more
    java.net.SocketException: Socket is closed
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getInputStream(Unknown Source)
         at Test.Communicator.main(Communicator.java:66)
    please help me and provide me suggestion/solution. how to get rid off this trustanchor paramater exception
    what is it actualy?
    Thanks in advance.

  • Server closing the http connection

    We are trying to load test our app which takes an xml message thru
              http request. The request to our app is redirected from CSS (Cisco
              content services switch) load balancer. Our app is running in a
              clustered environment with 2 servers.
              When we tried to post 100 simultaneous messages (in turn 100 http
              requests) originating from the same java client program running on
              only one machine, we get an excception "Connection reset by peer:
              JVM_recv
              Socket write error".
              All these 100 requests are simultaneous and like that we ran the tests
              4 consecutive times without any delay.
              When we ran the tests thru the weblogic proxy server (the one that
              uses HttpClusterServlet) we did not face any connection issues like
              this.
              I'm wondering if this is a load-balancer problem or a weblogic
              problem.
              

    We're doing all the url connections thru our java program which
              creates 100 simultaneous threads which in turn becomes 100
              simultaneous posts. Someone is also suggesting that there is a time
              limit that CSS has before it received the content frame from the
              client once it opens the http connection. I'm not sure if that is
              true.
              "Vyas" <[email protected]> wrote in message news:<[email protected]>...
              > Cisco load balancer sets its own cookie to redirect traffic to the same server, this
              > cookie somehow seems to interfere with weblogic session cookie.
              > We had problems because of this in a production environment with
              > users interfering with each other's session.
              >
              > So far neither weblogic nor cisco owned up to anything , however weblogic gave us
              > a patch admitting to some problems with parsing cookies when other cookies are involved.
              >
              > I am not sure if the problems are the same for you,
              > what do you mean 100 simultaneous requests ?
              > through browser ? through httpurlconnection ?
              >
              > [email protected] (marsaroid) wrote:
              > >We are trying to load test our app which takes an xml message thru
              > >http request. The request to our app is redirected from CSS (Cisco
              > >content services switch) load balancer. Our app is running in a
              > >clustered environment with 2 servers.
              > >
              > >When we tried to post 100 simultaneous messages (in turn 100 http
              > >requests) originating from the same java client program running on
              > >only one machine, we get an excception "Connection reset by peer:
              > >JVM_recv
              > >Socket write error".
              > >
              > >All these 100 requests are simultaneous and like that we ran the tests
              > >4 consecutive times without any delay.
              > >
              > >When we ran the tests thru the weblogic proxy server (the one that
              > >uses HttpClusterServlet) we did not face any connection issues like
              > >this.
              > >
              > >I'm wondering if this is a load-balancer problem or a weblogic
              > >problem.
              

  • Outbound HTTP  - Connection fails

    Hello,
    We are using Oracle 10.1.2 B2B Integration to test outbound XML messaging over HTTP 1.1. We get the following error when we try a outbound flow.
    Message Transmission Transport Exception
    Transport Error Code is OTA-HTTP-SEND-1005
    Stack trace
    =========
    StackTrace oracle.tip.transport.TransportException: [IPT_HttpSendConnectionRefused] HTTP connection is refused.
         at oracle.tip.transport.TransportException.create(TransportException.java:91)
         at oracle.tip.transport.basic.HTTPSender.send(HTTPSender.java:443)
         at oracle.tip.transport.b2b.B2BTransport.send(B2BTransport.java:283)
         at oracle.tip.adapter.b2b.transport.TransportInterface.send(TransportInterface.java:665)
         at oracle.tip.adapter.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1217)
         at oracle.tip.adapter.b2b.msgproc.Request.outgoingRequest(Request.java:701)
         at oracle.tip.adapter.b2b.engine.Engine.processOutgoingMessage(Engine.java:832)
         at oracle.tip.adapter.b2b.data.MsgListener.onMessage(MsgListener.java:531)
         at oracle.tip.adapter.b2b.data.MsgListener.run(MsgListener.java:344)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
         at java.net.Socket.connect(Socket.java:452)
         at java.net.Socket.connect(Socket.java:402)
         at java.net.Socket.<init>(Socket.java:309)
         at java.net.Socket.<init>(Socket.java:153)
         at HTTPClient.HTTPConnection.getSocket(HTTPConnection.java:3041)
         at HTTPClient.HTTPConnection.doConnect(HTTPConnection.java:3773)
         at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java:2849)
         at HTTPClient.HTTPConnection.handleRequest(HTTPConnection.java:2778)
         at HTTPClient.HTTPConnection.setupRequest(HTTPConnection.java:2564)
         at HTTPClient.HTTPConnection.Post(HTTPConnection.java:963)
         at oracle.tip.transport.basic.HTTPSender.send(HTTPSender.java:414)
    We are trying to POST to a HTTP URL in the internet. The end point details are
    oracle.tip.adapter.b2b.transport.TransportInterface:send TO Endpoint: 501 http://as2.preprod.1sync.org:4080/exchange/8380160030003
    Protocol = HTTP
    Version = 1.1
    Transport Header
    1Sync-TestHTTP
    Content-Transfer-Encoding:binary
    FROM:Oracle Development
    MESSAGE-ID:0A0A0A0A1132FF680DB000001904E0F0
    DATE:Fri, 15 Jun 2007 15:18:04 GMT
    Content-Type:text/plain; charset=us-ascii
    Connection:close
    We tried the following options
    #1
    oracle.tip.adapter.b2b.ProxyHost =
    oracle.tip.adapter.b2b.ProxyPort =
    #2
    oracle.tip.adapter.b2b.ProxyHost =www-proxy.us.oracle.com
    oracle.tip.adapter.b2b.ProxyPort = 80
    But in both cases the outbound fails with the same error.

    Ramesh,
    Thx again for your help.
    We were able to resolve the HTTP outbound errors by setting the following java.net properties to the opmn.xml file.
    http.proxySet
    http.proxyHost
    http.proxyPort
    E.g. -- here is a modified XML fragment.
    <category id="start-parameters">
    <data id="java-parameters" value="-server -Xms8M -Xmx512M -Dhttp.proxySet=true -Dhttp.proxyHost=www-proxy.us.oracle.com -Dhttp.proxyPort=80"/>
    </category>
    We still have one doubt though --
    There are several XML sections where there "start-parameters" are defined.
    Eg. -
    ias-component = OC4J, B2B, b2bmid.10.10.10.10
    Process-type = OC4J_B2B, B2BServer
    As of now we have added "-Dhttp.proxySet=true -Dhttp.proxyHost=www-proxy.us.oracle.com -Dhttp.proxyPort=80" to every of these sections.
    But which is the exact section to be modified for Outbound HTTP?

  • No redirection to different url upon http connections limit exceeded

    Hi,
    As of Standalone OC4j 10.1.2, if you want messages to be redirected to a different URL when the maximum connections limit is reached, you would include the HTTP redirect URL to max-http-connections tag inside server.xml.
    <max-http-connections max-connections-queue-timeout="120" socket-backlog="50"
    value="100">http://optional.redirect.url/page.jsp</max-http-connections>
    I have a standalone OC4j 10.1.3, and would like to be able to redirect to different URL when maximum connections limit is reached but the above max-http-connections does not work and I am not redirected to different URL when maximum connectionns limit is reached. I read user guide of OC4j 10.1.3 and there is no mentioning of max-http-connections at all. In there, they talk about limiting concurrency via http thread pool but there is no discussion as to the mechanism of redirecting users to a different URL where I can display a user friendly message to say "Server is busy, please try again later..." instead of browser display a message "Page cannot be displayed"..
    Please advice,
    Thanks

    Any thoughts on above issue ? please help.
    thanks
    Sam

  • Open HTTP connection failed

    Hi all.
    The environment is J2SDK4 + Tomcat4.0.4
    I tried to implement the WebClient.java in SUN/Marty Hall's book "Core Servlets and JavaServer Pages".
    Everything compiles okay. All the java and class files are in a package under the /examples folder in tomcat.
    When I invoke WebClient.html in "http://localhost:8080/examples/" I got this error:
    load: class com.omh.utilities.WebClient not found.
    java.lang.ClassNotFoundException: com.omh.utilities.WebClient
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
    ...etc...
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
    ...etc...
    Other servlets okay.
    Can someone point me in the right direction please.
    TIA :-)

    Oops, forgot about the dukes.
    Here is a more detailed description of my problem:
    My environment is j2sdk4 and TC404. I am trying to implement SUN/Marty hall's WebClient for administering host, port and requests. The code uses java.net's SocketUtil. e.g.
    (NetworkClient.java)
    Socket client = new Socket(host, port);
    handleConnection(client);
    protected void handleConnection(Socket client){
    PrintWriter out = SocketUtil.getWriter(client);
    BufferedReader in = SocketUtil.getReader(client);
    etc
    I'm not sure whether this is TC4 or a java related problem, but all java code compiles to class file okay.
    My path is $CATALINA_HOME/webapps/examples/
    In the server.xml I've uncommented the example Context, like this:
    (server.xml)
    <Connector className="...Ajp13Connector" ...etc...>
    <Connector className="org.apache.catalina.connector,http.HttpConnector
    port="8080" minprocessors="3" maxProcessors="10"
    enableLookups="true" acceptCount="3" debug="0"/>
    <Engine jvmRoute="blurb" name="blurb" defaultHost="localHost" debug="2">
    <Logger...>
    <Realm...>
    <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
    <Valve...>
    <Logger...>
    <Context path=/examples" docBase="examples"
    debug="0" reloadable="true" crossContext="true">
    </Context>
    In my TC log, I've this error:
    "GET /examples/com/omh/utilities/WebClient.class HTTP/1.1" 404 675
    On the java console, I have these errors (they tend to be very long and tedious):
    load: class com.omh.utilities.WebClient not found.java.lang.ClassNotFoundException: com.omh.utilities.WebClient     at sun.applet.AppletClassLoader.findClass(Unknown Source)     at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)     ...etc...Caused by: java.io.IOException: open HTTP connection failed.     at sun.applet.AppletClassLoader.getBytes(Unknown Source)     at sun.applet.AppletClassLoader.access$100(Unknown Source)
    ...etc...
    Other demo and example servlets and jsp that come with the standard install work find. Other stuff I put in examples work find as well.
    Is this a TC setup error on my part???
    TIA

  • Http connection / Accompli 008

    Hi,
    I'm currently developing a J2ME application for the Accompli 008.
    Everything works fine, but I'm having trouble making HTTP connections from the Accompli 008.
    I reduced the code that I only make a simple http-connection. The code works on the emulator and on a Siemens SL45i but the Accompli hangs. It connects to the Remote Access Server but then nothing happens. If I catch the java exception I see a "socket error".
    With the same settings it's possible to get an internet connection when I use the pre installed browser.
    Can you give me any help?
    Thanks in advance.

    Hello sir,
    i have tried your given suggestion and it work very well in WKT-tool
    kit emulator as well as sun one emulator .but my app is not running on
    real device i.e connection is not establish.I have tried all the
    solutions as for as my knowledge but i could not solve the
    problem.Please help me I will be very thankful to you...
    My code is as here....
    class ThreadedConnection extends Thread
    ThreadedConnection()
    start();
    public void run() {
    IMEI=txtenterIMEIno.getString();
    String url ="some url";
    try
    HttpConnection http = (HttpConnection) Connector.open(url);
    OutputStream oStrm = http.openOutputStream();
    http.setRequestMethod(HttpConnection.GET);
    http.setRequestProperty("Content-Type","application/x-www-form-urlencod
    ed");
    http.setRequestProperty("User-Agent","Profile/MIDP-1.0
    Configuration/CLDC-1.0");
    http.setRequestProperty("Content-Type", "text/plain");
    http.setRequestProperty("IF-Modified-Since","20 Jan 2001
    16:19:14 GMT");
    http.setRequestProperty("Connection", "close");
    InputStream iStrm = http.openInputStream();
    int length = (int) http.getLength();
    if (length != -1)
    byte serverData[] = new byte[length];
    iStrm.read(serverData);
    currentInfo = new String(serverData);
    else
    ByteArrayOutputStream bStrm = new ByteArrayOutputStream();
    int ch;
    while ((ch = iStrm.read()) != -1)
    bStrm.write(ch);
    currentInfo = new String(bStrm.toByteArray());
    bStrm.close();
    System.out.println("File Contents: " +currentInfo);
    }catch (Exception e) {}
    }

  • Can't open HTTP connection to a proxied server

    Greetings,
    Trying to open an HTTP connection to a web server. The connection is rejected
    by the proxy. In order to bypass the proxy, I used to code something like:
    System.setProperty("http.proxyHost", hostname) ;
    System.setProperty(“http.proxyPort”, port);
    Doing that, works properly in a standalone Java application. As soon as the same
    code is implemented in a WebLogic 8.1 deployed EJB, it fails with the following
    stack dump:
    <May 10, 2004 7:12:07 PM CEST> <Info> <net> <000903> <Could not open connection
    with host: www.rect.cofacescrl.com and port: 80.>
    04-05-10 19:12:07,788 FATAL SearchCompanyBean - Error while attempting to connect
    to Source
    java.net.ConnectException: Tried all: '1' addresses, but could not connect over
    HTTP to server: 'www.rect.cofacescrl.com', port: '80'
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:255)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:307)
    at weblogic.net.http.HttpClient.<init>(HttpClient.java:126)
    at weblogic.net.http.HttpClient.New(HttpClient.java:192)
    at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:115)
    at com.coface.STR.scrl.ScrlSearchAdapter.search(Unknown Source)
    at com.coface.STR.tuxedo.SearchCompanyBean.service(Unknown Source)
    at com.coface.STR.tuxedo.SearchCompanyBean_fbx9fb_EOImpl.service(SearchCompanyBean_fbx9fb_EOImpl.java:46)
    at com.coface.STR.tuxedo.SearchCompanyBean_fbx9fb_EOImpl_WLSkel.invoke(Unknown
    Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:159)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:263)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:230)
    at com.coface.STR.tuxedo.SearchCompanyBean_fbx9fb_EOImpl_WLStub.service(Unknown
    Source)
    at weblogic.wtc.gwt.InboundEJBRequest.execute(InboundEJBRequest.java:419)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210
    Suggestions anybody before my boss gets nervous about that ?
    Many thanks in advance,
    Alexandre CUENCA

    I think the data you are seeing is part of the telnet negotiation sequence. http://www.faqs.org/rfcs/rfc854.html
    A telnet session is more complex than opening a TCP socket.
    I would suggest using the LabVIEW Internet Toolkit for telnet communications.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

Maybe you are looking for

  • Driver Program for Smartform

    i want the name of the driver program & form name in smartform for Invoice . kindly help.tks

  • What is the Best way to set up Photoshop on a new PC with multiple Hard drives and SSD?

    Hi hope someone can help. I am considering buying a new PC (see below).  We want to run both Photoshop and Lightroom on the PC. We will also be using it as a Media centre – that's why I have two big hard drives. I would like to know the best way to i

  • Script to Stop and Start Oracle Meter Data Management

    Hi, This is my first post in Oracle forums so if i open this in the wrong thread please forgive me. I tried to create a windows batch script to stop and start Oracle Meter Data Management but i can´t. @echo off D:\spl\MDMDEV\bin\splenviron.cmd -e MDM

  • Connect to non standard ftp port

    Hi , Is it possible for PI to connec to non standard ftp port to pick files using ftp adapter?? how abt non standard ftp servers?

  • Can't init midi playback

    I have troubles with midi initialisation. I use SB Live and ALSA drivers. mp3/wav/ogg playing so good, but I can't load midibank into SB with awesfx-0.5.d (and awesfx-0.4.4 too) from http://www.alsa-project.org/~iwai/awedrv.html May be exist another