我有一个Maven的Web应用程序,并形式的验证重定向,但在成功登录它消除了我的URL参数debug
的Java servlet的查询字符串去除了
http://localhost:8080/TestProject/?debug
更改 - >http://localhost:8080/TestProject/
我在index.html页面中使用该参数表示某些逻辑
不确定我做了什么来做到这一点
这里是我的web.xml
<web-app version="3.0"
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">
<display-name>Servlet 3.0 Web Application</display-name>
<welcome-file-list>
<welcome-file>test/index.html</welcome-file>
</welcome-file-list>
<display-name>Archetype Created Web Application</display-name>
<filter>
<filter-name>AuthFilter</filter-name>
<filter-class>com.test.AuthClass</filter-class>
</filter>
<filter-mapping>
<filter-name>AuthClass</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
</web-app>
让我知道,如果你需要查看更多
重新定向在哪里完成?如果它是从你的AuthClass完成的,那么你将不得不再次添加该请求参数。这是预期的行为。只要您重定向或转发,所有请求参数都将丢失。 – Ankit