jsf - how to get a file's full path using -



jsf - how to get a file's full path using <p:fileUpload> -

i'm having problem fullpath of file upload using primefaces component . code:

<h:form prependid="false" enctype="multipart/form-data"> <p:fileupload update="@form" mode="advanced" auto="true" fileuploadlistener="#{mybean.myfileupload}"/> <h:outputtext value="#{mybean.filename}"/> </h:form> @managedbean @sessionscoped public class mybean { private string filename; public void myfileupload(fileuploadevent event) { facesmessage msg = new facesmessage("succesful", event.getfile().getfilename() + " uploaded."); facescontext.getcurrentinstance().addmessage(null, msg); filename = event.getfile().getfilename(); } public string getfilename() { homecoming filename; } public void setfilename(string filename) { this.filename = filename; } }

i file's name want total path. seek doesn't show anything.

filename = filenameutils.getfullpath(event.getfile().getfilename());

what expect fullpath of uploaded file? browser sent bytes, in memory of servletcontainer , stored. there no fullpath /var/tmp/myfile.txt.

jsf file-upload primefaces

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -