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 Reading a text file client side Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Reading a text file client side" Watch "Reading a text file client side" New topic
Author

Reading a text file client side

Brian Swingle
Greenhorn

Joined: Feb 12, 2003
Posts: 14
Hello,
I looking to read a Text file client side and was wondering if Servlets have this capability of does java security prevent this. If it does does anyone have an example by chance.
Any help is greatly appreciated.
Brian
Alain Boucher
Ranch Hand

Joined: Feb 25, 2003
Posts: 51
Well... servlet are server side object, so they can read server file. If you want to send a client file to the servet use a multipart request. Try this jakarta's API for file upload
http://jakarta.apache.org/commons/fileupload/index.html
Hope this help


Alain Boucher<br />Spare-Brain Consultants Inc.<br />SCJ2P,SCWCD,
Brian Swingle
Greenhorn

Joined: Feb 12, 2003
Posts: 14
I'm looking at the documentation for that and it appears that it doesn't actualy move the file to the sever but the contents. To make them available to the servlet. Has anyone here actualy used this. If so what was your experience with it?
Thanks,
Brian
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Reading a text file client side
 
Similar Threads
InitialContext problem
Creating File object problem
problem while loading data from excel to mysql
Problem Whit Special Characters on server side
Does file exist at client side or not