当url包含字符串“?error”时,WebSphere不显示网页元素

问题描述 投票:0回答:1

我正在开发一个Spring安全项目,如果User插入了错误的userId - 密码,网页将更新为“Invalid Login Attempt”消息。

我在AuthenticationFailureHandler.onAuthenticationFailure上发送重定向

onAuthenticationFailure()实现的代码片段。

@Override
  public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response,
      AuthenticationException exception) throws IOException, ServletException {
      //some logic
      response.sendRedirect(String.format("%s?error", getUrl());
    }
  }

资源Html页面具有与thymeleaf依赖关系的div标签,以识别error对象和显示消息

<div th:if="${error}" id="loginFailedMessage" class="alert alert-danger">
   Invalid login attempt.
</div>

到目前为止,此实现适用于Jboss应用程序服务器和WebLogic应用程序服务器 - 但不适用于websphere。是否有理由阻止这样的url调用 - 我缺少任何配置。我已经厌倦了不同版本的WebSphere 8.5.5.9,最高可达8.5.5.13

PS。任何日志ffdc或应用程序日志中都没有错误。

java spring-security websphere websphere-8
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.