Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to show user preferences?

 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • 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
  • 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.
    Bookmark Topic Watch Topic
  • New Topic