> I've heard tell of folks serializing things such as this.  If you're not 
> in a distributed environment (or you somehow manage to have a shared 
> directory available to all nodes of the "cluser") you could probably do 
> the same.
> Doing something along these lines would not only reduce the load on the 
> DB, but enable the user the priviledge of having the same settings on 
> every machine they visited the site from.

You guys are full of ideas!  I went with a boring old boolean[] that gets
filled up like so:
      boolean[] profileSections = new boolean[ cookieValue.length ];
      for (int i = 0; i< cookieValue.length ; i++ ) {
         profileSections[i] = (cookieValue[i] == 'Y' ? true : false );
      }
and then stuck in the request:
      request.setAttribute( "profileSections" , profileSections );

The JSP code then checks to see if it should display a particular section:
<c:if test="${profileSections[0]}">
  <table>...</table>
</c:if>

The bean with well-named methods is a much better idea, but this was easy
enough without adding another class.  I really wanted to stay out of the
database for this part.

Thanks!  I really couldn't find the right place to ask about this, so I
appreciate your help even though it isn't strictly on topic.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

Reply via email to