How to request complete query string in Spring MVC?

前端 未结 4 1789
感情败类
感情败类 2021-01-11 17:33

In Spring MVC, I can do this to get a value of items on the query string:

    public void sendMessage(HttpServletResponse response,
                                  


        
4条回答
  •  暖寄归人
    2021-01-11 18:17

    The Controller itself knows the contents of the entire query string.

    public ModelAndView handleRequest(HttpServletRequest request,
            HttpServletResponse response) throws Exception
    

    You can then get the full query string from:

    request.getQueryString();
    

提交回复
热议问题