am new to JSP,Can anyone please teach me how to make a connection between jsp file and Microsoft SQL Server database steps by steps?
I installed MSSQLServer 2012 also I'm using Windows 7 and I found that my computer do not have JDBC (I already have ODBC). Is this mean that I have to install some JDBC or SQL driver in order to make the connection? Which driver should I install and where can I get the driver?
If possible, please show me some example so that I can understand better..Thanks a lot.
You should not connect to your database in a JSP. In fact, there should be no code at all in a JSP. Java code in s JSP has been obsolete for 12 years! 12 years! Why would you be using such old and obsolete techniques that are considered a poor practice?
If you have Java installed, then you do have JDBC installed. What you probably don't have is the JDBC driver. You will need to obtain the JDBC driver for the particualr database that you will be using. Each database will have its own jar file that contains its JDBC driver. In your case, you'll need the one for SQL Server.
Once you have the driver, you should be using container-managed connection pooling in your web app, not grabbing connections yourself (and certainly not from a JSP).