Servlet communication with Java App.

Hi currently I am working on a project in which with the current design I have to implement a servlet, which can communicate to other servlets and/or Java applications via calling their methods. I know that RMI would be ideal for this however, I do not want to have to setup or configure anything on the server end. Another approach I thought of was to extend the abilities of the servlet and Java app to communicate at the "socket" level, however this can cause issues when communicating through a firewall , I am sure there are workarounds. The last thing that I thought of was having the servlet and application communicate via the HTTP protocol and using HTTPMessage to pass arguments. This approach seems to be the easiest but I would have rather liked to access the Object methods of the two applications rather than send args back and forth. Again as mentioned technologies like RMI and CORBA would probably benifit me. While I don't know too much about CORBA I do know that RMI would require administration work which I would not like to deal with mostly b/c of paperwork and red tape.
Any advice would be appreciated.
thank you,
Peyman m.

HI,
I think if your client is RMI, then you need to have RMI server running to answer that client.
While here you have servlet as your server side component. So, I think in its orginal form servelet can not reply to RMI implelemnted client.
The best approach I feel for the situatioin described by you is using java based HTTP classes.

Similar Messages

  • Servlet Communication with Java WebStart

    Hi there,
    we have an application that works fine with Java WebStart whenever we start it in a local area network. But from outside the LAN the application cannot communicate to it's servlets. I use the codebase IP address with the servlet runner's port (http://<codebase IP>:port/) as URL for servlet communication, but the application's request never reaches the servlets.
    My question is now, if anyone had the same or a similar problem with servlet communication using Java WebStart, or if anyone knows, if that might be a problem with proxy configuration.
    The servlet runner we use, is JServ from Sun (JSDK2.0) and the webserver where it is running on is not behind a firewall or a proxy, but the client PC with the web start application is.
    Thanks,
    Katja

    Thank you for your early reply. But I think, that's not the problem.
    I get no security error and the webserver is identified the same way it is in the jnlp file. Also my application is not running in the Sandbox. My assumption is, that the http-request to the servlet does not go through the proxy server between my PC and the PC the servletrunner is running on.
    I wonder if I have to configure my application to use a proxy server for communication with the servlets instead of the direct http-request to the servlet runner?

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Windows Macro Engine for use with Java Apps

    Does anyone know of a macro engine that can be used under windows for interaction with a Java app? None of the ones I've tried will work with Java Apps. Work great with everything else I've tried, just not Java apps.
    Will

    What exactly is a macro engine? What do you want it to do? Do you want to add scripting to your application? Or do you want to script third party applications, that don't support it themselves?

  • Crappy Fonts with Java Apps .....

    Well having spent days trying to get the fonts sorted out on Archlinux & Openbox, i was finally down to the Interface on Java Apps looking rubbish.
    To resolve this i added the following to ~/.bashrc
    ## Set Java Fonts
    export JAVA_FONTS=/usr/share/fonts/TTF
    export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on'
    Just thought i would Shared with the community, just incase anyone else suffers with the same problems

    whitetimer wrote:
    @ngoonee
    Isn't that where the search facility comes in handy and yes a little tweak such as that would probably be better placed in the wiki ....
    @llawwehttam
    It had me pulling my hair out trying to find a solution, so i am pleased to have helped you out ......
    Search is limited in application, you'd have to be pretty specific in how you search. I remember an old sci-fi novel I read where there were people whose job was merely to craft 'probes' (in the age of google, search terms) into large computer databases. Without those 'probers' nothing of meaning would ever be found, even though all human knowledge existed on those databases.
    In general, if something is meant to be a hint for others, the forum is the worst place to put it. First preference is to patch upstream, second to update the wiki, third to post in the ML, last is forums. Some may disagree on 3rd and 4th, interchanging them, but the first and 2nd options are pretty clear.

  • Problem with java app.

    Hi!
    I did not knew where to put this, but, here it goes:
    We have purchased program based on Java (j2re1.4.2_03) and have experienced problems with running other applications like MS office or IE. The problem is that when the Java app is runing, when opening MS word it sometimes freezes. To unfreez MS word wehave to flash open and hide Java app. We and the developers are at loss. What to do?
    PS: if you know the solution or there is another topic about this question pelease write the link. I could not find smoething similar in Google.

    It is not problem in Word. It is not system (Win XP)
    problem. We had system and word reinstalled and
    nothing changed (on several computers). It shows the
    same symptoms. The problem repeats when opening
    Internet explorer where pages have java scripts
    implemented. On word it happens ocasionally.
    Is there at least some direction to point out to our
    developers. Where could be the root of the problem?I am concerned that I should have to tell you what to have the developers to look at. They are the developers after all this is their problem to solve. I don't mean to be trite here but they will know more about what their program does than anyone here will. And if it is a bug in Java then they need to tell you exactly what it is.
    Anyway their are two possible problem sources here I think.
    1) The program interacts with other programs in some way that is detrimental. I have no idea what this program does because you haven't said. But perhaps for example it's using some Office components in some way and making them upset. (This could also possibly explain the IE problem)
    2) The real issue is that the Java program has a bug whereby it consumes all the CPU resources on the system till such time that it is interacted with or otherwise decides to stop behaving that way. This is a bug in the code for the program. Again though other than this not much more can be said because one would have to see the code for the program. I think it's most likely the cause of your problem.
    Last, yes there are bugs in Java itself that can cause problems but not generally in the matter you describe. Again though even if this should turn out to be one of those times it is up to the developers to identify this.
    You need to have the developers solve this for you. This is good as blind direction is going to get I think.

  • Since recent upgrade, I can't see any of my projects in Shutterfly. Their customer support says it may be issue with Java app and Adobe Flash Player

    see above-- are there known issues with these apps?

    Your Java player (if relevant) is not clearly indicated in your plugins list, and your Flash player is several versions behind. If Apple has an update site, you might check that first. Mozilla's site is here: http://www.mozilla.org/plugincheck/

  • Communication with other apps

    Hello. I have an application which should work on Windows and Mac Os. I need to use some VBScripts on windows and some applescripts on Mac. I have an idea but i don't know if it is good. Someone told that I should use RMI. My idea is to build an application on Windows in VB and on Mac in applesctipt. This application (depend of system) will be starting with my java app - using ProcessBuilder. I will send some informations by stdIn and get some responses by stdOut of this external application. I dont know if this is good solution. Maybe someone tried to do such think? Maybe there is some easier method?

    To be honest I don't know anything about AppleTalk. About VBScript the easiest way is to run the VBScript from java and take the output from its execution some way (from output file or from process output stream). I am not fan of VBScript but this is what I can say from prima vista. We usualy use COM components when a native calls are needed and access these via JNI and linked DLLs.

  • 6680: Camera access with Java app

    I have no problem with Symbian apps accessing my 6680's camera. AgileMessenger and ShotCode are good examples of this.
    But Java apps, e.g. Shoot&Send and MXit just show a blank white screen when it's supposed to show what the camera is seeing. And when you press Shoot, the app will generate an error. Friends with a 6680 experience the same problem. Is this a known issue? Firmware: v4.04.07, 22-08-05, RM-36

    Hi
    I'm running Shoot&Send successfully on a 6680 with exactly the same firmware version as you have. Be sure that you installed the Series60 version of Shoot&Send.
    Best is you open http://wap.shootsend.com/ with the native phone browser (not Opera), and your device model will be detected correctly.
    Silvano

  • Traping all Events with Java App

    Is it possible to trap all mouse event from Java code even when the java app is not in focus? Lets say a VB app is running and then Java needs to know that that VB app has been clicked?
    ANy useful tip on this?

    Is it possible to trap all mouse event from Java code
    even when the java app is not in focus? No.
    You will have to do this with native code.

  • Problem with java apps

    Hello,
    I'm having a weird problem with some java apps that I'm trying to use (netbeans and frostwire). Looks like they aren't recognizing where the mouse pointer is. If I click Frostwire's window close button, it minimizes instead. The same thing is happening with netbeans, where I can't even access the menus with my mouse. I have the latest jdk and xfce4 packages installed.
    Any hints on how I can fix this?
    Thanks,
    Gustavo

    Do you use beryl ? it causes (or atleast used to cause) some strange behaviour with Java applications

  • Preventing multiple instances of same application - started with "java app"

    I need to ensure that only one instance of an application runs at any given time.
    As far as I know launching it twice with "java appName" will run each in its own memory space, so it is not immediately obvious how to achieve it. I considered using a database entry or environment variable, but those would need to be cleared on exit and therefore be at risk of not being cleared if the application crashes or hangs.
    Is there a Java API call that would allow me to do a check for other instances of the same application... safely?

    Create a ServerSocket on a fixed port number that isn't used by any other application. If you get a BindException, your application is alread running.

  • Maverick don't work properly with java app

    I've upgraded from lion to maverick today and had to install java again. Now one of my java apps starts just like it were before, but can't see any files throught "browse" button. It shows some folders and devices without icons (just title), and don't show other files at all (no icons, no titles). Since this app is critical for my business, I'll sell macbook if I won't fix it. How can I solve it? Can I downgrade to lion?

    rusmanson wrote:
    Yes, it's enabled. Java applet starts, and works, but file browsing through it is not working, though it works in Firefox.
    Found this on another post.  Hopefully it might help:
    To all Java users: remember that when you access a Java site, you are warned that some applets might be insecure. If you allow them to run, Safari might eventually block them anyway, because the applets are not signed or are known to have caused trouble. If you still wish to run them, do this:
    1. Go to the Safari menu and select Preferences.
    2. Click on the Security icon.
    3. Make sure that the "Enable Java Script" and "Allow Java" options are checked.
    4. Click on the "Manage Website Settings" button.
    5. Make sure to choose "Allow Always" from the dropdown menu in the window that appears near the name of the site where the applets reside. If you only choose "Allow", some applets will not run.
    Again, remember that using Java these days may pose a security threat. Whenever that happens, Apple will update the OS and disable Java.

  • How to let JavaScript   Communication with java

    he *,
    i have develop a firefox extension , i am using liveconnect let javascript communicate with java,
    it's my java code :
    public class javaCode{
            private int i;
            public javaCode() {
                    this.i = 0;
            public void testCount() {
                    while (true) {
                            String msg = "Call Java Method Count :" + this.i;
    }my javascript :
    function test() {
                             var myClass = loader.loadClass('com.example. javaCodeclass); 
    var myObj = myClass.newInstance(); 
    var binval = myObj. testCount ();
                    }when i install the extension into my firefox , i get a problem that is when restart firefox after i instll it ,I can't open the firefox ,but i find the firefox process is still running
    the problem is looks like the java is using "while(true)" , so it's won't stop ,
    but how to solve the problem using js or java ??
    any idea ?
    cheers,

    bobby92 wrote:
    Actually , i don't know how it will be active , so i have to using while (true)No, I'm pretty sure you don't need to. There are few cases where while(true) is needed and this isn't one of them.
    but can't i using javascript to stop the java method ??Nope, not in the middle of a while loop.
    or how to solve the problem ?What was your problem in the first place, what are you trying to achieve?

  • Problem with Java app on Mac OS X... works fine in PPC, not on Intel

    Hi all,
    I'm at a loss... I've always been under the impression that java is the same no matter where it's running, but I've come across something that surely counters that line of thought. At work, we use a java application from DTI to publish our newspaper. This app works just fine on Mac OS X 10.4.x on PPC Macs, but the same application doesn't work on Intel Macs, also 10.4.x.
    The app launches and appears to be working fine, but there's a point where it must download some support files from the server. This is where it breaks with the error:
    java.io.IOException: null, com.dtint.macutils.AppFile.decode
    The corresponding entries in the console log show this:
    java.io.IOException: null,com.dtint.macutils.AppFile.decode
         at com.dtint.macutils.Codec.invoke(Codec.java:96)
         at com.dtint.macutils.Codec.decode(Codec.java:112)
         at com.dtint.install.InstallFile.decode(InstallFile.java:218)
         at com.dtint.install.Download.db2File(Download.java:277)
         at com.dtint.install.Download.run(Download.java:143)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.dtint.macutils.Codec.invoke(Codec.java:91)
         ... 4 more
    Caused by: java.io.IOException
         at com.dtint.macutils.AppFile.decode(AppFile.java:130)
         ... 9 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.dtint.macutils.AppFile.decode(AppFile.java:125)
         ... 9 more
    Caused by: java.io.FileNotFoundException: /Volumes/ChopAdSizeMove.scpt.encoded (No such file or directory)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at java.io.FileInputStream.<init>(FileInputStream.java:66)
         at glguerin.macbinary.MBFileDecoder.decodeFile(MBFileDecoder.java)
         at com.dtint.macutils.MacFileIO.decode(MacFileIO.java:163)
         at com.dtint.macutils.AppFile_60.decode(AppFile_60.java:94)
         ... 14 more
    File Download Time (ms) = 12428
    If there are any other logs I can provide, let me know what would be helpful and I'll get them.
    I've got no clue why this wouldn't work across platforms unless it was compiled for the PPC processor or something, but then wouldn't it either launch in Rosetta or not at all on the Intel? I'm a systems admin, not a programmer, so I've really no idea where to start looking.
    What I have done to this point is made sure I'm on the latest Apple-released Java, as well as copied the Java files from the PPC to the Intel to see if there was something there. Nothing makes any difference.
    This would be a major coup if I could get this working... does anyone have any thoughts or ideas about getting this to work?
    Many thanks in advance!
    Jason

    Hi all,
    I'm at a loss... I've always been under the impression that java is the same no matter where it's running, but I've come across something that surely counters that line of thought. At work, we use a java application from DTI to publish our newspaper. This app works just fine on Mac OS X 10.4.x on PPC Macs, but the same application doesn't work on Intel Macs, also 10.4.x.
    The app launches and appears to be working fine, but there's a point where it must download some support files from the server. This is where it breaks with the error:
    java.io.IOException: null, com.dtint.macutils.AppFile.decode
    The corresponding entries in the console log show this:
    java.io.IOException: null,com.dtint.macutils.AppFile.decode
         at com.dtint.macutils.Codec.invoke(Codec.java:96)
         at com.dtint.macutils.Codec.decode(Codec.java:112)
         at com.dtint.install.InstallFile.decode(InstallFile.java:218)
         at com.dtint.install.Download.db2File(Download.java:277)
         at com.dtint.install.Download.run(Download.java:143)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.dtint.macutils.Codec.invoke(Codec.java:91)
         ... 4 more
    Caused by: java.io.IOException
         at com.dtint.macutils.AppFile.decode(AppFile.java:130)
         ... 9 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.dtint.macutils.AppFile.decode(AppFile.java:125)
         ... 9 more
    Caused by: java.io.FileNotFoundException: /Volumes/ChopAdSizeMove.scpt.encoded (No such file or directory)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at java.io.FileInputStream.<init>(FileInputStream.java:66)
         at glguerin.macbinary.MBFileDecoder.decodeFile(MBFileDecoder.java)
         at com.dtint.macutils.MacFileIO.decode(MacFileIO.java:163)
         at com.dtint.macutils.AppFile_60.decode(AppFile_60.java:94)
         ... 14 more
    File Download Time (ms) = 12428
    If there are any other logs I can provide, let me know what would be helpful and I'll get them.
    I've got no clue why this wouldn't work across platforms unless it was compiled for the PPC processor or something, but then wouldn't it either launch in Rosetta or not at all on the Intel? I'm a systems admin, not a programmer, so I've really no idea where to start looking.
    What I have done to this point is made sure I'm on the latest Apple-released Java, as well as copied the Java files from the PPC to the Intel to see if there was something there. Nothing makes any difference.
    This would be a major coup if I could get this working... does anyone have any thoughts or ideas about getting this to work?
    Many thanks in advance!
    Jason

Maybe you are looking for

  • Changing Customers Sales Account

    Hi All, All the customers are mapped to Sales Account 51005000.  Now the requirement is to change the sales account from 51005000 to 53005000 only for few customers. Please suggest how to handle this issue. Thanks Rajanikanth

  • Help with Computer Purchase

    Im not even sure I am in the right community but here it goes I am looking at getting new computers for my wife and me we are looking at getting 2 MBA's and one 27" iMac. I have searched the internet high and low and cannot come up with a definitive

  • Final Cut Express onto Beige G3

    Has anyone been able to install Final Cut Express HD onto a beige G3? I know there is a "trick" which will allow Final Cut Pro 4 to be installed: copy the Final Cut Pro application from the CD to the Applications folder and then (before running the a

  • How do I expand the start-up disk partition?

    A few weeks ago, I learned about partitioning.  I thought I would give it a try on my Mac Pro.  I have two 1TB Hard Drives on it.  I partitioned all the hard drives into 4 seperate partitions.  I also partitioned the start-up disk.  Except, I goofed

  • Cannot add users to the Calendar Node error 0x13209

    I cannot add new users to the Calendar node. I am receiving error 0x13209. Any advice??