문제

Through apache commons I am uploading a file, I want to read all its content to a String and pass them to my JSP page through a RequestDispatcher.

How do I read the contents of the uploading file in String format?

도움이 되었습니까?

해결책

You could use:

FileUtils.readFileToString(File file)

from the commons-io package

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top