Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaMail File Attachment Security problem  RSS feed

 
ernest fakudze
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all,
Problem: I have written a jsp which sends e-mail (SMTP Protocol). It also has a file upload field which allows the user to attach a file to the message. This works when i run the jsp in my local machine. However, when i have uploaded the jsp to my server at www.jwebhosting.net it gives me an exception..sth like FileSecurityEception (can't remember it off my head but I think you will understand). Basically, Java seems to think that the JSP is not allowed to browse and upload any file from the user's machine because it considers this as a security violation.
How do I get over this? Where do I set the security settings? Please help.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, sorry, I do not understand. Exceptions and their stack traces contain vital information that will help diagnose the problem. My best suggestion for now is that an attempt to write the upload to a temporary file might be failing.
- Peter
 
ernest fakudze
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay Peter, here is the message that I'm getting from my error page:
(java.io.FilePermission D:\Ernie's Data\Swaziland Links For My Site.doc read).
I was trying to upload the file from my ssystem. Please try the jsp out from www.ernieboy.com/SendMail.jsp and you will see what I mean.
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!