Mac OS X Snow Leopard

Source: Internet
Author: User

Mac OS X Snow Leopard

 

 

This tutorial will teach you how to create a JSP server running environment under the apple snow leopard system.


Step 1: Download Apache Tomcat for jsp development. A server that compiles JSP files is required, which is equivalent to IIS on windows. Apache Tomcat is a good choice. You can download and install Apache Tomcat from the official website for free. I downloaded version 6.0.35, you can find the relevant chain (tar.gz) IN THE http://tomcat.apache.org/download-60.cgi, download and decompress it to local.
Step 2: install Apache Tomcat and open the Terminal shell, that is, the "Terminal" in the utility. Enter the following command:
 

Cd/Library

Mkdir Tomcat

Create a Tomcat folder in the Library, and move the decompressed Apache Tomcat folder (apache-tomcat-6.0.35) to the Tomcat folder you just created:
 

Mv ~ /Downloads/apache-tomcat-6.0.35/Library/Tomcat

Create a shortcut named Home for this folder. You do not need to enter a large string of folder names every time:
 

Cd/Library/Tomcat

Ln-sfhv apache-tomcat-6.0.35 Home

If the version you downloaded is different, change the folder name in the command as needed. Create two environment variables:
 

Export JAVA_HOME =/Library/Java/Home

Export CATALINA_HOME =/Library/Tomcat/Home

Then, check whether the environment variable is successfully created:
 

Env

You will see all the environment variables. Normally, JAVA_HOME and CATALINA_HOME are available.
Next, modify the configuration file:
 

Cd/Library/Tomcat/Home/conf

Pico tomcat-users.xml

Modify the configuration:
 

Then press control + o to save and Press control + x to exit the editor. Of course, you can also use vi for editing. The results are the same.
Step 3: Start a very simple command of Tomcat to complete this task:
 

/Library/Tomcat/Home/bin/startup. sh

To stop Tomcat, enter the following command:
 

/Library/Tomcat/Home/bin/shutdown. sh

Then, the environment is built here.
Next, you can test whether the installation is successful. Enter http: // localhost: 8080/in the address bar of the browser, and confirm. If the installation is successful, you will see the welcome page of Apache Tomcat. To view the sample code of jsp, visit the following address: http: // localhost: 8080/examples/jsp
To test your website, copy the source code to the following folder:/Library/Tomcat/Home/webapps

 

 

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.