為啥是404?
問題一 項目jsp會報錯 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
解決辦法:web工程-》屬性或Build Path-》Java Build Path->Libraries-> Add Libray...->Server Runtime -》Apache tomcat ?7.0 -》finish
問題二 有兩個包需要加,不然會報錯。教程里沒有說。
failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
解決:
<!-- JstlView必須的兩個jar -->
<dependency>
? ?<groupId>jstl</groupId>
? ?<artifactId>jstl</artifactId>
? ?<version>1.2</version>
</dependency>
<dependency>
? ?<groupId>taglibs</groupId>
? ?<artifactId>standard</artifactId>
? ?<version>1.1.2</version>
</dependency>
問題三 訪問路徑 在tomcat里必須要有項目名稱 不然會404(教程里是http://localhost:8080/hello/mvc)
應該是http://localhost:8080/spring-mvc-study/hello/mvc 才可以訪問
不懂jetty,希望知道的人可以告訴我這是不是tomcat和jetty的差別。
2017-05-11
大神,我用的也是tomcat,但是報404,
訪問地址: http://localhost:8080/ZLearnSpringMvc/hello/mvc
ZLearnSpringMvc是我的項目名,請問哪里的問題,求解答。。
2016-04-05
非常贊!
2016-03-31
問題一 項目jsp會報錯 The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
解決辦法:web工程-》屬性或Build Path-》Java Build Path->Libraries-> Add Libray...->Server Runtime -》Apache tomcat ?7.0 -》finish
問題二 有兩個包需要加,不然會報錯。教程里沒有說。
failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
解決:
<!-- JstlView必須的兩個jar -->
<dependency>
? ?<groupId>jstl</groupId>
? ?<artifactId>jstl</artifactId>
? ?<version>1.2</version>
</dependency>
<dependency>
? ?<groupId>taglibs</groupId>
? ?<artifactId>standard</artifactId>
? ?<version>1.1.2</version>
</dependency>
問題三 訪問路徑 在tomcat里必須要有項目名稱 不然會404(教程里是http://localhost:8080/hello/mvc)
應該是http://localhost:8080/spring-mvc-study/hello/mvc 才可以訪問
不懂jetty,希望知道的人可以告訴我這是不是tomcat和jetty的差別。
2016-03-30
證明服務器端沒有該文件