Re: struts1 folder selection through browse button

2012-03-05 Thread Dave Newton
What good would it do anyway? The server can't access a client directory
anyway.

In any case, browser file choosers choose files, not directories--that's a
browser thing. Even if it could, different browsers send different
information--some browsers send only the filename, some send the entire
client path.

Dave

On Mon, Mar 5, 2012 at 12:13 PM, Arpan arpan.deb...@gmail.com wrote:

 Hi All,

 I have a requirement, where I should have a text box and a browse
 button.,The user can select a folder through browse button or can write
 that folder path in the text box directly.

 I have seen struts file upload mechanism. But here I only need to select a
 folder or folder path and not a file.

 And that folder path should be accessed in the action class.

 I am using struts1. Can anybody give some ideas.

 Thanks



Re: struts1 folder selection through browse button

2012-03-05 Thread Arpan
The user intended here, would be an admin and would like to select the
folder through browse button, so that he doesn't have to write down the
whole folder path in the text box.

The browse button will not have any more action.
Only the folder path, written on the text box, either by selecting through
browse button or directly written the whole path, will be sent to the
server.

On Mon, Mar 5, 2012 at 10:45 PM, Dave Newton davelnew...@gmail.com wrote:

 What good would it do anyway? The server can't access a client directory
 anyway.

 In any case, browser file choosers choose files, not directories--that's a
 browser thing. Even if it could, different browsers send different
 information--some browsers send only the filename, some send the entire
 client path.

 Dave

 On Mon, Mar 5, 2012 at 12:13 PM, Arpan arpan.deb...@gmail.com wrote:

  Hi All,
 
  I have a requirement, where I should have a text box and a browse
  button.,The user can select a folder through browse button or can write
  that folder path in the text box directly.
 
  I have seen struts file upload mechanism. But here I only need to select
 a
  folder or folder path and not a file.
 
  And that folder path should be accessed in the action class.
 
  I am using struts1. Can anybody give some ideas.
 
  Thanks