private static Map<String, String> getWebXmlErrorPages(FacesContext context) { try { Document webXml = toDocument(context.getExternalContext().getResource("/WEB-INF/web.xml")); if (webXml != null) { return parseErrorPages(webXml.getDocumentElement()); } } catch (Throwable e) { LOGGER.log(Level.SEVERE, "Could not load or parse web.xml", e); } return null; }
public URL getWebInfConfigurationResource(ExternalContext context) throws IOException { return context.getResource(WEB_INF_CONFIG_FILE); } }
/** * {@inheritDoc} */ public URL getResource(String s) throws MalformedURLException { return wrapped.getResource(s); }
/** * @see Faces#getResource(String) */ public static URL getResource(FacesContext context, String path) throws MalformedURLException { return context.getExternalContext().getResource(path); }
/** * @see Faces#getResource(String) */ public static URL getResource(FacesContext context, String path) throws MalformedURLException { return context.getExternalContext().getResource(path); }
public static long getWebXmlLastModified(ExternalContext context) { try { URL url = context.getResource(WEB_XML_PATH); if (url != null) return url.openConnection().getLastModified(); } catch (IOException e) { log.error("Could not find web.xml in path " + WEB_XML_PATH); } return 0L; }
public URL getURL() { try { return FacesContext.getCurrentInstance().getExternalContext().getResource(name); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
public URL getURL() { try { return FacesContext.getCurrentInstance().getExternalContext().getResource(localPath); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
private long getResourceLastModified(String resource) { try { URL url = _externalContext.getResource(resource); if (url != null) { return url.openConnection().getLastModified(); } } catch (IOException e) { log.error("Could not read resource " + resource, e); } return 0; }
public static long getWebXmlLastModified(ExternalContext context) { try { URL url = context.getResource(WEB_XML_PATH); if (url != null) return url.openConnection().getLastModified(); } catch (IOException e) { log.error("Could not find web.xml in path " + WEB_XML_PATH); } return 0L; }
public URL getURL() { try { return FacesContext.getCurrentInstance().getExternalContext().getResource(localPath); } catch (MalformedURLException e) { throw new RuntimeException(e); } }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getResource(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getResource(String) */ public URL getResource(String path) throws MalformedURLException { return getWrapped().getResource(path); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getResource(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getResource(String) */ @Override public URL getResource(String path) throws MalformedURLException { return getWrapped().getResource(path); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getResource(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getResource(String) */ @Override public URL getResource(String path) throws MalformedURLException { return getWrapped().getResource(path); }
@Override public URL getResource(String path) throws MalformedURLException { return getWrapped().getResource(path); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getResource(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getResource(String) */ @Override public URL getResource(String path) throws MalformedURLException { return getWrapped().getResource(path); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getResource(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getResource(String) */ public URL getResource(String path) throws MalformedURLException { return getWrapped().getResource(path); }
public URL getResourceURL(String resourceId) { try { return FacesContext.getCurrentInstance().getExternalContext().getResource( getPrefix() + '/' + resourceId); } catch (MalformedURLException e) { return null; } }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getResource(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getResource(String) */ @Override public URL getResource(String path) throws MalformedURLException { return getWrapped().getResource(path); }
@Override public URL getResourceURL(ResourceMeta resourceMeta) { try { return FacesContext.getCurrentInstance().getExternalContext().getResource( getPrefix() + '/' + resourceMeta.getResourceIdentifier()); } catch (MalformedURLException e) { return null; } }