為什么出現了404?
web.xml里面的代碼是這樣的
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
? xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
????????????????????? http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
? version="3.0"
? metadata-complete="true">
</web-app>
JSP里面的代碼是這樣的
<!doctype html>
<html>
?<head>
?<title>我的第一個JSP頁面</title>
? <meta charset="UTF-8">
? <meta name="Generator" content="EditPlus?">
? <meta name="Author" content="">
? <meta name="Keywords" content="">
? <meta name="Description" content="">
? <title>Document</title>
?</head>
?<body>
? <h1></歡迎大家訪問我的主頁></h1>
?</body>
</html>
訪問貓臉頁面都可以,但是訪問JSP出現了404,這是咋回事?。?
2017-03-22
1、項目是否加載到服務器上面去 (停止服務器 重新啟動加載試試)
2、web.xml中沒有設定默認的初始界面(地址欄只寫項目名 不寫文件名時候加載的頁面)
2017-03-28
那怎么以管理員身份運行Tomcat啊
2017-03-22
謝謝了,不過不是這些問題,而是運行Tomcat的時候沒以管理員權限運行,我是WIN10的系統,弄了一下午才弄出來
2017-03-22
<web-app>
.........
.........
........
<welcome-file-list>
? <welcome-file>文件名(自己寫的頁面).jsp</welcome-file>
</welcome-file-list><!--需要添加到文件中的部分-->
.........
.........
</web-app>
2017-03-22
項目發布到服務器上了?