-1
Jdeveloper Adf 프로젝트의 상대 경로에서 파일을 읽고 싶습니다. "\ ProjectName \ ViewController \ public_html \ files"와 같은 경로에 내 파일이 있습니다. 내 파일은 이미지이므로 어떻게해야합니까? , 나는 모든 서버에서 작동하도록 내 코드를 원한다.Jdeveloper ADF에서 상대 경로에서 파일을 읽는 방법?
Jdeveloper Adf 프로젝트의 상대 경로에서 파일을 읽고 싶습니다. "\ ProjectName \ ViewController \ public_html \ files"와 같은 경로에 내 파일이 있습니다. 내 파일은 이미지이므로 어떻게해야합니까? , 나는 모든 서버에서 작동하도록 내 코드를 원한다.Jdeveloper ADF에서 상대 경로에서 파일을 읽는 방법?
내 프로젝트 resurces의 경로는이
같은 것이 ServletContext servletCtx = ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext();
InputStream inputStream = servletCtx.getResourceAsStream("/images/image.png");
입니다
나는 다음과 같은 코드를 사용하여 파일을 읽고, 내 대답은 다른 사람을 위해 도움이 될 것입니다 희망
"\ ProjectName \ ViewController \ public_html \ images"
감사합니다.