List of usage examples for javax.servlet.http HttpServletRequest getHttpServletMapping
default public HttpServletMapping getHttpServletMapping()
From source file:org.apache.tomee.security.cdi.TomEESecurityServletAuthenticationMechanismMapper.java
public HttpAuthenticationMechanism getCurrentAuthenticationMechanism( final HttpMessageContext httpMessageContext) { final HttpServletRequest request = httpMessageContext.getRequest(); if (request.getRequestURI().endsWith("j_security_check")) { return CDI.current().select(FormAuthenticationMechanism.class).get(); }/* w w w.ja va 2 s.c o m*/ final String servletName = request.getHttpServletMapping().getServletName(); return servletAuthenticationMapper.getOrDefault(servletName, defaultAuthenticationMechanism); }