There are many basic jsp articles, but there are still many friends who asked me some questions about getting started with jsp. So I simply wrote my own installation process,
I often use ghost to restore the system. After the recovery, there is no jsp running environment. The operations are as follows:
1
Install j2sdk-00004_2_04-windows-i586-p.exe (all installed by default)
2
Configure classpath,
Classpath = c: j2sdk1.4libtool. jar; c: j2sdk1.4libdt. jar;
3
Decompress resin2.1.12 to c: resin
4
Enter
C:
Cd resin
Cd bin
Httpd-install
5
Modify c: resinconfresin. conf
Change <app-dir> doc </app-dir> to <app-dir> d: wwwjsp </app-dir>.
D: wwwjsp is my jsp service directory.
6
Install mysql by default
Enter c: mysqlbin, run winmysqladmin.exe, and enter the user name and password (the system has the default
Username and password ),
7
In [SERVICE] (my computer -- control panel -- Management Tools -- service), find mysql and start
8
In [SERVICE] (my computer -- control panel -- Management Tools -- service), find the resin web server and start
9
Create hello. jsp under d: wwwjsp with the following content:
<% Out. println ("hello, world"); %>
10
In ie, enter http: // localhost: 8080/hell. jsp to display hello, world, and OK.
To connect to mysql
11
Download the mysql driver, org. gjt. mm. mysql
Http://www.jspcn.net/htmldown/51654541354348.html
12
Put it under d: wwwjspweb-inflib
13
To write the jsp program for mysql to connect to the database, refer to the following:
Http://www.webjx.com/program/200410181.htm
Change the connection string:
String url = "jdbc: mysql: // localhost/test? User = root & password = & useUnicode = true & characterEncoding = 8859_1"
Create a table in the database test. You can search for related mysql operations.
14 test, should be OK