Latest JSP environment configuration method

Source: Internet
Author: User

1. Configure JDK
1. Download JDK
and decompress the package. Assume D: \ jdk6. Make sure that the bin directory is in this directory, the following java_home directory is D: \ jdk6.
2. configure system variables
(1) Right-click my computer ", select "properties"-"advanced" and click "environment variables ".
(2) in the "System variables" box, click the "new" button, enter "java_home" for "variable name", and enter the variable value in the directory where JDK is extracted, that is: d: \ jdk6.
continue to add the classpath variable value as ".; % java_home % \ Lib \ tool. jar; % java_home % \ Lib \ RT. jar; "
classpath can also be configured as D: \ jdk6 \ Lib
(3) Click" new "under the" user variable "box, set "path" to "variable name" and "variable value" to "% PATH %". % java_home % \ bin "
If Tomcat is installed, you can simply dress up.

2. Configure Tomcat
1. Download the Tomcat zip package and decompress it.
2. Modify startup. BAT file:
Add the following two lines before the first line --
set java_home = (JDK directory)
set catalina_home = (Tomcat directory after decompression)
if you need to use shutdown. if bat closes the server, add the above two lines.
3. In this way, run startup. BAT to run the server, and run shutdown. BAT to shut down the server.
3. Add tomcat to the service
1. Modify the service in the bin directory. BAT:
Add the following Code :
Add
REM Add the following line
set catalina_home = (Tomcat directory after decompression)
If REM has never installed tomcat, or ensure that services. MSC starts the Service Manager to check that there is no Apache Tomcat System Service. Now you can go to step 2 of REM. Otherwise, go down and reset the service name. You can customize the service name
REM to modify the following lines according to the description
set SERVICE_NAME = tomcat5
REM the row above, tomcat5 is changed to the service name you need. This will be the service name that will be operated later using net start/stop.
set pr_displayname = Apache Tomcat
in the above line of REM, change Apache Tomcat to the service name you need. This will be displayed in the Service Manager.
set pr_description = Apache Tomcat server-http://jakarta.apache.org/tomcat
REM does not change this line does not matter, is the service description, according to your own preferences.
-----------------------------------------------------------------------------

2. Run cmd to open the console, enter the Tomat directory/bin folder, and enter the following command to run.
Service. Bat install
ProgramTip: the service 'tomcat 5 (or SERVICE_NAME after you modify one) 'has been installed
It indicates that the Tomcat service has been installed successfully.
By the way, running service. Bat remove can remove the service.
3. Here, the service is successfully added and services are run. MSC, you can see the added service. By default, the service runs manually. In its properties, change the Startup Type to "automatic ", after the machine is started, Tomcat will be started in the background.

4. Console Control Service commands
Start the service
Net start service name
Close service
Net stop service name

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.