I earlier asked the question ,"How can I make Servlet send some data to the applet ?"
The responses I got were , to convert that data to common transfer format for example xml,csv or use serialization. An advantage that was listed :
Those common transfer formats have the advantage that there are so many APIs/libraries available to convert between a complex Java object and a String or input/output stream in the common transfer format with a minimum of needed code. Finally you just write it to the output stream of the HTTP servlet response which will then be retrieved as input stream of the URL connection in the applet.
Because nobody mentioned that,I need to ask : Can't I make a call to the applet's function from the servlet that contains the data,and deliver the data to that applet ?
Are there any drawbacks with this ?
This is what I am doing right know :(I directly call the applet's function 'func')
// Snippet from the servlet
gdfd = new GetDataFromDatabase(queryString);
map = gdfd.getResult(); // Get the HashMap object from the bean
new PollForm().func(map); // Send the map object to the applet