Data retrieved from database with use of servlet (not like your attempt above), returned back or passed to next page where with use of JSTL you would be able to do it much simpler.
You can pick up some general hints and tips from this tutorial
peter_budo
Code tags enforcer
15,432 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
One more thing that I forgot to add in the example.
If you want the HTML to create a link like this:
John
The jsp should be:
<%= rs.getString(1)%>
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
> but whats problem with this syntax?
The changes to internal implementation of the model [business logic + data] which affect the view which shouldn't be the case. Also a design which employs separation of concern is far more easier to maintain, change and troubleshoot.
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 733
Nothing to bless. You dealing with database connection from view, JSP document, that is bad thing to do. Ever heard of MVC Model2?
peter_budo
Code tags enforcer
15,432 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 901