You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Whittaker <mi...@ntlworld.com> on 2003/08/18 20:25:27 UTC

alternative to hidden?

Seems to me there is a need for a further scope.

application
session
subsequent_request
request

Like session but attributes are removed when the response has been committed
in the request following the one they are added in.

Has anyone come up with a neat way of implementing this?

Suppose you could have an Object that tracks number of requests it has seen.
By iterating through the session objects for a certain type (marker
interface?) in the ActionServlet, and removing them as neccessary.

Or is there a simpler way?

--
Mike W


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: alternative to hidden?

Posted by Hue Holleran <st...@openAction.net>.
A sort-of "server-side control state" ... hmmm - scarey. A better option
might be to incoporate all the state in a hidden field in the form that can
be added by a tag lib - a la .NET "_VIEWSTATE" and then re-created when the
form is submitted.

I can think of lots of concerns with what you describe - for instance, a
user with 2 instances of the browser open could easily cause carnage with
this facility. An alternative is to identify the exact "server state" by a
response "token" that would be unique per browser instance - but then this
would need to be in a hidden field, anyway - catch 22.

I like the idea in concept - I think, though there may be fundamental
limitations to HTTP that would unfortunately scupper any neat solutions for
this - but others may have some clever ideas.

Hue.

> -----Original Message-----
> From: Mike Whittaker [mailto:mike_whittaker@ntlworld.com]
> Sent: 18 August 2003 19:25
> To: Struts List
> Subject: alternative to hidden?
>
>
>
> Seems to me there is a need for a further scope.
>
> application
> session
> subsequent_request
> request
>
> Like session but attributes are removed when the response has
> been committed
> in the request following the one they are added in.
>
> Has anyone come up with a neat way of implementing this?
>
> Suppose you could have an Object that tracks number of requests
> it has seen.
> By iterating through the session objects for a certain type (marker
> interface?) in the ActionServlet, and removing them as neccessary.
>
> Or is there a simpler way?
>
> --
> Mike W
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org