Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tomahawk File Upload on Remote Server

843842Jan 13 2007 — edited Mar 16 2007
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2007
Added on Jan 13 2007
3 comments
279 views