• Post Reply Bookmark Topic Watch Topic
  • New Topic

MYFaces JSF UploadedFile Object  RSS feed

 
Jeremy Wilson
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jamie Williams
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!