3 回答

TA貢獻(xiàn)223條經(jīng)驗(yàn) 獲得超56個(gè)贊
新建的時(shí)候沒有index.jsp ? 去tomcat下 webapp里面 找個(gè)例子 拷貝一份出來(lái) 刪掉不相關(guān)的

TA貢獻(xiàn)24條經(jīng)驗(yàn) 獲得超10個(gè)贊
<%@ 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>
添加回答
舉報(bào)