Spring 如何在HttpServlet请求中更改ServletPath

Spring 如何在HttpServlet请求中更改ServletPath,spring,spring-boot,httprequest,servlet-filters,spring-cloud,Spring,Spring Boot,Httprequest,Servlet Filters,Spring Cloud,有没有办法在中重写HttpServletRequest的ServletPath 春靴/春云 例如: 我可以使用HttpServletRequest中的过滤器获得servlet路径,如下所示 RequestContext ctx = RequestContext.getCurrentContext(); HttpServletRequest request = ctx.getRequest(); request.getServletPath(); 但是我必须重写它(改变它?) 有什么想法吗? 谢

有没有办法在中重写
HttpServletRequest
ServletPath

春靴/春云

例如:

我可以使用
HttpServletRequest
中的过滤器获得servlet路径,如下所示

RequestContext ctx = RequestContext.getCurrentContext();
HttpServletRequest request = ctx.getRequest();
request.getServletPath();
但是我必须重写它(改变它?)

有什么想法吗?
谢谢。

当servlet路径无法更改时,您试图实现的用例是什么?这与问题有关。从我的web应用程序转发的请求被解码。我必须修复它们(必须重新编码)。所以我需要更改servlet路径。