cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Praher <jpra...@yahoo.de>
Subject Re: [XMLForm] xmlform-scope parameter
Date Wed, 15 Jan 2003 15:37:40 GMT
Am Mit, 2003-01-15 um 14.42 schrieb Sylvain.Thevoz@swisscom.com:
> Hello,
> 
> What is the difference between "request" and "session" for the value of xmlform-scope
parameter?
> 

request means that the values are stored in the request attributes like:

String formid = /*... */
Form frm = /* create the form */
Request requ = /* get it from somewhere */
requ.setAttribute( formid, form );

wheras session means that a session is used to store the values

Session sess = requ.getSession( );
sess.setAttribute( formid, form );

the difference is that Sesssion attributes persist over a
request/response cycle, whereas request attributes are lost when the
request is recycled (that is after the response has written itself to
the client ).

if you have multiple views i think it is better to choose session.
whereas when everything gets done in one request/response cycle you can
use the request scope since it is more efficent (don't requires session
storage .. )

hope this helps


> Thank you
> Sylvain
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message