• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can I Retrieve data from database basing on dropdown list selection in servlets only

 
Sateesh Kumar Allu
Greenhorn
Posts: 9
Chrome Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks i advance..
I am going to build a servlet which retrieves data from database dynamically basing on dropdown list selection by user,,,,please Guide me to understand the logic...
 
J. Kevin Robbins
Bartender
Pie
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
I suggest you start with this. I think you need a better understanding of how web apps work.

You will need a web page that submits parameters to a servlet. The servlet will pass those parameters to a Data Access Object. That DAO will return a collection of records. The servlet will then forward that collection to a JSP page which will render the HTML display.

When I approach a problem like this, my first step is to get the SQL working. When I'm happy with that, I create the DAO. What the DAO returns depends on the application, but it's usually a collection of beans that represent the database record.

I'm probably getting ahead of you, so I'll let you digest this for a while.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic