SSH Framework Learning Environment configuration

Source: Internet
Author: User

1. Installation of Java environment

Install JDK7, choose 32-bit or 64-bit installation according to your operating system.

Configuration

After installation, you need to configure the environment variables as follows:

Configure the Classpath as follows:

and add the bin directory path in the JAVA6 installation directory in path, as follows:

Verify that the installation is successful, CMD enters the command line mode, enter Java, and the following screen shows the installation of Java complete:

2. Web Container Installation

This tutorial development environment uses TOMCAT7, and the Development tools catalog provides apache-tomcat-7.0.52.zip.

Unzip the installation package to their own computer, it is recommended not to extract to the Chinese directory, the teacher's tomcat8 placed in the F packing directory F:\ apache-tomcat-7.0.52.

Configuration

Some of the installation tutorials on the web mentioned the need to configure the Catalina_home environment variable, which points to the Tomcat directory, mainly for the sake of the use of Tomcat, if configured, you have more than one Tomcat directory on your computer can only successfully run that and Catalina_ Home consistent Tomcat, if not configured, will determine the Tomcat directory itself when you start Tomcat, which we will not configure.

Run

Run the Bin/startup.bat in the Tomcat directory, start Tomcat, if it does not start up to logs to view the error log, after startup there is a browser input http://localhost:8080/, enter the following screen to indicate that the Tomcat installation was successful.

3, STS Environment STS installation

STS (Spring-tool-suite) is Spring's custom development tool based on Eclipse, which currently uses a wide range of spring projects to facilitate the development of the spring project using STS development tools.

There are installation packages for STS in the developer directory, available in both 32-bit and 64-bit types:

Unzip the installation package to a fixed location, it is recommended not to extract to the Chinese directory, run: STS.exe, the first run will let you determine your own workspace, the workspace is where you create Project project, choose an easy to use directory as your workspace, the proposed workspace directory is not set in the Chinese directory.

Java Environment configuration:

Compiled version:

Select the Java Runtime Environment:

Tomcat Configuration Configuration Web Server

To configure the Web Server, the system uses TOMCAT7 as the Web container and needs to configure the Tomcat Server with the following configuration steps:

Click Finish

Add Tomcat Server

New:

Create a new server

Open the Tomcat view

Configure Tomcat

Timeouts: Delay time setting increased, set to 100 or more

Server Location: The default Project Deployment directory is in the workspace of the STS

Under the. Metadata\.plugins\org.eclipse.wst.server.core directory.

If there is a memory overflow when Tomcat starts the project, you can increase the virtual machine memory by using the method below.

Configure in VM ageuments (depending on your computer's settings):

-xms128m-xmx512m-xx:permsize=128m-xx:maxpermsize=512m

Default encoding workspace default character encoding

Change the default character set for a workspace to Utf-8

JSP file Encoding:

Web Engineering Testing

Create a Web project in the STS to test the Web project creation process.

Create a Dynamic Web project

Create success:

Create a new JSP:

Create a JSP under Webroot:

Deploy run in Tomcat

After adding a successful, you need to modify the Tomcat configuration, cancel the automatic deployment, the reason is to cancel after the use of debug to start the project can be interrupted point of test.

To save the configuration information:

Cleanup deployment:

Running the project requires that the project code be published to the Tomcat directory, which is first organized and republished:

Publish successfully view the Publish directory, the front of the configuration Tomcat server specified publishing project directory, default in the STS workspace directory. Metadata\.plugins\org.eclipse.wst.server.core directory.

Start the project, the general use of Debug mode:

Right click on "Debug"

Plug-in Installation Propedit plugin

The default properties file Editing tool in Eclipse is not good, the default is Unicode encoding, the input of Chinese will be automatically converted to Unicode encoding, after installing this plug-in, the properties file can be directly entered in Chinese, convenient file content writing.

In STS, this plugin is installed online:

When prompted, select Continue installation:

Installation succeeded:

STS Memory Settings

To prevent the STS from running memory overflow during startup, modify the Sts.ini file in the STS installation directory to add the following:

-xms128m

-xmx768m

-xx:permsize=64m

-xx:maxpermsize=128m

Font modification

Add Code Hints

In the red box above, enter:. abcdefghijklmnopqrstuvwxyz

SSH Framework Learning Environment configuration

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.