Do homework today even a day of MySQL.
Finally I learned from the bitter, decided to start learning JSP from 0. The province is facing a situation that is not.
Busy all night. Eventually the database was connected, just. I'm so sad, I can't even ink a database.
。
。
<%@ page language= "java" import= "java.util.*" pageencoding= "Utf-8"%><% @page import= "Data.database"%> <% @page import= "java.sql.*"%><%string path = Request.getcontextpath (); String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
Included: Configuration of My.ini in MySQL
[mysqld]# set Basedir to installation path, e.g., C:/mysql # Set the installation folder for MySQL basedir=f:/datebase/mysql# set DataDir to Loca tion of data directory, # e.g., C:/mysql/data, or D:/mydata/data # set to MySQL file folder Datadir=f:/datebase/mysql/data[winmysqla Dmin]server=f:/datebase/mysql/mysqld-nt.exe#user=root #password =root# above is the configuration of Setup Winmysqladmin # Default-storage-engine=myisam
JSP connection MySQL----------first technical article