Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

file access on server - please help

 
Divyajot Ahluwalia
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I need a little help with uploading my jsp application.
i am using webappcabarets services in tomcat3.1
i am using a connectionbroker from javaexchange.
the application works perfectly when used on development machine.
the constructor of the connection broker requires the name of a file to write its log. when i specifya file i get an exception which says something like this
access denied (java.io.FilePermission
/WEB-INF/servinglog.txt write)
java.security.AccessControlException: access
denied (java.io.FilePermission
/WEB-INF/servinglog.txt write)
apparently there is something about the server sandbox preventing write access to the file...
how do i overcome this proble..
Please help
Thanks Divyajot
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem. You need to use:
Strong path=application.getRealPath("/WEB-INF/");
to locate the file. Read their help, please!
Thanks!
Roseanne
Join our SCJD Study Group when certified
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic