代码改变世界

eclipse中java Dynamatic web的创建过程(或者eclipse中jsp的创建或eclipse开发环境(jdk,eclipse,tomcat)的测试)

2017-06-11 15:51  伟大的程序员2  阅读(261)  评论(0编辑  收藏  举报

1.启动eclipse程序。

2.File-New->Dynamatic web project,如图

3.右击项目名-->new-->New jsp file--->

点击Finish后,如下图所示

4.在body中添加一句hello,world,如下图所示

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!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!
</body>
</html>

5.运行项目

点击右键-->run as -->run on server-->Finish,运行结果如下,

注:此项目需要安装tomcat,并且本例使用的是外部服务器,需要在eclipse中的perefernce中进行设置。