struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dasgupta, Ranjan" <>
Subject RE: Using iterator tag to retrieve list from session
Date Tue, 26 Aug 2008 21:10:58 GMT
you are using the same instance of the Round object and adding to the list. create a new Round()
in your while loop.

-----Original Message-----
From: Chriss Nold []
Sent: Tuesday, August 26, 2008 4:26 PM
To: Struts Users Mailing List
Subject: Re: Using iterator tag to retrieve list from session

Thanks Lukasz,
    most of the java/struts I know I learned while working for a company that used sessions,
so that's what I used and I have never used Hibernate.
Do you know of any good resources for this off hand?  I have no problem with learning new
tech, I am the only person on this project, so have no feedback on what I could do to improve..
lol I think that I may have found part of the problem.  When I put the following println in
my action class:

        session.put("eventList", eventList); System.err.println("Session objects: " + session.get("eventList"));

I received the following results in my console:
Session objects: [round.Round@1ede0c9, round.Round@1ede0c9, round.Round@1ede0c9]

Wouldn't this indicate that the same round object is being referenced three times?


On Tue, Aug 26, 2008 at 3:17 PM, Lukasz Lenart <
> wrote:

> Hi,
> I don't know why you use Session to store the list, much more
> efficient is to every time use Database, you can use Hibernate also.
> Add List<Round> getEventList() getter to your action and put your db
> code there. On each request you will get fresh list from db. In such
> case you don't have to have Session dependency.
> Could you also check you Html source? It looks like you have some mess
> with generated html tags.
> Regards
> --
> Lukasz
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message