Sitemap

Amicuk Programming Answers

Notifying an applet (from a servlet)

-0001-11-30   Views:0

Advertisement

Is there a way to send events to an applet (on Internet, not just on Intranet)? To tell the applet that it should upgrade the view or something. The event may be sent as a string, but is it more difficult to send another (serialized) object ? Thanks

Is there a way to send events to an applet (on Internet, not just on Intranet)? To tell the applet that it should upgrade the view or something. The event may be sent as a string, but is it more difficult to send another (serialized) object ? Thanks for any answers !

The replay answer
Advertisement
First off, I'm assuming you want to "push" the data/events to the applet, not have the applet request the data. The first reply's method would require that the applet make some kind of request to the servlet.
I don't think there is a way to do this with servlets directly, but you could have a servlet set up an object on the server that "pushed" the events to the applet(s). You would need to come up w/ your own protocol for sending / receiving the events (I'm sure there are some examples on the net). You might even be able to use some kind of RMI to go back and forth between the server and applet.
The problem you will run into here though could be firewalls. The port number you use to communicate between the server and the applet may not be able to be port 80, since you usually have to have administrative priviledges to use any ports below 1024. But if you aren't on port 80, you will have trouble going through some firewalls (this may not be a problem here though).
You might want to search for some sample code that implements a Chat servlet / applet. This kind of thing would be similar to what you are asking about.

Go to See the other 4 answers

Notifying an applet (from a servlet)

Category:DefaultRelease time:-0001-11-30Views:130

Is there a way to send events to an applet (on Internet, not just on Intranet)? To tell the applet that it should upgrade the view or something. The event may be sent as a string, but is it more difficult to send another (serialized) object ? Thanks[More]

Applet in a servlet

Category:DefaultRelease time:2015-10-11Views:130

I have an applet class in my webserver directory. How do i call it within a servlet .What should be the values for code and codebase properties. Kindly send me an example code if possible. Bye for now Thanx in advance NaveenYou don't call an applet f[More]

Advantages and Disadvantages of  Applet over JSP/servlet

Category:DefaultRelease time:-0001-11-30Views:130

Can some one please let me know what are the major advantages and disadvantages of using Applets over JSP/Servlet technology?Well, a servlet / jsp is generated on the server, an applet on the client side. That's the most important difference. Appelt'[More]

How to forward an applet page to servlet/jsp?

Category:DefaultRelease time:-0001-11-30Views:130

I have an applet in imageMap.jsp file. This applet displays a map. When user enters the page of imageMap.jsp, they will see the map . If user clicks a point of the map, the latitude and longitude of that point should be sent to Search.java servlet an[More]

Sending an image from an applet to  a servlet

Category:DefaultRelease time:-0001-11-30Views:130

I have sucessfully set up a Serializable connection between my applet and my servlet. However if i try to pass an object that implements the serializable interface that has a BufferedImage object encapsulated in it... a NotSerializableException is th[More]

High performance writing Chinese from an Applet to a Servlet

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I am using DataOutput/InputStreams to wrtie UTF (Chinese Characters from an Applet to a servlet) Now, I already HAVE the chinese characters in the applets memory and I need to write them to the servlet. I am using the "writeUTF()" and "[More]

How to call a Applet from a servlet and vice versa...?

Category:DefaultRelease time:-0001-11-30Views:130

Hi all Can anyone help me how to call a applet from a servlet and vice versa. When the applet is called it should contact the database (oracle8i) and get the data. When i submit the applet form the data in the applet should be saved in the database.[More]

Applet that calls servlet

Category:DefaultRelease time:-0001-11-30Views:130

How to achieve something like this: i ve got a simple applet that calls servlet or JSp. when i get the response i would like to show it like a new page canceling the previous one with applet. Please Help. I have no idea how to using the data from res[More]

How do i make http connection  from an applet to  a servlet

Category:DefaultRelease time:2015-10-11Views:130

i am not able to make a http connection from the applet to servlet my code for servlet is as follows import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class newDatabaseServlet extends HttpServlet { //      Connection con;[More]

Applet talking to Servlet - Please help!!!

Category:DefaultRelease time:2015-10-11Views:130

Hi, Below is the code for a very simple servlet. After that is the code for an applet that sends a query to the servelt. After that is the .html file that invoques the applet. At the bottom is my directory structure and the location of my files. This[More]

How can my applet communicate with servlet via HTTPS?

Category:DefaultRelease time:-0001-11-30Views:130

hi all, I'm using jdk1.4.2_03. Tomcat 4.1.27/29. My applet used to communicate to serlvet/JSP via http protocol. However, I wish to apply SSL in my tomcat standalone. Is there any implication towards my existing applet to servlet codes? For example,[More]

Hot
Hi everyone, my application creates in memory schema using JDOM. In Java 6 validation runs fine, but in Java 5 (which is the target platform currently) it fails. I tried a second test with just parsing an existing XSD document (not created using JDOM [More]
hey whenever i click for updating my software an error comes saying 'there is prob with ur iternet connection. pls check ur internet connection' . bb set- tour 9630 pls help me to sort our this probHi and Welcome to the Community! Are you making this [More]
This is something that could previously be found in Inspector under document setup or whatever, but obviously with inspector being phased out, it's moved. I hope it hasn't been replaced, as document endnotes were something I depend on a lot for Chica [More]
Hi If a Purchase Requisition is in the system and it has been approved by managers, but it has not yet been turned in to a Purchase Order, does the value of the purchase requisition show up as committed dollars on budget? I really appreciate your hel [More]
Hi- The PHP exception code doesn't seem to get mapped into a FaultEvent...only the exception *message* seems to be available in a FaultEvent. I was hoping to use an exception code in a FaultEvent to drive logic in Flex (i.e if code == 100, then x, if [More]
Photoshop CS question. Has anyone ever suddenly lost their "license configuration data"? I get this error when I start up Photoshop: "The license configuration data for Adobe Photoshop is no longer usable". I click "OK" and i [More]
I have 36 buttons I need action on. To avoid a lot of similar commands, I am trying to assign the button names in an array using a for loop. Tracing the array values, gives the correct button names, but there is no action when I press the buttons. If [More]
请问: 怎么改web dynpro view 的背景色.推荐几个有关的资料: Note: 1088717 SAP Library: http://help.sap.com/saphelp_nw04s/helpdata/en/46/89af7fbe4d429ee10000000a1553f7/content.htm http://help.sap.com/saphelp_nw04s/helpdata/en/79/affe402a5ff223e10000000a155106/frameset.htm [More]
After opening a connection, I wrote some SQL, run it and then click disconnect, SQLDEV asks if it should save file, when I click Yes, I get following error. Any idea on how to resolve it? Remember it is trying to save the file, also another thing I n [More]
My iPhone has two lists of calendars. One is On My iPhone, which has a list of "plain" calendars (e.g. Business) and not-so-plain calendars (e.g. Business[[email protected]@calendar]. (I think the last word is calendar. All I can see on the phon [More]