I want any user trying to access http://localhost:8080/test/ to be redirected to http://localhost:8080/test. I want to remove the extra '/' after test.
I tried writing this in rewrite rules but it doesn't work for me.
I want any user trying to access http://localhost:8080/test/ to be redirected to http://localhost:8080/test. I want to remove the extra '/' after test.
I tried writing this in rewrite rules but it doesn't work for me.
Copyright © 2021 Jogjafile Inc.
If your
contextPathis/testthen the extra slash is required to satisfy the context path rules of both the servlet spec and the URI / http resource declarations of the various RFCs.If you set your web application, handler, context, etc with the "context path" of
/testthen you'll want to switch to using/(the root context) and having a servlet url-pattern of/test(exactly named/test).