Forward HttpServletRequest to a different server
问题 I got a HttpServletRequest request in my Spring Servlet which I would like to forward AS-IS (i.e. GET or POST content) to a different server. What would be the best way to do it using Spring Framework? Do I need to grab all the information and build a new HTTPUrlConnection ? Or there is an easier way? 回答1: Unfortunately there is no easy way to do this. Basically you'll have to reconstruct the request, including: correct HTTP method request parameters requests headers ( HTTPUrlConnection doesn