Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Browse point to specific folder  RSS feed

 
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]
 
Rancher
Posts: 42974
76
  • 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.
 
author & internet detective
Posts: 39148
724
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?
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!