• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Browse point to specific folder

 
Ranch Hand
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic