Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Buggy <t:inputFileUpload

Oleg Vakil
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I am coding upload application and use:
JSF 1.x- 2, Tomcat 6.0/ Firefox
My problem is a misterious behavior of t:inputFileUpload ( an x:inputFileUpload too). My jsp is a rather simple still

<%@taglib uri="" prefix="h"%>
<%@taglib uri="" prefix="f"%>
<%@ taglib uri="" prefix="t" %>
<jsp:useBean id="FileUploadForm" scope="application" class="FUF.FileUploadForm"/>
<title>t:inputFileUpload example</title>
<h:form id="welcomeForm" enctype="multipart/form-data">
<t:inputFileUpload id="fileupload" value=
"#{FileUploadForm.upFile}" size="20" />

<h:commandButton value="Load the file" action=
"#{FileUploadForm.upload}" />
<tutputText value="#{FileUploadForm.result}"

nothing special in upload method, it corresponds to miscellaneous examples.
But with enctype="multipart/form-data" upload method is not calling, I have System.out.println on a top of UPLOAD;
without enctype UPLOAD is calling but FileUploadForm.upFile is null, so I am not able to upload file.
Thanks for any explanations..a lot of thanks. I tried it a lot of times, may be, somebody hav the same problem. Information about problems with t:inputFileUpload is available, but doesnot help to solve a problem.

What is a rteliable alternative to t:inputFileUpload ?
Thanks again

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic