struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sloan Seaman" <>
Subject Re: How do you keep your session junk free?
Date Fri, 07 Mar 2003 16:33:22 GMT
I kinda have a class that does that if you want.

I have an Action called ChainAction that can call N number of actions in a
row and passes the same form and request info through all the actions.

The last action in the chain is then used to do a foward to whatever.

This is how I control all application flow via the struts-config file.

  <action path="/app/campaign/promotion/type/pantryLoading/introAddChain"
   <set-property property="ROLE" value="admin"/>
   <set-property property="PROPERTY_NAME" value="action"/>
   <set-property property="CHAIN" value="Do Delete :
   <set-property property="CHAIN" value="Add Bitmap :
   <set-property property="CHAIN" value="Next:
   <forward name="PAGE_CHAIN_ERROR"
   <forward name="PAGE_ACCESS_DENIED"

This action does security first (we have a custom system that does role
based security down to the action level).  If the user does not have access
it send them up the chain one step.  They continue up the chain till they
hit a point where they do have access.  This way we get them to ass deep as
they can go (get your mind out of the gutter). Anway..

The chains work by defining a PROPERTY_NAME that relates to an any element
in a form.  In this case, submit buttons.  If the user clicked "Do Delete"
it sends them to introSaveMessageAdd and then to deleteBitmap, and then to
the introAddPage.

This way my actions a very modular.

You can also do a DECHAIN which will run through the actions like normal but
the last one is treated as a seperate request and gets a new form and
request object (good for going from one form to another and not having bean

It also does other things like you can defined a message to put into the
session at the end of the chain, etc...

Anyway.. I can see if I can release the code if you want.

----- Original Message -----
From: "julian green" <>
To: "Struts Users Mailing List" <>
Sent: Friday, March 07, 2003 11:04 AM
Subject: Re: How do you keep your session junk free?

> It would be neat if you could group a bunch of action definitions
> together and have the form bean persist while the group remianed active.
> Julian
> David Graham wrote:
> >
> >> Explain how some other approach handles it in any better way? Use of
> >> token to prevent duplicate submissions works for me. And what do you
> >> mean by a continuation-style programming?
> >>
> > The token approach is an easy solution.  One of the sites listed was a
> > Smalltalk web framework.  It's good to look at things in different ways
> > but you could probably count the number of Smalltalk web applications on
> > one hand :-).
> >
> > David
> >
> >
> > _________________________________________________________________
> > Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message