Yep. Eventually the session times out, but in the meantime a wandering user
could theoretically accumulate a lot of garbage in their session.

(And it just occurs to me that a malicious user could exploit it to fill up
the memory with junk)

If however one follows the recomendations to keep the size of stuff in the
session small (ie: dont be caching several megs of stuff!) then it probably
still wouldn't amount to enough to be a serious problem in most cases -
except on those very high traffic sites (ie: amazon.com).  As a matter of
principle however I don't particularly like have obsolete objects lying
round when they should be made eligible for the GC - though of course I dont
let this principle stop me from using the session ;->

-----Original Message-----
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 23:18
To: [EMAIL PROTECTED]
Subject: RE: Please help decide a religious discussion


Then the session times out and the list goes away automatically.

Dave


>From: "Andrew Hill" <[EMAIL PROTECTED]>
>Reply-To: <[EMAIL PROTECTED]>
>To: "Struts" <[EMAIL PROTECTED]>,        "David Graham"
><[EMAIL PROTECTED]>
>Subject: RE: Please help decide a religious discussion
>Date: Fri, 27 Sep 2002 23:15:24 +0800
>
>Yes, but what happens if the user 'wanders off' in the meantime (ie:
>through
>one of the many navigation links ubiquitious to most sites) and never
>invokes the save action?
>
>(Having raised this point I should point out that I myself abuse the
>convienience of session context more than I ought too!)
>
>-----Original Message-----
>From: David Graham [mailto:[EMAIL PROTECTED]]
>Sent: Friday, September 27, 2002 23:06
>To: [EMAIL PROTECTED]
>Subject: RE: Please help decide a religious discussion
>
>
>It's not hard to know when to get rid of it.  First Action puts list in
>session, jsp displays list, Save Action removes list from session.
>
>Dave
>
>
> >From: "Andrew Hill" <[EMAIL PROTECTED]>
> >Reply-To: <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: RE: Please help decide a religious discussion
> >Date: Fri, 27 Sep 2002 23:04:00 +0800
> >
> >Well if the Action is needed to populate the drop-downs (these values
>being
> >in request scope I presume?) then after the form is submitted and
> >validation
> >has failed, you will need to reload these values. If you are loading the
> >values in an action you will need to go through that action. (The other
> >alternative is to store the info in session scope, but that creates the
> >potential problem of knowing when to get rid of it)
> >Perhaps the idea might be to have an action whose sole responsibility is
>to
> >populate the drop-downs and instead of forwarding directly to the view,
>you
> >go through this one first and it forwards you to the view after
>populating
> >the drop-downs.
> >
> >-----Original Message-----
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED]]
> >Sent: Friday, September 27, 2002 22:54
> >To: Struts Users Mailing List
> >Cc: Struts Users Mailing List
> >Subject: RE: Please help decide a religious discussion
> >
> >
> >
> >If I do that, will validation always go to the action class, even when it
> >fails?
> >
> >Steve
> >
> >
> >
> >
> >                     "Andrew Hill"
> >                     <andrew.david.hill@gri       To:     "Struts Users
> >Mailing List" <[EMAIL PROTECTED]>
> >                     dnode.com>                   cc:
> >                                                  Subject:     RE: Please
> >help decide a religious discussion
> >                     09/27/2002 09:50 AM
> >                     Please respond to
> >                     "Struts Users Mailing
> >                     List"
> >
> >
> >
> >
> >
> >
> >Sounds like you need to define the action and not the jsp as your input
>in
> >struts-config.
> >
> >-----Original Message-----
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED]]
> >Sent: Friday, September 27, 2002 22:40
> >To: Struts Users Mailing List
> >Subject: Re: Please help decide a religious discussion
> >
> >
> >
> >That is what we are doing now. It goes through a controller to the
> >database, but we are using the validator and when an error occurs, the
>form
> >does not go to the Action class and the helper methods are not called and
> >as a result, the drop downs are empty.
> >
> >Steve
> >
> >
> >
> >
> >                     "David Graham"
> >                     <dgraham1980@ho       To:
> >[EMAIL PROTECTED]
> >                     tmail.com>            cc:
> >                                           Subject:     Re: Please help
> >decide a religious discussion
> >                     09/27/2002
> >                     09:17 AM
> >                     Please respond
> >                     to "Struts
> >                     Users Mailing
> >                     List"
> >
> >
> >
> >
> >
> >
> >The Action class...but the action should be asking a helper object for a
> >list of whatever goes in your drop down.  It shouldn't know about the
> >database directly.  So you might have in your action.execute():
> >
> >List list = StateHelper.getStateList();
> >// put list in your form
> >
> >Dave
> >
> >
> > >From: [EMAIL PROTECTED]
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: Please help decide a religious discussion
> > >Date: Fri, 27 Sep 2002 09:13:35 -0500
> > >
> > >
> > >All,
> > >
> > >My team is currently at loggerheads about the correct place to put the
> > >database calls that are prepopulating our drop downs. We can not decide
> >if
> > >they should be in the ActionForm or in the Action class. We are trying
>to
> > >stick them in the validate method in the ActionForm to make sure they
>are
> > >always called in instances where the form does not get to the action
> >class
> > >(i.e. validation fails). But is this the correct way? I am thinking
>this
> >is
> > >nothing new. What is the correct way to initialize drop downs?
> > >And then what about closing the database connection?
> > >
> > >I would much appreciate any help. It would make our Friday alot
>smoother.
> > >
> > >Steve
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:
> > ><mailto:[EMAIL PROTECTED]>
> > >For additional commands, e-mail:
> > ><mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >_________________________________________________________________
> >Chat with friends online, try MSN Messenger: http://messenger.msn.com
> >
> >
> >--
> >To unsubscribe, e-mail:   <
> >mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: <
> >mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >
> >
> >--
> >To unsubscribe, e-mail:   <
> >mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: <
> >mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
>
>
>
>
>_________________________________________________________________
>Join the world�s largest e-mail service with MSN Hotmail.
>http://www.hotmail.com
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>




_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


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

Reply via email to