eclipse启动tomcat报404
上一篇 /
下一篇 2015-12-09 17:34:11
双击Server中配置的Tomcat服务器,在Server Locations配置中选择第二个选项,use tomcat installation ,保存,重新启动Tomcat服务。如果Server Locations处于只读状态,则右键delete进行删除服务,再新建新的服务,然后双击就可以看见是可选了,再启动服务就行了。配置方法再强调下
1、jdk配置路径:window--preferences-java---installed JRES-Add
2、tomcat配置路径:window--preferences-Server-Runtime Environment-Add,且添加页面下方的JRE勿忘选择当前已配置好的jdk
3、新建项目new-other-Web-Dynamic Web Project
4、新建jsp文件,选择jsp文件右键Run as-Run on Server
5、OK
补充:jsp文件放在WebContent文件夹下,中文编码格式注意下,内容啰嗦下:
<%@ 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>
<text>success 成功
</text>
</body>
</html>
收藏
举报
TAG: