Java 获取与GWT进行/j_spring_security_检查的HTTP状态404

Java 获取与GWT进行/j_spring_security_检查的HTTP状态404,java,spring,gwt,spring-security,Java,Spring,Gwt,Spring Security,我试图让Spring安全性工作,但完全失败了。无论我怎么做,我都无法使j\u spring\u security\u check有效 错误: HTTP状态404-/j_-spring_-security_-check 类型状态报告 消息/j_弹簧_安全检查 说明请求的资源不可用 Login.html文件: 我的应用程序 用户名: 密码: web.xml: 上下文配置位置 /META-INF/application*.xml org.springframework.web.context

我试图让Spring安全性工作,但完全失败了。无论我怎么做,我都无法使
j\u spring\u security\u check
有效

错误:

HTTP状态404-/j_-spring_-security_-check
类型状态报告
消息/j_弹簧_安全检查
说明请求的资源不可用

Login.html
文件:


我的应用程序
用户名:

密码:
web.xml


上下文配置位置
/META-INF/application*.xml
org.springframework.web.context.ContextLoaderListener
springSecurityFilterChain
org.springframework.web.filter.DelegatingFilterProxy
springSecurityFilterChain
/*
MyServlet
com.me.portal.server.MyPortalServiceImpl
MyServlet
/MyPortal/MyPortal
Login.html
application.security.xml


答复:

<!DOCTYPE html>
<html><head><title>Apache Tomcat/8.0.22 - Error report</title>
<style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} 
H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} 
H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} 
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} 
B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} 
P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}
A {color : black;}
A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head>
<body><h1>HTTP Status 404 - /j_spring_security_check</h1><div class="line"></div>
<p><b>type</b> Status report</p>
<p><b>message</b> <u>/j_spring_security_check</u></p>
<p><b>description</b> <u>The requested resource is not available.</u></p>
<hr class="line"><h3>Apache Tomcat/8.0.22</h3>
</body></html>

ApacheTomcat/8.0.22-错误报告
H1{字体系列:Tahoma,Arial,无衬线;颜色:白色;背景色:#525D76;字体大小:22px;}
H2{字体系列:Tahoma,Arial,无衬线;颜色:白色;背景色:#525D76;字体大小:16px;}
H3{字体系列:Tahoma,Arial,无衬线;颜色:白色;背景色:#525D76;字体大小:14px;}
正文{字体系列:Tahoma,Arial,无衬线;颜色:黑色;背景色:白色;}
B{字体系列:Tahoma,Arial,无衬线;颜色:白色;背景色:#525D76;}
P{字体系列:Tahoma,Arial,无衬线;背景:白色;颜色:黑色;字体大小:12px;}
A{颜色:黑色;}
名称{颜色:黑色;}。线条{高度:1px;背景色:#525D76;边框:无;}
HTTP状态404-/j_-spring_-security_-check
类型状态报告

信息/j_弹簧_安全检查

说明请求的资源不可用

apachetomcat/8.0.22
我不知道这是GWT问题还是Tomcat问题,但解决方案如下:

<form method = "post" action="/MyPortal/j_spring_security_check">


我必须将路径添加到“/MyPortal”才能找到j_spring_security_check。

您应该将操作路径更改为相对路径

或者它会将请求提交给base dir

<form method = "post" action="/MyPortal/j_spring_security_check">