• Post Reply Bookmark Topic Watch Topic
  • New Topic

I have two classes one contains fileupload method and save file ... I want from MB call this class,  RSS feed

 
Sandro Costa
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Follow my fileupload class:


#---------------------------

 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sandro,

First of all, a warm welcome to CodeRanch!

I'll move this to the JSF forum since it's JSF related.

Also in future, please enclose all code snippets in code tags as shown here. I've done if for you this time.

 
Tim Holloway
Bartender
Posts: 18781
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Sandro!

What is "MB"?

JSF interjects itself heavily into the form submit process, so normal J2EE file upload logic is difficult. The easiest way to do file upload in JSF is either to use one of the extension tagsets such a Apache Tomahawk, RichFaces, PrimeFaces, and so forth. An alternative is to upgrade your webapp to use JSF version 2.2 (which may require a server upgrade). In JSF 2.2 an h:fileUpload tag was finally added to the core JSF tagset.

Incidentally, here's a recommendation for coding:



The advantages are that you don't risk getting hurt by accidentally mis-matched backslashes and that your code becode less dependent on which OS you are running your webapp under.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!