Drop down items


General J2EE: Drop down items

  1. Drop down items (2 messages)


    I'm trying to find a pattern that could solve my problem.

    I need to populate some dropdowns in the web page with items that are stored in the db. I'm getting the itmes using CMPs and then through session bean method.

    How can I cache this information. The items from dropdowns are need for all users but only one user can change them (admin).

    Do you know a such pattern ? Witch is the best way to transfer the information from business layer to web layer for this situation ?


    Threaded Messages (2)

  2. Drop down items[ Go to top ]

    Cache the drop down data in a Collection or Map, which you store in the ServletContext (which is global for all users).

    Initialize this data in the init() method of an InitServlet, and specify that this servlet is loaded on your application startup (<load-on-startup> value in your web.xml file).

    Provide admin servlets and JSP that allows you to refresh/update this list.
  3. Drop down items[ Go to top ]

    Thanks a lot.