This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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: 42975
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
Sheriff
Posts: 38561
654
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!