Off the top of my head...(I hope the formatting isn't too screwed up):
1. Construct, instantiate and initialize the vector in a class in your
servlet:
Vector vector = new Vector();
[loop to populate the array]
2. Construct the action listener (according to the type of event and
object) in your applet and make a network call to the servlet:
[whatever].addMouseListener( new MouseAdapter() {
public void mousePressed( MouseEvent e) {
if( e.[whatever]()) {
try {
URL url = "[http://path_to_your_servlet]);
} catch (...){}
});
3. Your JSP page (class) sends a copy of the vector in its response:
[servlet response code]
4. Your applet receives the vector through a bufferedInputReader and
processes the array contents appropriately:
BufferedReader input = new BufferedReader( new InputStreamReader(
u.openStream()));
You will need to import the following into your applet:
java.net.*;
java.URL.*;
java.applet.*;
java.io.*;
java.awt.*;
java.awt.event.*;
Hope this helps....
-mark
-----Original Message-----
From: Unni Nair [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 2:22 PM
To: [EMAIL PROTECTED]
Subject: Servelt to Applet - Vector parameter passing!!
Hello,
How do I pass a vector from a servlet to a applet and what i have to do
receive it properly in an applet?
Thanks.
-Nair
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html