• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Buggy <t:inputFileUpload

 
Oleg Vakil
Greenhorn
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="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
<jsp:useBean id="FileUploadForm" scope="application" class="FUF.FileUploadForm"/>
<html>
<head>
<title>t:inputFileUpload example</title>
</head>
<body>
<f:view>
<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}"
style="color:green;font-weight:bold"/>

</h:form>
</f:view>
</body>
</html>
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