• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to show user preferences?

 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
While working on a Struts project, I found that it was very difficult to show user preferences (User selects a checkbox, when he logs in again it should show selected Values are coming from the database). We had to reset the user session for acheiving this.Any others who have faced a similar problem?
 
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vedhas,
can u explain ur question in more detail.
what i can understand is that:
user selects certain options in ur JSP Page.
He logs out
Logs in again
Now you have to show same values to the user, on that page(from database)
If this is the case than all you need to do is
create an ActionForm, map its variables to the html components.
Whenever user enters the data, read that data through ActionForm, and update the database.
Whenever u have to display the data, read the data from the database, set the variabes to the value u wish to display. and the JSPpage will get populated autometically.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic