InputStream
以下のようにマネージドBeanのようにPNGファイルを取得しようとしています:
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
InputStream input = externalContext.getResourceAsStream("/myFile.png");
// input is null.
ただし、InputStream
は常に null です。これはどのように発生し、どうすれば解決できますか?