4

I need to make a file upload function in JSF 2 so I was searching about it and found it is possible to do with Tomahawk, which I think is not very stable with JSF 2. I'm using RichFaces, so I look for it and found this which I think more simple, but I'm using richfaces 4.

So I wonder if there's a way to do this with richfaces 4 or do this with JSF 2 only.

Any idea, suggestion ?

1 Answer 1

2

You're looking at RichFaces 3.3.x demo site. You need to look at RichFaces 4.x demo site. The <rich:fileUpload> demo page contains a concrete example with source code.

To do it with pure JSF2, you'd need to create a custom component and parse the multipart/form-data requests yourself. There's a blog about this with complete and concrete examples: Uploading files with JSF 2.0 and Servlet 3.0.

Using Tomahawk is only more easy. I'm not sure why you think that it's not very stable.

Sign up to request clarification or add additional context in comments.

4 Comments

Hello my friend, sorry I think I made a misunderstanding about Tomahawk. At the end I prefer to use richfaces, which I was using already in my project =) . Thanks.
Just for curious, what is your name ? It is really BalusC ?Or Balus ? (I'm asking here 'cause don't know other way to contact you).If you don't want to answer that's ok mate, I really enjoy all your teachings, really, thanks.
My real name is Bauke. See also my SO user profile and several other places which I linked (in)directly in my SO user profile, such as my blog, Careers profile, Linkedin profile, etc. On the "frontpage" of my blog you can find a little history of the nickname "BalusC".
Nice to meet you my friend, Bauke. =)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.