Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Browse point to specific folder  RSS feed

 
carina caoor
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i have got a jsp which allows the user to browse and upload a file... i want to restrict the browse to specific folder ...
for example i want to make c:\temporary folder as default folder and the only folder that client can access and upload files from..

[jsp]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The file upload dialog is completely under the control of the browser; there's nothing the web app can do to restrict it.
 
carina caoor
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok..
whenever i browse application and upload a file suppose from folder C:\samplefiles\samples\example1.xls , now when i again try to upload another file it opens the folder samples which is under C:\samplefiles\
but i want to accomplish something like whenever a new upload is taking place it should point to some folder c:\temporary..

any suggestions please because on google i found that there is a possibility of setting default folder for browse in c++,Adobe flash,java(jfilechooser or applets), cant this be done using jsp,javascript,servlets,tomcat.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37234
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ruquia tabassum:
cant this be done using jsp,javascript,servlets,tomcat.

I agree with Ulf - this can't be done using HTML or JavaScript because you can't control the user's machine from a browser. (JSPs, Servlets and Tomcat just generate the HTML.)

Why does your app care which directory the file comes from? Is a file not a file?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!