HTTP(S) vs Sockets/SecureSockets - Can I use HTTP(s)?

Good Day,
I'm writing client/server, currently using Sockets (actually Secure Sockets, but I don't think SSL actually enters into the overall question). In order to not worry about complaints from firewalls or proxies, it would seem easiest to instead be using HTTP(S) so we look just like a browser and web server.
However, it appears using the Java APIs you cannot avoid the open-request-response-close paradim, i.e. there is no way to keep the connection open (no persistence).
I can put "connection: keep-alive" in the mime header, but Java apparently forces me to close the input stream to send (i.e. POST) the client transmission, which closes the connection.
Is there a way (JDK 1.4) to keep an Http(s)UrlConnection open for continuous communication? The reason I care btw is because it is a heavily interactive data entry application, and response speed is crucial.
Or is it possible I am worrying about nothing because the overhead of opening/closing the Http(s)UrlConnection is minor? (I am assuimg the TCP/IP connection and the SSL session remain open regardless, and it is just the Java open/close UrlConnection overhead). I am thinking about how to test the various scenarios, but most of that is still ahead of me, and it's always useful to get other experienced comments.
Thanks in advance... Roger
p.s. I'm also worried that even if my client and my server think the connection is persistent, some proxy in the pipe might think otherwise. Is that an issue?

Have u got ur doubt cleared? lf no, l've a soln.
u cant retain the same urlconnection for many req-res pairs.
one conn is for one communication only. u cant keep the conn alive.
lt takes much time for first secure conn. lf it is in a loop, next subsequent conn takes very less
time. if u already know the no.of data to be sent, use a loop send the data with the same conn object.
--Rams                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Can i use the same socket to connect to more than one servers

    hi,
    I'm new to java. I want to know whether a socket created using Socket() constructor can be used to connect to multiple servers, not necessarily at a particular point of time. ie, i want to connect to various servers using a single socket and register some info abt them, possible using a loop, one by one. I use connect() method to connect to particular server.
    In other words is Socket class is mutable.
    Edited by: itsraja on Feb 25, 2008 5:50 AM

    In short, I don't think so.
    Setting the server name for a socket is in the constructor.
    Socket s = new Socket("localhost", 501);I don't believe that there are any functions, such as:
    s.setHost("localhost");
    s.setPort(501);However, JavaDocs suggests that when you use the no-args constructor, your class becomes an automatic SocketImpl class, but you can't reach any of its variables unless you derive from the class, itself. But that's probably a bigger headache than it's worth.
    Now TECHNICALY, if you didn't want to create a new variable, you could use:
    Socket s = new Socket("localhost", 501);
    s.close();
    s = new Socket("remotehost", 502);
    s.close();However, this is still creating a new instance and thus a new object in memory.
    I hope this answers your question.
    Let us know exactly what you're trying to do for a more exact answer.
    ~Derek

  • Can I use third party web services that communicate via http-post with webui builder?

    Hi, 
    I have 5 computers (services) that are controlled via http-post. 3 of these services are implemented as labview webservices, 1 is labview socket (with python http-wrapper) and the last one is implemented with c# (lighttpd + cgi). 
    Can I use webui builder to controll all of them? Or, what is the simplest change so I can use webui builder?
    What I would like to do, is to change the current javascript-UI to labview-webui. For the interfaces implemented with labview webservices, this is not a problem. For non-labview services, I don't know if it is even possible.
    br,
    Juha

    To add to Mike's answer, the only caveat is that the server needs an appropriate clientaccesspolicy.xml file at the root level (http://yourserver/clientaccesspolicy.xml), or a completely open crossdomain.xml file, for the editor and built apps to be able to communicate with it. There's a help topic which explains this in the context of LV web services, but it's true for Web UI Builder to be able to communicate with arbitrary web servers also.
    Since it sounds like you control all the web servers in question, it shouldn't be too difficult to get this file in place, though.

  • Can we use applets as user interfaces with sockets, RMI and J2EE

    Dear Sir or Madam,
    Since I am a TA for software architecture class, some one ask me the following question: I think the answer is "No" based on the document on http://java.sun.com/sfaq/
    How I answer the quesions? Looking forward your help!!!
    1.You may have 2 applets and 2 html files. One applet with one html file may stay at a client PC and run on this PC, and the other applet with the other html file may stay at a server PC and run on this PC. In this case, all the applets are run locally.
    2.Could applets works with sockets, RMI and J2EE?
    3.Can we use applets as user interfaces with sockets, RMI and J2EE?
    Thank you very much!
    Best regards,
    Jing

    The scenario you paint doesn't quite make sense. The "server PC" wouldn't be running an applet, normally, since applets are by definition in a web browser page, and most likely involve user interaction, and "server processes" generally are done without user interaction.
    The security rules around applets are that -- by default -- applets can connect with sockets ONLY to the server from whence the applet was loaded. RMI uses sockets (J2EE is too broad a spec) and hence RMI calls would also be limited to the server from whence the applet was loaded. Within that limitation, an applet could open all the sockets it wants, so long as they are all on the server from whence the applet was loaded.
    If you want two applets on two different systems to communicate with each other, the simplest way is to have them rendevous through a server process on the server(s) from whence each applet was loaded. Maybe it's PC-a <-> server-a <-> server-b <-> PC-b ...? Or maybe PC-a and PC-b both are talking to the same server.
    The limitation is rooted in the security subsystem. You can specify a policy file and override anything in the security subsystem. That does mean signing the applet and then cajoling the user into agreeing to grant greater levels of security than the default. In such a case you can open sockets more broadly and then PC-a could talk directly to PC-b without going through any servers.
    - David

  • Can I use the same power charger in another country (South Africa) and just but a socket adapter?

    I am moving to South Africa from the US for a year and want to know if I can use the same power charger in South Africa and just but a socket adapter or do I need to get a new power charger for S.A.?
    This question was solved.
    View Solution.

    Hi,
    Nowadays laptop chargers can be used for normal electricity around the world (110V to 250V). All we need is a small plug adapter similar the the ones we use to travel overseas. Most electrical shops, travel agents and airports ... sell them.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Can I use Apache2.2.4 for Http server?

    Hi,
    I find some information from here:
    problem in install workflow middle tire and install apache
    The workflow install steps:
    1. Oracle 10g R2 database
    2. Workflow server release 2.6.3 from standlone download
    3. Then run the workflow configuration agent to install the database objects
    4. Oracle HTTP server and Workflow mid tier components (this asks for the WF connection details)
    5. Oracle Workflow client, from the 10g client CD.
    1-3 is ok,my problem is :what is Oracle HTTP Server? How can i install it? Can I use Apache2.2.4 replace it?
    Thanks.

    I had install Oracle HTTP server from Oracle Database 10g Companion CD.

  • Can i use combination peoplesoft system  and http adapter on sender side

    hai
    can i use combination peoplesoft system  and http adapter on sender side
    is their any modifications i have to do on module tab
    can any body tell me how to post data to http adapter
    is there any application gui is there to post data

    Hi
    can i use combination peoplesoft system and http adapter on sender side
    >>>Can you explain further what this means.. You can use HTTP adapter on the sender side.
    is their any modifications i have to do on module tab
    >>> No module processor allowed for HTTP adapter.
    can any body tell me how to post data to http adapter
    is there any application gui is there to post data
    >>> Check this document. It gives you information on how to build HTTP based web GUI.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/66dadc6e-0a01-0010-9ea9-bb6d8ca48cc8
    Thanks
    Satish

  • Can I use socket in code C before use alchemy?

    Hello ! I have a C program which create a socket to connect a
    server. I want to call this program thanks to the alchemy library
    to use in an actionscript program. Is it possible ?
    The problem is the instruction sockfd = socket(AF_INET,
    SOCK_STREAM, 0); return -1 when I run it in Flex builder (no
    problem with the C program compiled with gcc). I don't understand
    where is the problem.
    Thanks

    It is possible to implement socket support in Alchemy as
    Flash does support it. There is lots of documentation on the
    socket() API available (I use this reference a lot:
    http://www.opengroup.org/onlinepubs/000095399/functions/socket.html).
    Is it quick? No -- there are lots of little gotchas. I spent about
    two weeks of time working on it spread over two months and did not
    get it finished. But don't let me discourage you -- I had a lot of
    other stuff on my plate at the same time.

  • Can we use MS C++ Socket code to send to a labview socket vi?

    See above.

    No, the VIs you are referring to in LabVIEW use National Instruments DataSocket technology. This is not the same as Windows Sockets communication that you are referring to from Visual C++. They are not compatible to be used together. We do provide libraries for Visual C++ for DataSocket that come with our Measurment Studio package. Measurement Studio includes classes like CNiDataSocket that can be used to communicate with the LabVIEW DataSocket VIs.
    Best Regards,
    Chris Matthews
    National Instruments

  • Can i use this cheap telly with apple tv?

    hi all - i was about to buy a soundbridge music streamer - mainly to play itunes through my hifi but for the extra £50 i am now thinking about an apple tv
    but i lack the approprite telly - i am about to buy one for the bedroom so would the one listed below work with apple tv? it says you can connect it to a pc - is it the same thing?
    i plan to go audio out to my hi-fi and use it mostly for itunes - but i am looking at it as a long term upgrade to use apple tv - movies and shows MUST be coming to the uk soon...
    so can anyone help - am i able to hook this up to the telly listed below - the telly is cheap and cheerful but will be work?
    thanks as always
    dc/uk
    Venturer 19" LCD19-106 LCD TV
    http://direct.tesco.com/q/R.100-6432/btnResultSort.x%3d44/btnResultSort.y%3d7.as px
    Auto Install Yes
    Brand Venturer
    Digital Tuner No
    Fast Text Yes
    Flat Screen Yes
    Front AV Sockets 1
    HD Ready No
    Headphone Socket Yes
    Optical Out No
    Parental Lock Yes
    PC Input Yes
    Picture Frequency 50Hz
    Product Depth 19 cm
    Product Height 43 cm
    Product Width 54 cm
    Remote Control Yes
    Resolution 1366x768 pixels
    SCART Sockets 1
    Sleep Timer No
    Sound Quality Nicam
    Table Stand Included Yes
    TV Licence Required Yes
    Visible Screen Size 48cm
    Wall Mountable Yes

    You can only use Component to Scart converters if the scart on the telly is RGB enabled (unlikely on the Venturer). If youonly want to use the ATV as a way of moving music about & are not bothered about nice graphics etc, you can try connecting the ATV green component out plug to any composite video input (the yellow one). This should give black & white playback on your TV. If you have no composite video input, I had no problems using a composite plus audio to scart adapter (yellow red white, connect the green of a component cable to the yellow & you should get black & white)

  • How can WLS use JSP pages in a Web Application witth just a JRE [Web Application, WAR, JSP, weblogic.jsp.pageCheckSeconds and JRE]

              How can WLS use JSP pages in a Web Application (either a .war file or a war directory structure) without a java compiler?
              I suspect either the JSP specification is flawed (i.e. it doesn't take account of servers using just a JRE), or BEA's implementation is broken.
              Production servers do not have a JDK installed. They only have a JRE. Therfore a java compiler is not present on the machine that the Web Application is deployed onto.
              On the development machine, when the server is requested to load the JSP it creates a tmpwar directory within the Web Application directory structure. This is then included in the resultant .war file thus:
              D:\war>jar -tf gmi.war
              META-INF/
              META-INF/MANIFEST.MF
              gmiService.jsp
              WEB-INF/
              WEB-INF/classes/
              WEB-INF/classes/com/
              WEB-INF/classes/com/bt/
              WEB-INF/classes/com/bt/gmi/
              WEB-INF/classes/com/bt/gmi/gmiService.class
              WEB-INF/getList.xsl
              WEB-INF/getListByConnection.xsl
              WEB-INF/getListByDistrict.xsl
              WEB-INF/getListByDistrictConnection.xsl
              WEB-INF/lib/
              WEB-INF/source/
              WEB-INF/source/build.bat
              WEB-INF/source/gmiService.java
              WEB-INF/web.xml
              WEB-INF/weblogic.xml
              tmpwar/
              tmpwar/jsp_servlet/
              tmpwar/jsp_servlet/_gmiservice.class
              tmpwar/jsp_servlet/_gmiservice.java
              When deployed on the production server with the web.xml file set to use the following values (note XML stripped):
              weblogic.jsp.pageCheckSeconds
              -1
              weblogic.jsp.precompile
              false
              weblogic.jsp.compileCommand
              javac
              weblogic.jsp.verbose
              true
              weblogic.jsp.packagePrefix
              jsp_servlet
              weblogic.jsp.keepgenerated
              false
              And in the weblogic.properties file:
              weblogic.httpd.webApp.gmi=war/gmi
              I've also tried with the .war file, but that insists on creating another tmpwar directory outside of the .war file.
              Then, although I have set pageCheckSeconds to -1 (don't check and don't recompile) ter production server still attempts to recompile the JSP's:
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param verbose initialized to: true
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param packagePrefix initialized to: jsp_servlet
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param compileCommand initialized to: javac
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param srcCompiler initialized to weblogic.jspc
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param superclass initialized to null
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param workingDir initialized to: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param pageCheckSeconds initialized to: -1
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: initialization complete
              Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java file: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java
              Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java failed: Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main
              java.io.IOException: Compiler failed executable.exec([Ljava.lang.String;[javac, -classpath, /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:/opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4boot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudscape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/weblogic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib/weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses:/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer/weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/wls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, -d, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java])
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.io.IOException.<init>(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:187)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:118)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:142)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              

    The default Java compiler from sun lives in the tools.jar that comes with
              the JDK. Just add that to your set of JARs which are deployed in production
              and you should be fine. No need to install the full JDK - just make the
              tools.jar available to WebLogic.
              Regards
              James
              James Strachan
              =============
              email: [email protected]
              web: http://www.metastuff.com
              "Martin Webb" <[email protected]> wrote in message
              news:[email protected]...
              >
              > How can WLS use JSP pages in a Web Application (either a .war file or a
              war directory structure) without a java compiler?
              >
              > I suspect either the JSP specification is flawed (i.e. it doesn't take
              account of servers using just a JRE), or BEA's implementation is broken.
              >
              > Production servers do not have a JDK installed. They only have a JRE.
              Therfore a java compiler is not present on the machine that the Web
              Application is deployed onto.
              >
              > On the development machine, when the server is requested to load the JSP
              it creates a tmpwar directory within the Web Application directory
              structure. This is then included in the resultant .war file thus:
              >
              > D:\war>jar -tf gmi.war
              > META-INF/
              > META-INF/MANIFEST.MF
              > gmiService.jsp
              > WEB-INF/
              > WEB-INF/classes/
              > WEB-INF/classes/com/
              > WEB-INF/classes/com/bt/
              > WEB-INF/classes/com/bt/gmi/
              > WEB-INF/classes/com/bt/gmi/gmiService.class
              > WEB-INF/getList.xsl
              > WEB-INF/getListByConnection.xsl
              > WEB-INF/getListByDistrict.xsl
              > WEB-INF/getListByDistrictConnection.xsl
              > WEB-INF/lib/
              > WEB-INF/source/
              > WEB-INF/source/build.bat
              > WEB-INF/source/gmiService.java
              > WEB-INF/web.xml
              > WEB-INF/weblogic.xml
              > tmpwar/
              > tmpwar/jsp_servlet/
              > tmpwar/jsp_servlet/_gmiservice.class
              > tmpwar/jsp_servlet/_gmiservice.java
              >
              > When deployed on the production server with the web.xml file set to use
              the following values (note XML stripped):
              >
              > weblogic.jsp.pageCheckSeconds
              > -1
              >
              > weblogic.jsp.precompile
              > false
              >
              > weblogic.jsp.compileCommand
              > javac
              >
              > weblogic.jsp.verbose
              > true
              >
              > weblogic.jsp.packagePrefix
              > jsp_servlet
              >
              > weblogic.jsp.keepgenerated
              > false
              >
              >
              > And in the weblogic.properties file:
              >
              > weblogic.httpd.webApp.gmi=war/gmi
              >
              > I've also tried with the .war file, but that insists on creating another
              tmpwar directory outside of the .war file.
              >
              >
              > Then, although I have set pageCheckSeconds to -1 (don't check and don't
              recompile) ter production server still attempts to recompile the JSP's:
              >
              >
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              verbose initialized to: true
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              packagePrefix initialized to: jsp_servlet
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              compileCommand initialized to: javac
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              srcCompiler initialized to weblogic.jspc
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              superclass initialized to null
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              workingDir initialized to:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              pageCheckSeconds initialized to: -1
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp:
              initialization complete
              > Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java
              file:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java
              > Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java failed: Exception in thread "main" java.lang.NoClassDefFoundError:
              sun/tools/javac/Main
              >
              > java.io.IOException: Compiler failed
              executable.exec([Ljava.lang.String;[javac, -classpath,
              /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:
              /opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4bo
              ot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudsc
              ape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/web
              logic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/
              5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib
              /weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses
              :/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer
              /weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/w
              ls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiSe
              rver/weblogic/war/gmi/_tmp_war, -d,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java])
              > at java.lang.Throwable.fillInStackTrace(Native Method)
              > at java.lang.Throwable.fillInStackTrace(Compiled Code)
              > at java.lang.Throwable.<init>(Compiled Code)
              > at java.lang.Exception.<init>(Compiled Code)
              > at java.io.IOException.<init>(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              > at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              > at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
              7)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :118)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :142)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:744)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:692)
              > at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:251)
              > at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              > at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              >
              >
              >
              

  • How can i Use SERVLET with RMI to avoid trust certificate

    I know that for begining RMI, you must launch the server and the client.
    for the server i use :
    java -Djavax.net.ssl.trustStore=server.keystore -Djavax.net.ssl.keyStore=server.keystore -Djavax.net.ssl.keyStorePassword=server TestServer
    for the client I use :
    java -Djavax.net.ssl.trustStore=client.keystore -Djavax.net.ssl.keyStore=client.keystore -Djavax.net.ssl.keyStorePassword=client TestClient
    and all work fine.
    but i want to use a servlet for rmi client and i wrote this:
    public class AppelServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException
              try
                   System.out.println("Registering secure RMI socket factory ...");
                   java.rmi.server.RMISocketFactory.setSocketFactory(new SecureRMISocketFactory());
              TestRemote test = (TestRemote) Naming.lookup("rmi://127.0.0.1:7123/TestClient");
    String reponse=test.toLowerCase("HELLO WORLD");
                   System.out.println("la reponse est : "+reponse);
         catch (Exception e)
              System.out.println("test client exception: " +e);
    PrintWriter out = response.getWriter();
              response.setContentType("text/html");
    and i have the following error on tomcat:
    Registering secure RMI socket factory ...
    test client exception: java.rmi.ConnectIOException: error during JRMP connection
    establishment; nested exception is:
    javax.net.ssl.SSLHandshakeException: Couldn't find trusted certificate
    i think i must precise how to indicate the truststore like in the first case.
    help me please.
    hamdi

    Hi,
    Try doing the following steps.
    Assuming you have a certificate obtained
    Export the certificate into a .cer file.
    On IE, goto tools->internet options->content->certificates, and export to a .cer file.
    Using keytool of java import the certificate to the store that can be used doing the following command.
    keytool -import -alias <ailas> -file < .cer filename> -keystore <storename here>
    set the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword properties at the command prompt using the command below.
    java -Djavax.net.ssl.trustStore=<storename> -Djavax.net.ssl.trustStorePassword=<password> <classname>
    Let me know if this helped.
    Also take a look at this link for using RMI with SSL
    http://java.sun.com/products/jdk/1.2/docs/guide/rmi/SSLInfo.html
    Regards,
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • How to make a java program, that can be used by c++ application

    I'm developing a Java web application (WEBapp), but I have also a c++ program.
    C++ program must use WEBapp method to communicate on the web.
    How to make a Java public function that accept value, elaborate, then return the resul to c++ application?

    jschell wrote:
    You have C code.
    You have Java code.
    The two must communicate.I have a c++ program, and a Java program.
    C++ program wants to communicate on the web (send text), and I'm trying to add this functionality to it creating a Java program.
    NOW THE PROBLEM? How c++ program can use java-program (in local) to send data on the web?
    You can just JNI to communicate either from java to C++ or from C++ to java. That is direct communication in that there is a single process involved. Thus you will no longer have a java application and a C++ application but rather a single application.I don't know JNI, i found http://java.sun.com/docs/books/jni/ and I think is too difficult to implement?
    You can use files or sockets to communicate. Using sockets allows for any number of additional protocols including the previously mentioned web services. Those methodologies would allow more than one application to exist.I developed yesterday a java-side-interface using socket (in local host 127.0.0.1). So the c++ program must write or read to/from the socket to comunicate to java (then the java program send data on the web).
    Finally it might be the case that you have a C++ application which you cannot modify. In that case then you MUST use whatever input/output mechanism that it supports. There is no choice. And until you have fully determined what those mechanisms are it is pointless to discuss a solution.I can modify the application, but I don't have developed it. The c++ application use a third-part dll (taken from SKYPE) to comunicate on the web: I have to remove the dipendence from this dll, and add the java program: java program must substitute the dll. It must be non-invasive to the c++ program. DLL calls can be "send(data)" or "receive(data)" or similar.
    For this do you think that JNI is a must, or I can use soket on local host?

  • Can I use my ipad 2 in Australia and New Zealand without a power converter to 110 volts?

    Can I use my ipad 2 in Australia and New Zealand without a power converter to 110 volts?

    As noted your power adapter will handle the voltage. You might however need a plug adapter if those county's use a different physical arrangement...
    http://www.worldstandards.eu/electricity/plugs-and-sockets/
    http://www.kropla.com/electric2.htm

  • How can I use SSL in httpunit??

    How can I use SSL in httpunit? I am using HTTPUNIT 1.5.4 and the
    j2sdk1.4.1_04?
    I want to activate a submit button that following an https-Url in the
    html action method...
    The SSL certificateis from Server,
    i want to connect, is comming from Thawte. then it should be automatically
    trusted by the "trust file" within the JVM (FAQ) but it does not. Can me
    someone explain what to do?
    Here is the throwing Exception:
    java.net.SocketException: Network is unreachable: 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:434)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(DashoA6275)
    at
    com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(DashoA6275)
    at sun.net.www.protocol.https.HttpsClient.doConnect(DashoA6275)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:386)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:602)
    at sun.net.www.protocol.https.HttpsClient.<init>(DashoA6275)
    at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
    at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
    at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
    at
    sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.plainConnect(DashoA6275)
    at
    sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
    at
    sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:528)
    at
    com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.getOutputStream(DashoA6275)
    at
    com.meterware.httpunit.MessageBodyWebRequest.completeRequest(MessageBodyWebRequest.java:96)
    at
    com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:60)
    at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:162)
    at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:125)
    at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:118)
    at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:107)
    at
    com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:245)
    at
    com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:224)
    at com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:75)
    at com.meterware.httpunit.WebForm.submit(WebForm.java:67)
    best regards,
    Frank

    Umm...not to be (too) rude - but did you try reading the error message?
    "java.net.SocketException: Network is unreachable: connect"
    You haven't gotten to the "is my certificate acceptable" part yet, because you aren't even getting off of your box.
    Grant

Maybe you are looking for

  • Middleware config setup in SAP R/3 system.

    Hi Guys, Can you please tell me the implications on the SRM system for the below changes. There was an issue in the CRM system  as some of the Bdocs getting failed in the CRM system, reason being tthe actual scenario is that we have CRM system and SR

  • Applet Does Not Display

    Hi! With these two perplexing pieces of code, I should be able to show a red "Welcome to Java" string. But it doesn't render when I open the HTML file. I don't know why, I seem to be passing the parameters properly. Applet: <html>      <head>        

  • Moving subtitles vertically in Apple TV when watching Netflix

    Hi all, Wondering if there is a way to move subtitles vertically when watching Netflix on the Apple TV? Reason i ask is because i have a cinemascope screen and when i watch movies in 2.35:1 aspect ratio the subtitles falls outside the screen frame.

  • Zebra Printing in Smartforms

    Hi Experts,     Can you give  me a step by step procedure to create a smartform for Zebra Printing. HOw different is it from normal smartform development? Thanks in advance, Regards, Ravi

  • Bin Location In Stock Transfer

    Hi, I have to set the bin location for From Whs and To Whs in B1if <StockTransfer_Lines>                         <xsl:for-each select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='C' and ./@id='atom1']/jdbc:ResultSet/jdbc:Row">