由于前面配置过Android的JDK,所以我此时从Tomcat开始进行配置。我下载的apache-tomcat-7.0.59.exe,下面是安装过程,通常是8080端口:
<html> <body> <h1>第一个tomcat运行程序!!!</h1> </body> </html>调用浏览器访问,运行结果如下所示,这也标志这Tomcat安装成功。
安装MyEclipse,下面是免费下载地址,按照里面的PDF配置激活MyEclipse。
http://pan.baidu.com/s/1bnuEcnd
运行MyEclipse,我的工作空间安装目录是F:\MyEclipse\Workspaces\MyEclipse 10。新建Web Project,项目名称为FirstWeb。
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
This is my JSP page. <br>
</body>
</html> 最后实现的网站效果如下图所示,我后面的文章也将简单介绍一些技术。希望文章对大家有所帮助,如果有错误或不足之处,还请海涵~Java+MyEclipse+Tomcat (一)配置过程及jsp网站开发入门
原文地址:http://blog.csdn.net/eastmount/article/details/45492065