control to select a folder in a JSP web page

A

apngss

I want a JSP web page that allows the user to select a folder as input,
not files. If I use <input type="file">, I couldn't select a folder as
input, I can only select a single file as input. In my case, are there
any solutions to my problem?

please advise... thanks!!
 
A

Andrew Thompson

I want a JSP web page that allows the user to select a folder as input,
not files. If I use <input type="file">, I couldn't select a folder as
input, I can only select a single file as input. In my case, are there
any solutions to my problem?

You can so anything in a JSP you can do in a normal
HTML form, so.. No.
<http://www.w3.org/TR/REC-html40/interact/forms.html#edef-INPUT>
the 'accept' attribute allows you to specify mime-types that
are acceptable for upload (which may or may not be ignored by
the browser), but it does not allow you to upload 'directories'.

The usual way to approach loading a directory of files is
to present the user with a group of file inputs and allow
them to specify each file.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top