

這個webapp標簽為什么報紅啊。
啟動tomcat也報錯。。
org.apache.catalina.core.StandardContext.filterStart Exception starting filter characterEncodingFilter

uj5u.com熱心網友回復:
在線等!!!!uj5u.com熱心網友回復:
那你有沒有characterEncodingFilter這個類呢uj5u.com熱心網友回復:
滑鼠移到web.xml的web-app紅線上面,然后會顯示報錯資訊,一般有可能是代碼順序問題uj5u.com熱心網友回復:
這個類不是在jar包的嗎,我洗掉中文過濾器確實可以啟動tomcat 但是沒進去controller
uj5u.com熱心網友回復:
如果是配置的順序出錯,他的報錯資訊里面會有正確的順序uj5u.com熱心網友回復:
它說的什么必須包含一堆標簽,不是很懂,我也調過servlet個filter的位置,還是一樣uj5u.com熱心網友回復:
好的,我再看看
uj5u.com熱心網友回復:
你可以把報錯的資訊發出來,然后大家幫你看下uj5u.com熱心網友回復:
可以了,我把jdk1.9換成1.8重新配置jdk maven就好了,卡了3天,害!!!
uj5u.com熱心網友回復:
重啟,重裝,重買!程式員三重門!uj5u.com熱心網友回復:
哈哈,這確實!
uj5u.com熱心網友回復:
版本有點低,試試3.0的<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-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
uj5u.com熱心網友回復:
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
uj5u.com熱心網友回復:
web.xml頭約束有誤,試一下這一個頭約束<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"
metadata-complete="true">
uj5u.com熱心網友回復:
如果還不行,call meuj5u.com熱心網友回復:
<web-app>之前資訊不對可以改成試試<?xml version="1.0" encoding="UTF-8"?>
<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">
或者洗掉原有的web.xml在重新新建一個web.xml:
File>Project Structure...>Modules
uj5u.com熱心網友回復:
資訊太少無法debug:實在不清楚問題,不會新建空白例子,修改復制組態檔?uj5u.com熱心網友回復:
厲害,學習一下uj5u.com熱心網友回復:
首先 ,web-apps 那個標簽飄紅,可能是IDEA 校驗規則太嚴格導致的,一般不會影響程式啟動。其次,啟動報錯是因為 EncodingFilter 配置有問題,可以先去掉后再啟動看看。找一個正確的 Filter 配置比對一下。
uj5u.com熱心網友回復:
亂碼過濾器放在前端控制器前面uj5u.com熱心網友回復:
你可以把報錯的資訊發出來,然后大家幫你看下uj5u.com熱心網友回復:
資訊太少無法debug:實在不清楚問題,不會新建空白例子,修改復制組態檔?uj5u.com熱心網友回復:
可以了,是順序問題,報錯點web標簽有提示,都有順序,現在看明白了轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/78915.html
標籤:Web 開發
