JSP environment structures of the Eclipse

table of Contents

First, the resources to prepare
two, TOMCAT installation and configuration
Third, the local server to verify
four, Eclipse's Web plug-ready
five, TOMCAT related to Eclipse
VI, the first to write a JSP file

A resource ready

1. The premise is installed the Eclipse
2.JAVA the jdk package download: HTTPS: //www.oracle.com/java/technologies/javase-downloads.html
3.Tomcat download: http: //tomcat.apache.org/ download-70.cgi
 select the corresponding version of the system to select the corresponding archive at Core, can extract

! Note: jdk version to version adapted and TOMCAT, TOMCAT version greater than or equal to jdk version, such as jdk1.8 and above need TOMCAT8.0

Two, jdk TOMCAT environment variables and configuration

TOMCAT
1. Copy the folder path TOMCAT such as: D: \ the Apache-Tomcat-8.5.51-Windows-x64 \ the Apache-Tomcat-8.5.51
2.> Environment Variables in the New System Variable CATALINA_BASE in Computer> System> Advanced System Settings , CATALINA_HOME, TOMCAT_HOME, the above values are TOMCAT folder path
3. open the system variable pATH, which was added in the TOMCAT_HOME%% \ bin
jdk
path 4. the new system variable JAVA_HOME, whose value jdk as: C: \ Java \ jdk1.8.0_201
5. the open system variable PATH, added thereto% TOMCAT_HOME% \ bin

Third, verify the local server

1. Open the bin directory TOMCAT folder, double-click startup.bat program, pop-dos interface, represents the local server has been set up, do not shut down during the trial period

2. Then enter in your browser to http: // localhost: 8080 /, the following interface will pop up

  Big success! Description TOMCAT has been fully deployed well!

Four, Eclipse's Web plug-in ready

First, check if the plug-in installation jsp:
 start Eclipse> File> New> Project to find out if there are Dynamic Web Project option, any skip this step.

Not to continue slightly
1.Help> About to view your version number, here is 4.10.0

2. Installation requires plug Help> Install New Software> select sites with the corresponding version of the Work with dropdown box, there may be several, will look them
 open WEB option loaded in the bottom, XML, JAVA EE AND OSGi Enterprise Development checking these, what we lack
 - Eclipse the Java EE Developer Tools
 - Eclipse the Java Web Developer Tools
 - Eclipse Web Developer Tools
 - Eclipse XML Editors and Tools
 -JST Server Adapters
 -JST Server Adapters Extentions

3. After installation restart Eclipse, then you can find the Dynamic Web Project

Five, TOMCAT related to Eclipse

1.Eclipse> the Window> Preferences> Server> the Runtime Enviroments
2. Add click and select the corresponding version of apache path, Finish following is complete Pirates

3.Eclipse> Window> Show View> Servers click New Server, select the corresponding version, two from their own name, Finish

Sixth, the first to write a JSP file

1.Eclipse> Window> Web Browser select to open the browser
2. Create a Dynamic Web Project, New in the WebContent directory> JSP File

atest.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
我真是机智啊
</body>
</html>

3.atest.jsp > Run As > Run on Server

! If garbled check coding problem
! Before starting close attention startup.bat

[Quote]
use eclipse to develop java web project
how to solve the problem of eclipse no Dynamic Web Project
configuration eclipse JSP environment

Guess you like

Origin www.cnblogs.com/GaogaoBlog/p/12483813.html
Recommended