Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <h:form enctype="multipart/form-data" id="importForm">
  2. <table cellpadding="0" cellspacing="0" border="0">
  3. <tr>
  4. <td>
  5. <t:inputFileUpload id="upFile"
  6. title="#{messages['global.label.import.browse']}"
  7. value="#{attachmentAction.upFile}" storage="file"
  8. maxlength="1000000">
  9. </t:inputFileUpload>
  10. </td>
  11. </tr>
  12. <tr>
  13. <td>
  14. <h:commandButton action="#{attachmentAction.upload}" value="#{messages['button.upload']}"
  15. styleClass="btnCla" onclick="return checkSelectFile();" type="submit">
  16. </h:commandButton>
  17. </td>
  18. </tr>
  19. </table>
  20. </h:form>
  21.  
  22. public void upload(){
  23. try {
  24. jxl.Workbook wb = Workbook.getWorkbook(upFile.getInputStream());// Here , I always got Null for the value of upFile! Why?
  25. wb.getSheet(0);
  26. } catch (Exception e) {
  27.  
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement