File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes How to browse a folder in richfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "How to browse a folder in richfaces" Watch "How to browse a folder in richfaces" New topic
Author

How to browse a folder in richfaces

Gangadhar Ireddy
Greenhorn

Joined: Sep 23, 2011
Posts: 1
Hi,

Can anyone help me how to browse for a folder,but not file.

Thanks in adavance,
Gangadhar
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

Welcome to the JavaRanch, Gangadhar!

WEB servers are not FILE servers. So you cannot simply browse them as though they were directories full of files. It would be a serious security issue, in fact, if you could. The "browse" functions that appservers such as Apache HTTPD offer are special features.

Likewise, webapps aren't allowed to browse files on the client's computer, either. The upload/download file dialog that pops up in a web browser is part of the web browser program itself, and can't be replaced with JSF.

If you wish to do something like Apache HTTP and present a subtree of the server's filesystem for browsing, you can use the RichFaces Tree control and map it against a directory listing.

However, under NO circumstances should you create anything that will upload files into the WAR itself. If you're planning to support file uploads, upload them to a location completely outside both the WAR and the app server directories. It's not only a violation of the J2EE spec to write to a WAR, it can get you into serious grief.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to browse a folder in richfaces
 
Similar Threads
"Browse for folder" button in a jsp page
creating a Browse folder dialog box using applet
browse folder(complete) in java swings
Browse and select folders
Access files in folders and sub-folders