Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading a text file client side

 
Brian Swingle
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Brian Swingle
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic