如何在Java中使用Servlet过滤器来更改传入的Servlet请求网址?
如何使用Servlet过滤器来更改来自的传入Servlet请求网址 http://nm-java.appspot.com/Check_License/Dir_My_App/Dir_ABC/My_Obj_123 至 http://nm-java.appspot.com/Check_License?Contact_Id=My_Obj_123 ? 更新:根据BalusC的以下步骤,我想到了以下代码: public class UrlRewriteFilter implements Filter { @Override public void init(FilterConfig config) throws ServletException { // } @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws ServletException, IOException { HttpServletRequest request = (HttpServletRequest) req; String requestURI = request.getRequestURI(); if (requestURI.startsWith("/Check_License/Dir_My_App/")) { String toReplace = …