资源预览内容
第1页 / 共10页
第2页 / 共10页
第3页 / 共10页
第4页 / 共10页
第5页 / 共10页
第6页 / 共10页
第7页 / 共10页
第8页 / 共10页
第9页 / 共10页
第10页 / 共10页
亲,该文档总共10页全部预览完了,如果喜欢就下载吧!
资源描述
搭建JSP 开发环境软件准备: jdk*.7zeclipse-*.zipapache-tomcat-*.zipmysql-*.zipJava 环境变量: JAVA_HOMEC:Javajdk*/安装目录 CLASSPATH.;%JAVA_HOME%libdt.jar;%JAVA_HOME%libtools.jar;%JAVA_HOME%jrelibrt.jar Path;%JAVA_HOME%bin;%JAVA_HOME%jrebinTomcat 环境变量: CATALINA_BASEC:Tomcat*/安装目录 CATALINA_HOMEC:Tomcat*/安装目录 TOMCAT_HOMEC:Tomcat*/安装目录 CLASSPATH;%CATALINA_HOME%commonlibservlet-api.jar/视情况而定 Path;%CATALINA_HOME%binTomcat 安装/删除服务: cd %TOMCAT_HOME%bin service.bat install/安装 service.bat remove/删除Tomcat 测试: 1.到 Tomcat 的安装目录的 webapps 目录,可以看到ROOT,examples, docs 之类 Tomcat 自带的的目录; 2.在 webapps 目录下新建一个目录,起名叫 myapp; 3.在 myapp 下新建一个目录 WEB-INF,注意,目录名称是区分大小写的; 4.在 WEB-INF 下新建一个文件web.xml,内容如下:My Web ApplicationA application for test.5.在 myapp 下新建一个测试的 jsp 页面,文件名为 index.jsp,文件内容如下:Now time is: 6.重启 Tomcat; 7.打开浏览器,输入http:/localhost:8080/myapp/index.jsp 看到当前时间的话说明就成功了。MySQL 环境变量: MYSQL_HOMEC:mysql/安装目录 Path%MYSQL_HOME%binMySQL 配置文件my.ini 设置:# Other default tuning values # MySQL Server Instance Configuration File # - # Generated by the MySQL Server Instance Configuration Wizard # # # Installation Instructions # - # # On Linux you can copy this file to /etc/my.cnf to set global options, # mysql-data-dir/my.cnf to set server-specific options # (localstatedir for this installation) or to # /.my.cnf to set user-specific options. # On Windows you should keep this file in the installation directory # of your server (e.g. C:Program FilesMySQLMySQL Server X.Y). To # make sure the server reads the config file use the startup option # “-defaults-file“. # # To run run the server from the command line, execute this in a # command line shell, e.g. # mysqld -defaults-file=“%MYSQL_HOME%my.ini“ # # To install the server as a Windows service manually, execute this in a # command line shell, e.g. # mysqld -install MySQLXY -defaults-file=“%MYSQL_HOME%my.ini“ # # And then execute this in a command line shell to start the server, e.g. # net start MySQLXY # # # Guildlines for editing this file # - # # In this file, you can use all long options that the program supports. # If you want to know the options a program supports, start the program # with the “-help“ option. # # More detailed information about the individual options can also be # found in the manual. # # For advice on how to change settings please see # http:/dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html # # CLIENT SECTION # - # # The following options will be read by MySQL client applications. # Note that only client applications shipped by MySQL are guaranteed # to read this section. If you want your own MySQL client program to # honor these values, you need to specify it as an option during the # MySQL client library initialization. #client #password =1234 # pipe # socket=mysql port=3306 default-character-set=gbk mysql port=3306 default-character-set=gbk# SERVER SECTION # - # # The following options will be read by the MySQL Server. Make sure that # you have installed the server correctly (see above) so it reads this # file. # # server_type=3 mysqld# The next three options are mutually exclusive to SERVER_PORT below. # skip-networking # enable-named-pipe # The Pipe the MySQL Server will use # socket=mysql# The TCP/IP Port the MySQL Server will listen on port=3306# Path to installation directory. All paths are usually resolved relative to this. basedir=“%MYSQL_HOME%“# Path to the database root datadir=“%MYSQL_HOME%data“# The default character set that will be used when a new schema or table is # created and no character set is defined character-set-server=gbk# The default storage engine that will be used when create new tables when default-storage-engine=INNODB# Set the SQL mode to strict sql-mode=“STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION“# Enable Windows Authentication # plugin-load=authentication_windows.dll# General and Slow logging. log-output=NONE general-log=0 general_log_file=“WANGZHANGJIE.log“ slow-query-log=0 slow_query_log_file=“WANGZHANGJIE-slow.log“ long_query_time=10# Binary Logging. # log-bin# Error Logging. log-error=“WANGZHANGJIE.err“# The maximum amount of concurrent sessions the MySQL server will # allow. One of these connections will be reserved for a user with # SUPER privileges to allow the administrator to login even if the # connection limit has been reached. max_connections=100# Query cache is used to cache SELECT results and later return them # without actual executing the same query once again. Having the query # cache enabled may result in significant speed improvements, if your # have a lot of identical queries and rarely changin
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号