• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display dynamic lables from the database in a Jsp page

 
suneel kota
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

How to display dynamic lables from the databse in a Jsp page.

Please help me out..

Thanks in adavance
SuneelKota
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That question is a touch vague. You could use a servlet to help you fetch the data from the database using a DAO and then attach the labels as session scoped attributes. You then read these labels from the JSP page. If you can tell us what these "labels" actually are and what the requirement is it might invite better and more specific answers.
 
suneel kota
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

Thanks for your immediate reply..

Is there any functionality or tag library to satisfy this requirement..

I need to display these lables in a jsp page dynamically..

If suppose username and password are there, instead of using properties file or hard coding like Username and password in jsp page..

Regards
SuneelKota
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I still dont understand your requirement. Do you want to read the labels from a database and display them in the JSP ? You can do that by attaching a List of labels in a scope and then iterating through them using JSTL with c:forEach.

If it is the values to the labels that you are reading from the database, then you either need to hardcode the label names in the JSP or obtain it from an XML or properties file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic