条带RedirectResolution重定向到https url

coo*_*guy 4 java https stripes

让我们说用户使用https访问条带动作1.一旦action1处理完成,它就会使用RedirectResolution重定向到action2.此时,浏览器使用http而不是https接收302到action2.在重定向到action2时,如何使RedirectResolution使用https?

Kde*_*per 5

您可能需要为此实现自己的解决方案.例如:

return new Resolution() {
    public void execute(HttpServletRequest request, HttpServletResponse response) {
        response.sendRedirect("https://example.com/target.action");
    }
};
Run Code Online (Sandbox Code Playgroud)