• 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 highlight the select item in JSP?

 
Greenhorn
Posts: 21
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

When I click a Hyperlink, It will redirect to some JSP page. In that page the select items will be dynamically coming from database. When that JSP page is displaying to the end user I have to check in session the select property value is present or not.If there, then I have to highlight that value in select list. Generally the list will be with select by default. Eg: Select Process: Select. But the property value in session then i have to highlight means I have to display that value in the select list to the user
Eg.Select Process: Major (IF Major in session)


Thanks in Advance.
Laxman Chowdary.
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can put the select list and the item selected in request or session depending upon your use case, and use jstl to iterate over select item list. The following code should help.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic