• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problems with fileupload JSF

Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I will start this post telling you what's going on.

The getFile () method this returning null

I'm managing to save the disk image that JSF project

But when I test it on another page I can not succeed, in fact this page is linked to some attributes of an entity.

The pieces I am having difficulty in this page are these;

it's that

And that's the full page

This is my class Bean

this is the error that occurs when I press the save button.

he gives this message because getFile() is NULL

On the page that has successfully getFile () results in this value

So how to fix this problem?

I made some changes before, because before he was giving this error

So with much research I found this post


And include this class

After that started to generate current errors

is it because of this class that is doing getFile stay Null?
Saloon Keeper
Posts: 22484
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's way more code than I have the time to dig around in when I'm not being paid to do it. See if you cannot reduce it to something that all fits on the screen without need for scrolling.

The one thing that I did notice is that you're using an awful lot of JSF and JEE internal services and that brings to mind my #1 rule for JSF:

The more JSF-specific code that's in your JSF app, the more likely it is that you did it wrong.

I think you need to go back and look carefully at the PrimeFaces File Upload documentation - and sample code.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic