Rarely encountered error raised in Mojarra implementation in method
com.sun.faces.util.Util.getFacesMapping
when
com.sun.faces.util.Util.getMappingForRequest
returns null:
...
ExternalContext extContext = FacesContext.getCurrentInstance()..getExternalContext();
String servletPath = extContext.getRequestServletPath();
String pathInfo = extContext.getRequestPathInfo();
...
mapping = getMappingForRequest(servletPath, pathInfo);
...
//Method getMappingForRequest
private static String getMappingForRequest(String servletPath, String pathInfo)
{
if (servletPath == null) {
return null;
}
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "servletPath " + servletPath);
LOGGER.log(Level.FINE, "pathInfo " + pathInfo);
}
if (servletPath.length() == 0) {
return "/*";
}
if (pathInfo != null)
return servletPath;
if (servletPath.indexOf('.') < 0)
{
return servletPath;
}
return servletPath.substring(servletPath.lastIndexOf('.')); }
No comments:
Post a Comment