URGENT HELP IS NEEDED!!!!!! How can i get two applet to communicate via a j

I am writing a program that should allow me to communicate between applet. The applet is loaded via the a web site, but i can't get that to work, so i am using appletviewer instead.
I want to establish a connection between the applets thus allowing to chat.
So far i can open both applets up, (using localhost), but the applet isn't able to establish the connection and i have to turn off one of the applet window, before i get a connection, but it won't do anything after that.
I know it is a security problem, but how can i fix this problem.
Please can you help, i am in difficult position
Junaid

I think what u are trying to do is some peer-to-peer communication using applets.
The thing is the applet knows ( via getCodeBase and getDocumentBase methods) from where it was launched. It has no knowledge of where other applets from the same server may be residing.
It looks to me that you will need to do some server-side coding as well..
On possible solution would be to
A) Install and run a Tomcat Server
B) Tomcat can be used as a webserver in limited way .. (refer it documentation ) by defaul it runs on port 8080
C) So you can say http://localhost:8080/
D) Use this launch the applets
E) Using HTTP Tunneling ( Read about it in Servlets ) you can set up Tomcat to broker messages between the 2 applets
Also from you question it appear that both the applets try to hook on the same port, now on one computer (localhost) one port can be used by one socket . Try to get them to use different ports then the appletviewer problems should solve it self.
To use different ports without making 2 different applets , simeply pass the port as a PARAM to the applet

Similar Messages

  • How can I get two windows to communicate?

    I am trying to get two windows to communicate.
    Window a opens window b.
    In window b, the user makes selections which are saved to a series of variables (3 strings and an int).
    When window b disposes, I want these variables to be passed back to window a so that I can load them
    into text fields.
    If anyone has any advise it would be greatly appreciated.
    Joseph

    If A opens B then just pass a reference to B or do a getParent, then use a setter in A to set the values you want.

  • Help Please! How can i get rid of shopper pro from my google chrome browser?

    Help Please! How can i get rid of shopper pro from my google chrome browser?

    Read this document about malware and adware.   The solution is almost certainly within.The Safe Mac
    http://www.adwaremedic.com/index.php
    Incidentally, it would help if you entered details of your products in your profile.   There are different answers for different items with this question.

  • How can I get two missing numbers on a iTunes card

    How can I get two missing numbers on a iTunes card

    "Get help",just below the form space where I entered the code. Once I clicked "Get Help", it added another line to the form where I could enter  THE NUMBER ON THE BOTTOM LEFT CORNER on the back of the card. I entered as much of the I scratch-off code I could read, along with the serial number.

  • How can you get an applet to obey the CSS z-index attribute?

    How can you get an applet to obey the CSS z-index attribute?
    I have a DHMTL page with a panel that I want to slide back and forth. But another part of the requirement is to have the panel look like it is sliding under another panel.
    The problem is that an applet is on the panel that slides. When the sliding panel move under the stationary panel the applet does not go under the stationary panel, but the reset of the sliding panel does render looking like it is sliding under.
    See below.
    - ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~           #############***************           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #############^**************           ^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -
    ~ has a z-index of 1
    # and * have a z-index 2
    # shows above ~ and below ^
    ^ has a z-index of 3What I am getting with the applet on the panel with a z-index of 2 is the following
    - ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~           #############***************           ^ -
    - ~           #            ^             *           ^ -
    - ~           #  @@@@@@@@@@@@@@@@@@@@    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @@@@@@@@@@@@@@@@@@@@    *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #############^**************           ^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -
    --------------------------------------------------------Where @ is the applet. Notice how the applet is on top of the ^ but the panel under it, ^, is under like it should be. All the panels are 1x1 tables with a border. So how can I get the applet on the drawing shown with # and * to follow the rendering of the z-index of 2?

    Hi,
    I have the same problem, and don't know how to solve it, So, i had tried to put my applet in a div tag wih z-index=0, but it still hide my other Dhtml divs with bigger Z-index (z-index =1000)
    Have you any idea to solve this.
    Thanks
    Hakim

  • HELP! (Please) How can I get my playlists previously created on my iPhone 4 back?

    Hi there. I have an iPhone 4, equipped with all of my music from my iTunes library on my MacBook Pro laptop. I often create playlists on my phone (when it is not plugged into the computer). When I went to plug my phone into the laptop to sync some new songs and things, it replaced the playlists I had made on my phone with the ones already on the computer. How can I get the playlists that I had made on my phone back? I really don't want to have to recreate all of those playlists...is their any way to retrieve those playlists? Thanks for any help you can offer!!!!

    Since this is PC version using XP I'm afraid you'll have to check in on the PC side.
    Caution: just say your using XP Home and trying out the trial. Don't mention the word Mac. PC folks, would make you regret doing that. As much as its so 80's and 90's for such behavior its still around.

  • How can I get two hand drawn images to line up?

    How can I get these two images to line up? I am stumped.....I have used auto-align, scale, etc.....but I get one side right then other side not aligned.

    You are dealing here with a difference in image size between the top and bottom sections and perhaps a difference in verticality.
    Consider the bottom units. The left side should shift right and the right side should shift left in order to align.
    Your next move would be the adjust the size of one of the layers by using Edit > Transform > Scale. Hold down the Option key to maintain proportion.

  • ISight camera/iChat not working HELP!  Also, how can I get PhotoBooth?

    Hi,
    A friend and I are tring to use iChatAV but it just does not seem to work.. I can see my picture and the mike on the camera works on my machine but neither of us can see or hear each other.
    Text chat works fine.
    We are both running wireless routers but our MAC are hard wired to the machines NIC so wireless is not a factor here. I am using a Linksys WRT54GS... I also have the firewall in OSX turned on. Are there ports I need to open to get this to work? If so how?
    Also I bought the iSight camera and just assumed that Photobooth would come with it... It doesn't seem to have been included. My buddy sent me version 1 but I am not sure if it's compatible with the Intel MacPro... how do I get it?
    Any ideas?

    Hi
    Goto the linksys setup page and then goto the Adminstration option you should find UPnP which you should turn on.
    Restart ichat.
    You have a Macbook Pro which should have a built in iSight and photobooth should be in you application's folder.
    Tony

  • I do not have a firefox button so I can't get the securety information I need how can I get it ?

    on your information page it shows a firefox button in the left hand upper corner I don't have that button.

    Firefox only shows the Firefox menu button if the menu bar is hidden.
    See:
    *https://support.mozilla.org/kb/Menu+bar+is+missing
    *https://support.mozilla.org/kb/how-do-i-get-firefox-button
    Which security information are you referring to?
    You would normally have the click the icon on the left hand side of the location bar to see security information in case a secure HTTPS connection is used.
    *https://support.mozilla.org/kb/Site+Identity+Button
    *http://blog.mozilla.org/ux/2012/06/site-identity-ui-updates/

  • How can I get two cameras to aquire at the same time rather than one after the other

    I've got (2) PCI-1428 cards, Two Uniq Vision cameras with power supplies, cameralink cables, and IMAQ-D6804 cables. Both cameras are being triggered by the same switch, but they are not grabbing images at the same time. Right now it is triggering one camera as desired, but the other doesn't aquire until after the time-sensitive event. On the next test, the two camera will trade these roles. I am using 2 cards, so they should acquire at the same time. How do I change it so that they grab images at the same time? Thank you for your help.
                                                      ​            Deater

    Hi Deater,
    Thank  you for your post.  Triggering from two cameras at the same time may be a little trickey, but it can be done.  There are multiple ways to tackle this problem.  If you have a RTSI cable, you can RTSI the two PCI boards together internally to lock them in HW.  You should also be able to use the triggering line on each board.
    One of the best methods for triggering multiple boards is called GenLocking.  The following Developer Zone page describes GenLocking more fully and has several examples to help you out: http://zone.ni.com/devzone/conceptd.nsf/webmain/a3​87b5c0ac6f6f4e86256c87005fcddf.
    The "HL Grab with two boards.vi" shipping example is also a good example of the code needed to trigger two individual boards in LV.  I found a similar post that may be of some help as well: http://forums.ni.com/ni/board/message?board.id=230​&message.id=2691&requireLogin=False
    Hope this helps!
    Thanks,
    Scott Savage
    National Instruments
    Applications Engineering
    www.ni.com/support

  • How can I get two column selection list in my html form

    I required to have two column selection list in my jsp page to show name and description of a product. How can i achieve this functionality or is there any other alternative to do so.

    If i understand correctly: you can't actually create two columns in a list because it can only hold one value. The only way to achieve what you want is by concatenating the two values you want to display and put this as the value of the listbox.

  • How can I get two-sided print on Canon Pixma IP3000  with Snow Leopard?

    I've just upgraded to Snow Leopard and find that duplex printing is no longer available. How do I get it back?

    You should have a menu item called Duplex Printing and Margin. This is part of the v10.26 driver that is provided via Software Update.
    This was the same menu item that was available with the v4.8.3 driver that was included with OS X 10.5. If you were not using this menu previously with 10.5 then maybe you were using the iP3000 Gutenprint driver?
    Pahu

  • Help!! how can I get rid of all this icloud music on my phone??

    I just upgraded to ios 7, and now there is a huge amount of my son's music on my phone and I cannot find any way to get rid of it. Oh, how I loathe apple file management!
    This music must be from itunes on his computer--we use a common account. I have manage music manually checked, I never sync to itunes. All of the unwanted music has little clouds with arrows on it. It does not appear in my music library, and in usual apple idiotic fashion, there is no way to delete from the phone itself
    I have deleted my icloud account, which ios 7 so graciously reactivated, but the unwanted songs still appear in my playlist.
    Please help--this destroys my music library
    TIA

    Go in Settings. Then in "Itunes & AppStore". Deselect "Music" and "Videos" on top. This would solve the problem with the Music and Videofiles in the cloud, that you seem to see.
    The music isn't actually on your iphone. It just shows you what is in the cloud.

  • Help!! How can I get my timemachine to work with motorola router

    I just had comcast installed in home.  Apple router is not working with motorola sb510u

    You may need to reset your broadband modem to convince it to connect to a "new" device.  Depending on the model of modem, that can be as easy as removing power for a few moments.  If that doesn't work, remove power and wait 15 minutes.  Further reset steps can involve pressing a "reset" button or removing a battery if the modem has one.  In the worst case, your ISP may need to edit its settings to update to the MAC address of the new router.  If they won't or can't do that, powering down the modem for 16 to 36 hours can reset the connection.

  • How can i get two videos to run side by side?

    i am just wondering how to get more than one video (4 preferably) to run side by side all at the same time? thanks

    Hi there. I'm new to the iMovie app but I this link should help:
    http://help.apple.com/imovie/mac/10.0/?lang=en#movb8c659f55

Maybe you are looking for

  • Split valuation for non-valuated materials

    Hi dudes, We are implementing SAP for our Subcontractor. our SC  receive all components from our company ( on free ) but sometimes they purchase the same material themselves for other uses. so we decided to use split valuation to separate valuated an

  • Are these requisition release strategies common?

    All, I'm designing new requisition release strategies for indirect requisitions at a chemical industry client.  I'd like to know how often you have seen the following sorts of design before: Existing design: Item-based release with workflow, with thr

  • Battery pretty much dead after 1 year...

    I've had my powerbook for a little over a year and now my battery appears to be already dead. I usually keep it plugged into AC but recently I found that my battery life is about 10 minutes now. I used to get a good couple hours out of it in the past

  • How to access biz data of process instances in workspace at any time in 11g

    Hi, We are using Oracle BPM Suite 11g. Our users want to be able to check and search the business data associated with the process instance at any time (i.e. even after the instance is completed. And the business data should be included in the task l

  • New schema in existing application

    Hi all, I have an application(abc) running on schema (R1). Now i have created a new schema (R2) and have created few objects under it. Now when i am creating a new page in abc application i am not getting the previlage to use R2 schema. Actually in t