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

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么我的web.xml里面添加了新的配置內(nèi)容,頁面就不能打開了

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.5"?

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_2_5.xsd">

? <!-- spring核心監(jiān)聽器 -->

? <listener>

? <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

? <!-- ctrl+shift+T ?輸入ContextLoaderListener 便可快速查詢其位置 --> ?

? </listener> ?

? <context-param>

? <param-name>contextConfigLocation</param-name>

? <param-value>classpath:applicationContext.xml</param-value>

? </context-param>

??

<!-- struts2框架核心過濾器配置 -->

<filter>

<filter-name>struts</filter-name><!-- 與下面的struts一致 -->

<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>

</filter>

<filter-mapping>

<filter-name>struts</filter-name><!-- 此處可以任意命名,struct是自定義的 -->

<url-pattern>/*</url-pattern>

</filter-mapping>

? <display-name></display-name>

? ??

? <welcome-file-list>

? ? <welcome-file>index.jsp</welcome-file>

? </welcome-file-list>

</web-app>



加了struts ?spring的配置就不行了

正在回答

1 回答

spring配置文件中加載的東西比較多,并且你http://img1.sycdn.imooc.com//58197ee80001365905910181.jpg

這么配置過后,只要一開啟服務器,先讀取web.xml文件,然后讀到這里的時候就會去加載spring的配置文件,如果spring配置文件里有加載數(shù)據(jù)庫的,就要先打開數(shù)據(jù)庫服務,不然項目啟動就會報錯。

1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

為什么我的web.xml里面添加了新的配置內(nèi)容,頁面就不能打開了

我要回答 關注問題
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號