Hello,
I am building an application using tomahawk .... I am using the fileupload component to upload files onto a remote server from the user's local machine .... as described at
http://www.onjava.com/pub/a/onjava/2005/07/13/jsfupload.html?page=1
Here's my code :
In my jsf page :
<h:form enctype="multipart/form-data">
<t:inputFileUpload storage="file" value="#{uploadBean.file}"/>
<h:commandButton value="Submit" action="#{upload.importQuestionnaireFromXMLFile}"/>
</h:form>
The method associated to my upload bean is as follows:
public void importQuestionnaireFromXMLFile() throws FileNotFoundException, IOException{
log.debug("enter_importQuestionnaireFromXMLFile() from Upload Bean");
this.upload();
String path=this.uploadFile.getName();
log.debug("Uploaded File Name =#0", path);
QuestionnaireImportBean.setFilePath(path);
}
The QuestionnaireImportBean is supposed to do some work with the uploaded file .....
My problem is that though the file has been successfully uploaded, it tries retrieve the file on the path as defined on the local machine instead of retrieving it from the directory on the remote machine specified in the tomahawk configs ...
Can anyone suggest whats wrong with my approach ,
Cheers,
Yogesh