Re: persistence after the request response cycle

2004-09-19 Thread QM
On Sun, Sep 19, 2004 at 07:25:26PM +0100, ian stone wrote:

: I'd like to extend the present setup so that after
: receiving the 1st POST data, the servlet responds with
: HTML page 2. HTML page 2 then returns form data via
: POST to the same servlet. The servlet would then save
: the accumulated responses from HTML pages 1  2 to the
: MySQL database.
:
: How can I get the servlet to remember or persist the
: response of HTML page 1 without writing to the
: database or to file.

Skim the servlet spec for session, specifically, HttpSession.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: persistence after the request response cycle

2004-09-19 Thread Craig Berry
The usual mechanism for this is to persist intermediate data to a session-scope object 
which is persisted after all data has been accumulated.  Struts provides excellent 
support for this pattern.


-Original Message-
From:   ian stone [mailto:[EMAIL PROTECTED]
Sent:   Sun 9/19/2004 11:25 AM
To: Tomcat Users List
Cc: 
Subject:persistence after the request response cycle
Hi All,

In my present set up I have a servlet serving a HTML
page, the HTML page returns the form data via POST
which the same servlet saves to a MySQL database.

I'd like to extend the present setup so that after
receiving the 1st POST data, the servlet responds with
HTML page 2. HTML page 2 then returns form data via
POST to the same servlet. The servlet would then save
the accumulated responses from HTML pages 1  2 to the
MySQL database.

How can I get the servlet to remember or persist the
response of HTML page 1 without writing to the
database or to file. 

Thanks
Ian





___ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://uk.messenger.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






RE: persistence after the request response cycle

2004-09-19 Thread Frank W. Zammetti (MLists)
The other common approach is to re-send the data for page 1 as hidden form
fields with the page 2 form submission.  That way, the second time the
servlet is executed, it is getting all the required data as part of
request.

As a general rule (which is broken often for one reason or another!), if
the amount of data is somewhat large (or could be, like a textarea's entry
perhaps), then session tends to be frowned upon because it becomes a
performance concern and a potential problem in a distributed environment. 
But if the size is small, session makes life easier, but be aware that
server resources are being eaten with sessions, therefore if you envision
a rather large client load, it can become an issue (but this tends to be
solvable just by throwing hardware at the problem most of the time).

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Sun, September 19, 2004 6:02 pm, Craig Berry said:
 The usual mechanism for this is to persist intermediate data to a
 session-scope object which is persisted after all data has been
 accumulated.  Struts provides excellent support for this pattern.


 -Original Message-
 From: ian stone [mailto:[EMAIL PROTECTED]
 Sent: Sun 9/19/2004 11:25 AM
 To:   Tomcat Users List
 Cc:
 Subject:  persistence after the request response cycle
 Hi All,

 In my present set up I have a servlet serving a HTML
 page, the HTML page returns the form data via POST
 which the same servlet saves to a MySQL database.

 I'd like to extend the present setup so that after
 receiving the 1st POST data, the servlet responds with
 HTML page 2. HTML page 2 then returns form data via
 POST to the same servlet. The servlet would then save
 the accumulated responses from HTML pages 1  2 to the
 MySQL database.

 How can I get the servlet to remember or persist the
 response of HTML page 1 without writing to the
 database or to file.

 Thanks
 Ian





 ___ALL-NEW Yahoo!
 Messenger - all new features - even more fun!
 http://uk.messenger.yahoo.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]