• Post Reply Bookmark Topic Watch Topic
  • New Topic

display record from database and servlet in jsp

 
rasha mohammad
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

,,,,,,,,,,,,,,,,,,,,,,,,,,,



it displays table every time i will run the server ?
gives the data twice and so on
 
rasha mohammad
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please reply as soon as
 
Tim Cooke
Sheriff
Posts: 3299
153
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, and welcome to the Ranch! :)

When posting your code on the forum we recommend that you UseCodeTags (<-- click) as it makes your post much easier to read. I've added them for you this time, see how much better it looks?

CodeRanch is made up of a handful of volunteers that offer help in their own time, because we love to do it. You should be aware that we all have other things to do from time to time, like a proper job, family, friends, hobbies, sleeping, you know that kind of thing, so you should not expect an answer right away. Following up your post almost immediately with "please reply as soon as" does nothing to encourage people to help you, in fact it does quite the opposite as you now appear pushy and demanding.

I recommend having some patience, take a breath, and see if anybody decides to help you out.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's start by fixing some of the errors in your code. First, you should never have instance variables in a servlet. Move all those variables to the doGet() method. What you have now is a recipe for disaster. Second, get rid of that scriptlet code in your JSP and replace it with proper JSTL and EL. Third, that database code belongs in a DAO but we'll overlook that for now while you work on the two more important issues.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!