Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Servlet Access Local Files

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 24843
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic