How to disable the automatic redirection from http://localhost:7001/app to http://localhost:7001/app/

27 Views Asked by At

I want to create a filter that traps the request to a style URL when a POST is made to the URL: http://localhost:7001/app

My problem is that the application generates an automatic redirect to http://localhost:7001/app/ and therefore cancels the POST and generates another one like GET, which causes the content sent by the POST to be lost.

Web.xml

<filter>
    <filter-name>AllFilter</filter-name>
    <filter-class>com.app.mx..filter.AllFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>AllFilter</filter-name>
    <url-pattern>*</url-pattern>
</filter-mapping>

I also tried with @WebFilter("*") in com.app.mx..filter.AllFilter

How to disable the automatic redirection from http://localhost:7001/app to http://localhost:7001/app/?

0

There are 0 best solutions below