Sending an ArrayList from servlet to Applet onload
Amos Matt
Greenhorn
Joined: Mar 30, 2007
Posts: 14
posted
0
Hi All,
I need to open an applet pop up from a servlet. I need to load the applet with an array list data.
Could you please tell me how to send data while opening the applet.
Thank you,
Amos
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32768
posted
0
If the data items to be sent are known at the time when the page containing the applet is generated, then you can use the <param> subtag of the <applet> tag. You could use parameter names like "item1", "item2" etc., and add an additional parameter called "numberOfItems" or some such.
This assumes that the web page is created dynamically using JSPs, but since you say that you're using servlets anyway, that shouldn't be a problem.