File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes How to display dynamic lables from the database in a Jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to display dynamic lables from the database in a Jsp page" Watch "How to display dynamic lables from the database in a Jsp page" New topic
Author

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

suneel kota
Greenhorn

Joined: Jun 06, 2006
Posts: 24
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

Joined: Feb 24, 2006
Posts: 6662
    
    5

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.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
suneel kota
Greenhorn

Joined: Jun 06, 2006
Posts: 24
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

Joined: Feb 24, 2006
Posts: 6662
    
    5

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display dynamic lables from the database in a Jsp page