title: java mail api : exception thrown saying java.lang.SecurityException: Access to default session denied
body: <p>when im trying to send a mail using java mail api in my web application , I'm getting this exception. </p>
  
  <p>java.lang.SecurityException: Access to default session denied</p>
  
  <p>the inputs are fron an html page. then it goes to a servlet which eventually calls a java class where the mail logic is written</p>