• Post Reply Bookmark Topic Watch Topic
  • New Topic

A separate for for connecting jsp to database

 
wemimo Aina
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone help me, I want a separate jsp file that can connect to database instead connecting to the database in every JSP file. I am using Netbeans IDE with Glass fish sever
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not be connection to any database in a JSP. JSPs are view components. Your database connections should be made in model classes.

Please read this article to understand how to structure modern Java web applications.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!