第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

報(bào)404,找不到hello.jsp頁(yè)面怎么辦?跪求解答!!

訪問(wèn)地址:http://localhost:8080/ZLearnSpringMvc/hello/mvc

其中ZLearnSpringMvc是我的項(xiàng)目名

http://img1.sycdn.imooc.com//5913d7160001108c09220223.jpg

項(xiàng)目結(jié)構(gòu):

http://img1.sycdn.imooc.com//5913d717000159d103620421.jpg

mvc-dispatcher-servlet.xml :

<?xml?version="1.0"?encoding="UTF-8"?>
<beans?xmlns="http://www.springframework.org/schema/beans"???
???????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
???????xmlns:context="http://www.springframework.org/schema/context"?????
???????xmlns:mvc="http://www.springframework.org/schema/mvc"
???	???xsi:schemaLocation="
???	????http://www.springframework.org/schema/beans?
		http://www.springframework.org/schema/beans/spring-beans.xsd??
		http://www.springframework.org/schema/context?
		http://www.springframework.org/schema/context/spring-context.xsd?
		http://www.springframework.org/schema/mvc?
		http://www.springframework.org/schema/mvc/spring-mvc.xsd">

????<!--?啟用spring?mvc?注解?-->
????<context:annotation-config?/>

????<!--?設(shè)置使用注解的類所在的jar包?-->
????<context:component-scan?base-package="com.cbt.controller">
????	<context:include-filter?type="annotation"?expression="org.springframework.stereotype.Controller"?/>
????</context:component-scan>

	<mvc:default-servlet-handler/>

	<mvc:annotation-driven?/>
	
????<!--?對(duì)轉(zhuǎn)向頁(yè)面的路徑解析。prefix:前綴,?suffix:后綴?-->
????<bean?class="org.springframework.web.servlet.view.InternalResourceViewResolver">
????	<property?name="viewClass"?value="org.springframework.web.servlet.view.JstlView"></property>
????	<property?name="prefix"?value="/WEB-INF/jsps/"></property>
????	<property?name="suffix"?value=".jsp"></property>
????</bean>
</beans>

web.xml:

<!DOCTYPE?web-app?PUBLIC
?"-//Sun?Microsystems,?Inc.//DTD?Web?Application?2.3//EN"
?"http://java.sun.com/dtd/web-app_2_3.dtd"?>

<web-app>
??<display-name>Archetype?Created?Web?Application</display-name>
??
??<servlet>
??	<servlet-name>mvc-dispatcher</servlet-name>
??	<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
??	<init-param>
??		<param-name>contextConfigLocation</param-name>
??		<param-value>/WEB-INF/configs/spring/mvc-dispatcher-servlet.xml</param-value>
??	</init-param>
??	<load-on-startup>1</load-on-startup>
??</servlet>
??
??<servlet-mapping>
??	<servlet-name>mvc-dispatcher</servlet-name>
??	<url-pattern>/</url-pattern>
??</servlet-mapping>
</web-app>

HelloMvcController.java :

package?com.cbt.controller;

import?org.springframework.stereotype.Controller;
import?org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/hello")
public?class?HelloMvcController?{

	@RequestMapping("/mvc")
	public?String?helloMvc(){
		System.out.println("hello");
		return?"hello";
	}
}


正在回答

2 回答

為什么是home呢?

0 回復(fù) 有任何疑惑可以回復(fù)我~

找到原因了,controller里應(yīng)該return "home"而不是return "hello",醉醉的,老太太我都不扶,我就服我自己?。?/p>

2 回復(fù) 有任何疑惑可以回復(fù)我~
#1

昔日情瞳

就服你
2017-05-16 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

報(bào)404,找不到hello.jsp頁(yè)面怎么辦?跪求解答??!

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)