wood burning stoves 2.0*
The moose likes JSF and the fly likes Buggy <t:inputFileUpload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Buggy <t:inputFileUpload " Watch "Buggy <t:inputFileUpload " New topic
Author

Buggy <t:inputFileUpload

Oleg Vakil
Greenhorn

Joined: May 25, 2011
Posts: 5
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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Buggy <t:inputFileUpload