Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <h:inputFile id="inputFile"
- label="file1"
- value="#{controller.part}"
- required="true"
- requiredMessage="File not selected !!">
- </h:inputFile>
- String header = part.getHeader("content-disposition");
- String[] headerArray = header.split(";");
- for (String str : headerArray) {
- if (str.trim().startsWith("filename")) {
- path = str.substring(str.indexOf('=') + 1).trim().replace(""", "").trim();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement