When the app starts I put all the lists which are vectors into the
application session. I do this by getting the servletcontext object and
putting the vector into there.

Alex

*****************************************

Date: Tue, 7 Aug 2001 12:41:11 -0700 (PDT)
To: Struts <[EMAIL PROTECTED]>
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
Subject: Re: I think I found a bug in Struts?
Message-ID: <Pine.BSF.4.21.0108071238430.72473-100000@localhost>

On Tue, 7 Aug 2001, Alex Colic wrote:

> Hi,
>
> It took a while but I think I found why the lists I put in application
scope
> were not being refreshed.
>
> When my app starts I put a couple of lists into the servletcontext so that
> all my pages can access them. If the lists change I update the lists and
> then I expect the next time the user access the page that the lists would
> reflect the changes. I did a quick test and I found that my class was
> updating the list and putting them into the session.

Where are they really?  In the session or in application scope?

>
> That portion briefly is:
> protected ServletContext context;
> context.setAttribute("COMMON_PROBLEM_LIST",tbeList );
>
> On my page I have the following:
>
>       <logic:present name="CommonProblemList" scope="application">
>         <html:select property="wrTitle">
>           <bean:define id="list" name="CommonProblemList"
> scope="application" property="list" />
>           <html:options  collection="list" property="name"/>
>         </html:select>
>       </logic:present>
>
> I stepped through the logic:present tag and found that while it looks for
> the bean it goes into the RequestUtils class. It enters the lookup method
> and scan through the scope value. It is finding that scope does equal
> application but the bean it is returning is the old one with the old data.
I
> would step through the pageContext class but because it is abstract I am
> trying to find the concrete implementation of it.
>
> bean = pageContext.getAttribute(name, PageContext.APPLICATION_SCOPE);
>
> Any help in resolving this is highly appreciated.
>

The concrete implementation of PageContext (and every other interface and
abstract class in the Servlet and JSP APIs) is inside your servlet
container.

> Alex
>
>

Craig

Alex Colic.vcf

Reply via email to