Check out the some of the Wddx samples at http://www.wddx.org.  WDDX works
great for passing complex data between JavaScript forms and servlets.  WDDX
is an XML markup that allows you to serialize complex data from one language
(JavaScript for example) and then deserialize the XML into an Object in
another language.

Here's how you would write your app using WDDX:

1. Insert JavaScript form data into
JavaScript WddxRecordSet object

2. Serialize record set into a WDDX packet
using the JavaScript function WddxSerializer.serialize(recordSet)

3. Submit the WDDX packet in a post to a servlet

4. Deserialize the posted wddxPacket into a
Java Wddx RecordSet object using
RecordSet rs = (RecordSet)WddxDeserializer.deserialize(wddxPacket);

5. Use the servlet to process submitted data from the RecordSet object.


-Spike

> -----Original Message-----
> From: Chris Gow [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 28, 1999 2:59 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Best way to pass data between HTTP servlets
>
>
> -----Original Message-----
> From: Robert Martin [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 28, 1999 1:05 PM
> To: [EMAIL PROTECTED]
> Subject: Best way to pass data between HTTP servlets
> Importance: Low
>
>
> I am working on a servlet that generates an HTML table where
> each table row
> contains information about a row in the database along with a
> checkbox.  The
> user selects the checkboxes next to the rows he is interested
> in performing
> additional processing on and then presses the submit button.
> This posts the
> information to the next servlet, which presents additional
> screens.  I want
> to send several columns of data for each selected row, but
> the checkbox POST
> only allows for <name>=<value>.  What is the best way to pass multiple
> pieces of information between servlets in this manner?
> Should I make the
> value a delimited string and have the next servlet tokenize
> it?  Or is it
> better to send one column of data and then have the next
> servlet re-query
> the database for the other columns?  Other better methods?  Tnx.
>
> Robert S. Martin
> Software Engineer
> First Quadrant, L.P.
>
> ______________________________________________________________
> _____________
> 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

___________________________________________________________________________
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

Reply via email to