Cheong,

There are a couple of ways to do this.

1. Javascript - Applet communication. Javascript code can invoke a method in
an applet. Perhaps when the form is submitted, an event could trigger a
javascript method call on the applet to find what the value is.

2. Applet javascript communication. This requires the use of the netscape
class package (java40.jar I think). The selection of a date on the applet
could trigger a call to a javascript function, passing the date as an
argument.

3. Applet - Server (JSP/Servlet) session communication. This is how I have
done this lately. The applet communicates directly with the server which
updates the session object. Because the applet's HTTP requests use the
browser context, the cookie info, such as session ID are passed. I use GET
parameters for simple data and XML for more structured information.
Of course, if the whole purpose of the page is to retrieve the date from the
user, this method makes the HTML form redundant.

On the other hand, if the data retrieved by the applet is only one step in a
multi-step form, then the you would need to use steps 1 or 2 to retain any
data that has already been entered by the user.

I hope that helps.

Good luck.

Grant Doran
NSW Dept. Education and Training


-----Original Message-----
From: Cheong Takhoe [mailto:[EMAIL PROTECTED]]
Sent: Monday, 27 March 2000 18:47
To: [EMAIL PROTECTED]
Subject: Value from applet


Hi,

Would like to know how would I be able to retrieve a value set by an applet,
say a Calendar applet. After setting the desired date, I would then click on

the Submit button, but how would the receiving jsp retrieve the parameter
value from the applet?

regards,
Cheong Takhoe

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to