• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I access my dataaccess class from JSP?  RSS feed

 
Rich Barry
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi.. I have built and compiled a dataaccees class.. and I want to know how to call that class from inside a JSP to open the connection to my database? The class is called DataAccess.
Thx
Rich
 
Tim Holloway
Bartender
Posts: 18720
72
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The simple way is to write code into a scriptlet. However, it's usually preferred to write the data access details into a support class (or maybe this is what "DataAccess" is doing?) and access that class from scriptlet code -- the idea being that most of the JSP should pertain to display and the actual logic is in Java classes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!