Skip to content

Instantly share code, notes, and snippets.

@janakamarasena
Last active December 30, 2018 08:17
Show Gist options
  • Select an option

  • Save janakamarasena/91fbb50c600c56a69758c741e2feaf3d to your computer and use it in GitHub Desktop.

Select an option

Save janakamarasena/91fbb50c600c56a69758c741e2feaf3d to your computer and use it in GitHub Desktop.
...
final String AUTH_FAILURE_PARAM = "authFailure";
final String AUTH_FAILURE_MSG_PARAM = "authFailureMsg";
...
if (StringUtils.isNotEmpty(request.getParameter(AUTH_FAILURE_PARAM))
&& "true".equals(request.getParameter(AUTH_FAILURE_PARAM))) {
loginFailed = "true";
if (request.getParameter(AUTH_FAILURE_MSG_PARAM) != null) {
errorMessage = request.getParameter(AUTH_FAILURE_MSG_PARAM);
if (errorMessage.equalsIgnoreCase("login.fail.message")) {
errorMessage = "Authentication Failed! Please Retry.";
}
}
}
...
<% if ("true".equals(loginFailed)) { %>
<div style="color: red; padding-top: 40px;">
<%=errorMessage%>
</div>
<% } %>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment