aspose file tools
The moose likes JSF and the fly likes MYFaces JSF UploadedFile Object Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "MYFaces JSF UploadedFile Object" Watch "MYFaces JSF UploadedFile Object" New topic
Author

MYFaces JSF UploadedFile Object

Jeremy Wilson
Ranch Hand

Joined: Feb 18, 2003
Posts: 166
When using the object in the backing bean I get two different results with different browsers. When using IE the getName method returns the Path information along with the file name. When using FireFox only the file name is returned with getName. Does anyone have any clue as to which is operating correctly? Any other information on these differences would be appreciated.

thanks


Jeremy Wilson
Jamie Williams
Ranch Hand

Joined: Mar 31, 2006
Posts: 70
Hi Jeremy

This little difference was a real for me when I first encountered it! I was doing my development with Firefox and everyone else was using IE. Depending on where the file was on their computer they got different exceptions and I had no idea what was going on! I don't know which browser you would say is 'right', but it's not too hard to work with both in your application:



If anyone has a shorter way of doing this I'd appreciate them posting it!
Jeremy Wilson
Ranch Hand

Joined: Feb 18, 2003
Posts: 166
That worked for me. I appreciate it. I just wish there would be more consistency between browsers, but I know that will never happen. I use Firefox all the time as well and it is was in testing that the issue was discovered.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: MYFaces JSF UploadedFile Object
 
Similar Threads
Authentication and Authorization Problems with IIS 6 and Jrun 4
Get Exception Name?
what is servlet context interface implementation class name
File
how to get filename from fullpath