protected FacesServletMapping getFacesServletMapping(FacesContext context)
{
Map<Object, Object> attributes = context.getAttributes();
// Has the mapping already been determined during this request?
FacesServletMapping mapping = (FacesServletMapping) attributes.get(CACHED_SERVLET_MAPPING);
if (mapping == null)
{
ExternalContext externalContext = context.getExternalContext();
mapping = calculateFacesServletMapping(externalContext.getRequestServletPath(),
externalContext.getRequestPathInfo());