• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

proper way to display the result of a SQL query in my servlet?

 
John Piper
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I keep getting stuck on this.

Here is my servlet:



I'd like to know the correct way to post the result of this query in the servlet:


after the is


If someone could provide me that information you will seriously make my night. Thanks everyone.
 
Vijitha Kumara
Bartender
Pie
Posts: 3918
10
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the output you get now? Do you know how to access a result set data? And there seems to be some mismatched tags like <table> in your code...

And just as writing Java code inside JSPs is a bad practice, writing HTML inside Servlets also outdated. So as an enhancement you may consider moving your display logic in to JSPs and the data access logic to POJOs or any other alternative.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic