Hey!
>I know how info is received via submit method but how is the
information received by the servlet from an Applet?
Here's briefly, how we do it.
I suggest that you look at the JDK docs for java.net.* package, where
you will find information about URL connections. Once you are
comfortable using those classes, then it is easy to connect to your
webserver and access your servlet.
A URL request string might look like this:
http://yourwebserver/servlet/servletname?parametername=parametervalue1¶metername=parametervalue2
Upon some event in your applet, you would send this string over your URL
connection. This is similar to what happens when you click on the
submit button on an HTML form.
In your servlet you use getParameterNames() and getParameterValues().
You should know how to use those already, if you are comfortable with
HTML Post.
Also be aware of the restrictions related to the 'values' that you
send. You may have to use URL encoding.
If the string sent is long (pretty ambiguous I kown), using GET may be a
problem because it uses an environment variable that has restrictions on
size, while POST sends it as data. We have sent multiple MB using POST,
but typically we use GET.
I am sure that I have left out alot in this simple description. I
suggest getting some reference books on the subjects, which have
examples. We started out with Moss's and Hunter's books.
Also most of this can be found in the JDK and JSKD docs. The
documentation is a good source of information. I'm being sarcastic.
Please forgive. :>)
>And for last, where is the Applet code stored on the JWS.
This is not germaine to this E-list. Please send you Es in
plain-text-only for easy reading.
Sans adieu,
Danny Rubis
"Cote, Stephane" wrote:
>
>
> I know how info is received via submit method but how is the
> information received by the servlet from an Applet?
>
> Can the same servlet receive information from both Applet and HTML
> page?
>
> And for last, where is the Applet code stored on the JWS.
>
> Thanks...
>
>
> ,, Stephane DeCoeli Cote
> ` > [EMAIL PROTECTED]
> || ~ || w (925) 730-3717
> |||=oOOo=====oOOo=|||
> || \ /||\ / ||
> \/ || \/
> /\
___________________________________________________________________________
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