This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JSP and the fly likes Reading file attributes from local file system Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Reading file attributes from local file system

Ajju Chawla
Greenhorn

Joined: Oct 21, 2005
Posts: 21
Hi,

How can I read and than display file attributes (size etc) and display in the web page when I select the file through <input type='file' >.

Thanks
AJ
Ishrayansh Nath
Ranch Hand

Joined: Nov 05, 2004
Posts: 45
give me your exact requirment?
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
You can�t do this without uploading the file on the server.
Other alternatives are using Applet or using ActiveX.


My blood is tested +ve for Java.
Ajju Chawla
Greenhorn

Joined: Oct 21, 2005
Posts: 21
Hi Guys,

Thanx for uor reply's.
The exact requirement is that I've a web page(JSP) on which I need to upload multiple files. Now when a file is selected I need to display the size of the selected file. I've a check that the total size of all the selected files cannot exceed a certain limit.

The other option is that it can be done through ActiveX, but I dont know of any Java API which which can extract the uploaded files at the server end.

Rgds
AJ
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Originally posted by Ajju Chawla:
Hi Guys,
The other option is that it can be done through ActiveX, but I dont know of any Java API which which can extract the uploaded files at the server end.


..then use Applet to do this task.
Ajju Chawla
Greenhorn

Joined: Oct 21, 2005
Posts: 21
Hi,

Thanks for all the suggestions.

Actually I've never worked on applets,
It would be gr8 if you can provide me --
Some kind of example code for applet or
some java api to access the Active X at server side.

Thanks
AJ
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61103
    
  66

Duplicate closed.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
jQuery in Action, 2nd edition
 
subject: Reading file attributes from local file system