File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes File Uploader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "File Uploader" Watch "File Uploader" New topic
Author

File Uploader

Venkata
Ranch Hand

Joined: Sep 07, 2007
Posts: 37
Hi everyone,

I am not sure which forum this question fits into, sorry if it is in wrong place...

I am trying to read a property file selected by client from my application.I need to load these properties into my Java object as if we read the data from property file on server side.

If i am running the server locally everything works fine since the server can locate the file i.e C:/blah...blah...but if the application is running on server it can not see/locate the file so i am getting file not found error. After browsing several web pages i tried to use FileUpload ...but for some reason i am getting BeanUtil.populate exception....

I am using method="post" enctype="multipart/form-data" in form element, initialized all primitive types, called super constructor in from bean...nothing worked...

Trying to read thefile in javascript with no luck...any opther suggestions/help greatly appreciated....

One more thing i don't need to save this file on server side...just read it from client location and use those properties in further process in application...

thanks
Ven
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

"ven Red", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

You'll need to get the file upload working. Your server has no access to the client file otherwise, and JavaScript will be of no help.

Please let us know what file upload package you are using (or if you are rolling your own). Also include precise details of any error messages and the relevant code. be sure to use UBB code tags when posting error dumps and code.
[ July 17, 2008: Message edited by: Bear Bibeault ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Uploader