• Post Reply Bookmark Topic Watch Topic
  • New Topic

newbie needs guidance

 
michael echavez
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone!
what would be the best way to create dynamic web pages? for example, i want to create a set of buttons which are, say, stored in a text file.. (and if i wanted to add a button i simply add a new entry in the text file) im thinking of doing it through JSP, do you think that would be the best way to do it? Your help is greatly appreciated.. and needed. Thank you. ;p
[ June 23, 2005: Message edited by: Bear Bibeault ]
 
Tim Baker
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you want to do requires two steps.

1. To read in your file one line at a time and store each line in a struture.

2. To iterate through the structure, writting out a button for each line.

If you do a google search for something like "JSP vs Servlets" you should find resources on when you would generally use each.

From what you have said using JSP would be perfectly fine. You might want to put the Step 1. into it's own class, and you can call that class from your JSP. The Step 2 could very easliy be done in JSP, check out tutorials on Iterators and JSP loops etc.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!