• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to highlight the select item in JSP?

 
Laxman Chowdary
Greenhorn
Posts: 21
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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.
 
Piyush Mangal
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic