Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet can't write to a file on server

 
Lee Feder
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having difficulty writing to a file on the server from within a servlet.
Whenever the servlet tries to open the file I get the following Tomcat exception report:

I must mention that I'm just using Sun's J2SDKEE1.3 to test this app.
I've set my .java.policy file (in my home directory) to the following:

Can anyone help me sort this out before I go insane.
Another question this leads to is when is the security policy loaded?
Thanks for your help.
Bartender, give my a whiskey.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What user is your servlet container running as? Do they have RW permissions in that directory?
 
Lee Feder
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
I just tried the same test on my Mac and it worked fine straight away. Wierd
The file I was trying to write on Win2K was allowing Everyone Full Control. I even tried giving myself full control as well (that's how desperate I am).
The only obvious difference between my Win2K and MacOS X set up is the Mac is running Deploy Tool 1.3.1 and the Windows machine, v1.3.
I hate these problems that have no obvious reason. I thought, perhaps that servlets obeyed similar security restrictions as applets. It seems not.
[ April 13, 2002: Message edited by: Lee Feder ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic