Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet +bean

 
sri jaisi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

iam having a student table;iam using jsp to present the table and want to use servlet to process and a bean(getter and setter )methods to retrieve
and store data into student table.can anyone please tell me how to access bean in servlet;will it work just by creating a reference for a bean class
in servlet ;do i have to load the java driver in all the servlets inorder to access the database;

thankz
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. you can create a object of the java Bean in Servlet.
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do i have to load the java driver in all the servlets inorder to access the database;


Probably you can use a self made utility class to load driver and get connection.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not an advanced question. Moving to the Servlets forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic