| Author |
Displaying the result set
|
Mary Wallace
Ranch Hand
Joined: Aug 25, 2003
Posts: 138
|
|
I am having difficulty in dispalying the result frm db. this is my query which is working fine and in the page when i use <%=s%> this I am getting error. Is something wrong what i am doing <%=s%> giving me an error. How should i display s . System.out.println printed s correctly/ Thanks in advance
|
 |
Tim Baker
Ranch Hand
Joined: Oct 04, 2003
Posts: 541
|
|
well it depends where you are trying to use s. because s is declared in that while loop, you can only use s in that while loop, because it takes on many values you would only want to anyway. so lets see the actual bit where you use s. if you are going to use it within the while loop it is much easier to do: out.println(s); rather than %> <%=s %> <% which may be what you were doing? you probably also want to put some HTML either side of s so it's probably more like out.println("<blah>" + s + "</blah>"); etc etc
|
Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
|
 |
steve souza
Ranch Hand
Joined: Jun 26, 2002
Posts: 852
|
|
Look at the open source FormattedDataSet API for an easy way generating this type of dynamic text. A live demo is available at http://www.fdsapi.com that allows you to enter any query and return it as an html table. The html table also has clickable/sortable column headers. The direct link to the sort demo is http://www.ssouza.com/fdsapi/sortdemo.jsp steve - http://www.fdsapi.com - The easiest way to generate dynamic text including HTML and XML.
|
http://www.jamonapi.com/ - a fast, free open source performance tuning api.
JavaRanch Performance FAQ
|
 |
 |
|
|
subject: Displaying the result set
|
|
|