• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet Access Local Files  RSS feed

 
Dave Donohoe
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Servlet that I am running via Tomcat.
I want this servlet to create a Text File & save it to the machine that the browser is running on.
When I try to create the file, it ALWAYS creates the file on the machine that Tomcat is running on.
Do the same Security Restrictions that apply to Applets apply to Servlets? If so, is there such a thing as a Trusted Servlet? If not, is it possible to do it at all?
Thanks in advance,
Dave
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, servlets don't have the same limitations that applets do, but a Web server isn't a LAN server and even a LAN server can't push data into a client machine if the client machine doesn't have a LAN server component set up on its own. That's what "shared folders" are.
 
anand kulkarni
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Servlet is executed on server and the output that is getting ent to browser is a planr html file. Now html dont have a capability to create a file on end user's machine so it cant be done.
Any relevant information u can store in cookies.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!