使用Eclipse for J2EE 開發Web程序


長期以來,我們習慣使用myeclipse開發J2EE web程序。雖然myeclipse使用起來很方便,但它是收費的。

eclipse for j2ee 是免費的,並且足以保證我們平時的j2ee的開發,故推薦使用該版本的IDE.

eclipse官方網址:http://www.eclipse.org/

eclipse下載地址:http://www.eclipse.org/downloads/

 

 

打開eclipse, File>New>Dynamic Web Project, 新建一個動態Web項目,項目名自擬,如下所示:

在WebContent目錄下新建index.jsp

 

<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
hello world! welcome to use eclipse j2ee.
</body>
</html>

啟動已配置好的Tomcat:

在瀏覽器里輸入網址:http://localhost:8080/WebHelloWorld_Eclipse_JavaEE/index.jsp,得到返回結果。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM