This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am just struggling with a question, that is i want to upload a file via browse option, in that case in html we will use <input type="file" name="upload"> it's fine , Similarly is any tag is available in JSF to choose file with it's whole path
I am looking for answer for this, if you do, you will be really appreciated
As Tsang said, there is no support for fileupload via a core JSF tag, although many of the third-party extension tagsets have some sort of fileupload control.
As far as getting the option to "choose file with it's whole path" goes, that depends on what you mean. I don't think that you can make the server pre-select the user's source directory in the fileupload dialog for the simple reason that there is no way for the server to deduce the remote user's file system organization to know what directories are available and where. I don't even have a "C:" drive, for example.
If you are referring to having the entire client filesystem path get set to the server by the client application (browser) as part of an upload submit, that is a feature of Internet Explorer. Many other browsers and OS's only send the basic filename without directory information. Which is more secure, as an unscrupulous web application could learn things about a client's disk layout that could be exploited. Then again, IE didn't exactly win many awards for making hard to attack other people's computers.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Feb 18, 2013
Thanks for your valuable points, i got some idea in that,
The problem of mine is , i need to verify the path of client machine , so now i got a solution which is i am forcing client to enter the file name path in Text field rather than via browse option , so i can get the value of Text field easily.
As I said, however, informing the server about the directory structure of a client machine is a security problem, and many web browsers will not provide it. IE is an exception. IE is not as popular as it used to be, and I cannot even confirm that all versions of IE will pass the directory pathname, since, as I said, that's revealing sensitive information about the client.