Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic