On Tue, 17 Jun 2003, Brian McSweeney wrote:
> Hi all, > > I've a quick question. > > I have an object stored in the http session. The object has about 20 > parameters. > > I want to display this object's values in a page. At the moment I was > using the > > <bean:write > > approach passing in the scope being session and the name and parameter > values. > > However, if I use this twenty times, is it not better to define a copy > of the bean in page scope once, > and then just access that bean's values? > > Eg: something like - > > <bean:define id="myCopy" name="beanInSessionScope" . > > then later on in the page I can just go > > bean:write name="myCopy" etc. > > Am I worrying about this needlessly - is the optimization going to be > negligible? > The implementation details depend on the container, but the difference in accessing a page scope attribute versus a session scope attribute is likely to be vanishingly small. Under the covers, they're both Hashtables or Hashmaps (for Tomcat, it's the latter). > Thanks, > brian > Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

