Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem about servlet and class  RSS feed

 
mehdi chorsi
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i have a problem
i want to show data in jsp page
i created a servlet page for this and i created a java class for fetch data from data base

now i don't know how can get connection between Servlet and class to get list from class !!!

ShowClassTypesServlet.java




InsertDataDAO.java



DisplayRecords.jsp

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
showData() builds a list which is good. It needs to return the list. Then the servlet can put the list in a request.setAttribute() call so it becomes available for the JSP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!