Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying data and making the data a link on a JSP.

 
Jason Gosingburg
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to display data from a table using SQL server. I have a class, servlet, and a JSP page. The data is displaying on the JSP page but I need to seperate the names and make them into links. What i'm trying to do is after they click on one of the names, it will display on another page after clicking on that link. I would appreciate any help. I'm new at Java so try to take it easy on me. Hey at least I got this far.

This is what I have to display the data on the JSP page.

<%

List jalNames = (List)request.getAttribute("Names");

Iterator it = allNames.iterator();

while (it.hasNext())
{
out.println(it.next() + "<br><br>");
}
%>

This will list the 10 names not in the correct order as I have them in the database, Why? Can somebody help me with that also?

Thank You.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64838
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jason, please do not cross-post the same question in multiple forums. Please continue any discussion here.

Since the thread that Bear linked to no longer exists, I have reopened this. -- MdQ
[ December 22, 2004: Message edited by: Marilyn de Queiroz ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic