Java filter failing to set response headers

前端 未结 4 1879
太阳男子
太阳男子 2021-01-11 15:14

I am trying to create a Java \"Filter\" which detects a custom HTTP Request Header, and inserts response headers so that the file will download automatically. The response

4条回答
  •  遥遥无期
    2021-01-11 16:00

    The problem is the header(X-Wria-Download) of your AjaxRequest (here XMLHttpRequest) is not being set in your HttpServletRequest object before the filter is being served.

    I think better Idea will be to use a Dedicated Servlet to handle your ajax request.

提交回复
热议问题