1. Eclipse安裝tomcat
之前的eclipse安裝好了,這里把它他開
開始界面neon.2
設(shè)置工作站,就是以后你新建的項(xiàng)目都在這里面
歡迎界面 點(diǎn)x就行- 添加tomcat
添加tomcat服務(wù)
補(bǔ)上圖
- 新建工程
Paste_Image.png
Paste_Image.png
Paste_Image.png
文件目錄
- 書寫helloworld
在webcontent文件夾下新建
text.jsp
,內(nèi)容如下:
<code><%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jsp</title>
</head>
<body>
<%
out.println("Hello World!");
%>
</body>
</html></code>
- 新建servers服務(wù)
Paste_Image.png
next添加項(xiàng)目進(jìn)去,然后直接finish就行了。
右鍵new文件夾
Paste_Image.png
Paste_Image.png
完成