반응형
이번에 톰캣 7에서 돌리던 프로젝트를 8에서 돌리게 되었다.
다른건 문제가 없었는데 기존에 잘되던 업로드가 안되었다.
getServletContext().getRealPath("resources/images/inquiryImageFile");
이부분에서 null 에러가 났다.
구글링을 해보니 해결책은
getServletContext().getRealPath("/resources/images/inquiryImageFile");
/붙여주니 잘돌아간다^^
반응형
'DEV > JAVA' 카테고리의 다른 글
페이스북 로그인 스프링 (#12) bio field is deprecated for versions v2.8 and higher error (facebook spring) (0) | 2017.08.13 |
---|---|
Spring RestTemplate 요청시 403 에러 날때 해결법 (0) | 2017.08.01 |
jhipster gradle 인텔리제이에서 실행이 안되는 문제 (0) | 2017.08.01 |
google cloud storage + 스프링 부트 서버에서 이미지 업로드 하기 (0) | 2017.07.30 |
스프링 mybatis 오라클 12c 연동 에러 (1) | 2015.04.09 |