JSP running environment Getting started setup

Source: Internet
Author: User
Tags mysql string
Js
JSP basic articles have a lot of, but still have a lot of friends asked me to get started JSP some related issues. So simply to write their own installation process,

I often use ghost to restore the system, after recovery, no JSP running environment, I operate as follows:
   1
Install J2sdk-1_4_2_04-windows-i586-p.exe (full default installation)

   2
Configure Classpath,
Classpath=c:\j2sdk1.4\lib\tool.jar;c:\j2sdk1.4\lib\dt.jar;

   3
Unzip resin2.1.12 to C:\resin

   4
Enter under CMD
C:
CD resin
CD bin
Httpd-install

   5
Modify C:\resin\conf\resin.conf
Change <app-dir>doc</app-dir> to <app-dir>d:\www\jsp</app-dir>
Where d:\www\jsp is my JSP service directory

   6
Install MySQL, full default installation
Enter c:\mysql\bin\, run Winmysqladmin.exe, enter user name and password casually (System has default
User name and password),
7
in [services] (My Computer--control Panel--management tools-services), find MySQL, start

   8
in [services] (My Computer--control Panel--admin tools-Services), locate the Resin Web server, start

   9
Create hello.jsp under D:\www\jsp, as follows
<% out.println ("Hello,world"); %>

   Ten
IE input http://localhost:8080/hell.jsp, show Hello,world, OK

To connect to MySQL
One
Download MySQL driver, org.gjt.mm.mysql
   http://www.jspcn.net/htmldown/51654541354348.html

   of
Put it under the d:\www\jsp\web-inf\lib.

of
Write MySQL connection database JSP program, refer to the following:
   http://www.webjx.com/program/200410181.htm
Where the connection string is changed to:
String url = "jdbc:mysql://localhost/test?user=root&password=&useunicode=true&characterencoding=8859_ 1 "
Build your own table in database test, the MySQL operation can find

   -Test, should OK


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.