You'll need to break up the string into its components and then it's a simple matter of using the appropriate HTML markup be it <p>'s <div>'s <br/>'s or tables. [ December 14, 2004: Message edited by: Bear Bibeault ]
If it is the string parsing that is giving you problems, rather than the HTML markup to achieve your goal, check out the StringTokenizer class, or perhaps the String.split() method. If this is where your problems lie, perhaps this topic would have been better moved to one of the java in general forums (I originally thought it was the markup you were having problems with).
If this is the case, please ask Eric (this forum's bartender) to move the post accordingly. [ December 15, 2004: Message edited by: Bear Bibeault ]
Well...Am I correct in understanding your requirement? You get the "nameresult" and wish to display items, one after the other.
How about this?
1. Say, you have a table, from which you query for names. 2. The result is returned, with say 5 names. 3. Now, put these names into an ArrayList. 4. Pass the ArrayList as a request parameter to the JSP 5. Get the passed ArrayList and Iterate it. 6. Write the elements of the ArrayList as table data in new rows of a table.
This would give display, one below the other.
If it would be in a single line, remove all the <tr>s and have a single <tr>, with many <td>s.