> how to pass info between applet and servlet using HTTP?

Good topic.

Something like this, within your applet, should do the trick ...

        String somevalue = "something to pass to the servlet" ;

        try
        {


letContext().showDocument(
                    new URL( "http://my-url/servlet/myservlet?var=" + somevalue ) , 
"_top"  );
        }   catch ( Exception e ) { // etc... }

Will pass to the doGet method of myservlet.class the value of "somevalue" assigned to 
the servlet variable (parameter) "var" (note drawback of Get method -- Post may be 
more appropriate to many applications).

Hopefully others will expand on this topic.


Phil

-----Original Message-----
From: Zhu Jiang <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, February 14, 2000 9:45 AM


>Hi, all
>
>Is there any body know how to pass info between applet and servlet using
>HTTP?
>
>regard
>
>zhu jiang
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
>FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to