File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes File Open Dialog box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "File Open Dialog box" Watch "File Open Dialog box" New topic
Author

File Open Dialog box

biny panackal
Ranch Hand

Joined: Apr 12, 2007
Posts: 72
hi,

Can i create a file chooser dialog box using jsp if anybody know the answer please help me. Is it possible using js?

Hopping a fast replay

binypanackal@gmail.com



Biny Balan
binypanackal@gmail.com
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41489
    
  53
The HTML file form element includes a button that will open up a file chooser. Is that what you are looking for?


Ping & DNS - my free Android networking tools app
biny panackal
Ranch Hand

Joined: Apr 12, 2007
Posts: 72
Dear Sir,

Thank you for your response.

But the problem is i want to load only files in my server. or i want to specify a path or directory from where i can pick an image
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Are you saying that you want the user to be able to browse files on the server?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
biny panackal
Ranch Hand

Joined: Apr 12, 2007
Posts: 72
ya

but the user is the administrator itself.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Javascript (JS) has no ability to read anything on the server.

If you want to the user to be able to browse the server with a browser, you'll need to write some server side code (see java.io.File) that reads the contents of your file system and returns them in a form that can be presented in a web page.

You can certainly use JS to open a new window that calls these server side resources. With Ajax, you could also make requests to these server side resources and draw them directly to a pre-drawn page but there is nothing built into either JS or JSP for browsing a server's file system.
 
 
subject: File Open Dialog box