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

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

success.jsp頁面進(jìn)不去了啊 錯(cuò)誤500 怎么回事 啊 求大神求大神

三月 02, 2017 8:31:25 下午 org.apache.catalina.core.StandardWrapperValve invoke

嚴(yán)重: Servlet.service() for servlet [jsp] in context with path [/LoginFilter] threw exception

java.lang.ClassCastException: org.apache.catalina.connector.RequestFacade cannot be cast to javax.servlet.http.HttpServletResponse

at com.imooc.filter.LoginFilter.doFilter(LoginFilter.java:26)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostVa



代碼跟老師的打得 ?感覺沒毛病啊

@Override

public void doFilter(ServletRequest arg0, ServletResponse arg1,

FilterChain chain) throws IOException, ServletException {

? ? ? ?HttpServletRequest request= ?(HttpServletRequest) ?arg0;

? ? ? ?HttpServletResponse response= ?(HttpServletResponse) ?arg0;

? ?HttpSession session = request.getSession();

? ?

? ? ? ? ? if( session.getAttribute("username")!=null){

? ? ? ? ? ?chain.doFilter(arg0, arg1);

? ? ? ? ? ?

? ? ? ? ? }else {

? ? ? ? ?response.sendRedirect("login.jsp");

? ? ? ? ? }

? ? ? ? ??

? ? ? ?

? ? ? ?

}

HTTP Status 500 - org.apache.catalina.connector.RequestFacade cannot be cast to javax.servlet.http.HttpServletResponse


正在回答

2 回答

<filter> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

<filter-name>CharactorFilter</filter-name>

<filter-class>com.lyq.CharactorFilter</filter-class>

<init-param>

<param-name>encoding</param-name>

<param-value>UTF-8</param-value>

</init-param>

</filter>

<filter-mapping>

<filter-name>CharactorFilter</filter-name>

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

</filter-mapping>


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

你看看是不是在web.xml中過濾器的路徑設(shè)置的不對(duì),好像跟這個(gè)帖子說的類似

http://stackoverflow.com/questions/35381693/severe-servlet-service-for-servlet-package-in-context-with-path-portal-t

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

舉報(bào)

0/150
提交
取消

success.jsp頁面進(jìn)不去了啊 錯(cuò)誤500 怎么回事 啊 求大神求大神

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

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

幫助反饋 APP下載

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

公眾號(hào)

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