users@glassfish.java.net

JavaMail sessions

From: Behrang Saeedzadeh <behrangsa_at_gmail.com>
Date: Sat, 11 Nov 2006 04:35:09 +0330

Hi,

I have created a JavaMail Session named "test" via the Admin GUI. To
test the availability of the resource, I have created a sample JSP
file containing the following code snippet:

  <%
        Context ic = new InitialContext();
        Session ms = (Session) ic.lookup("java:comp/env/mail/test");
   %>

When I visit the JSP page, I get the following exception:

   javax.servlet.ServletException: javax.naming.NameNotFoundException:
No object bound to name java:comp/env/mail/test

Any ideas what is possibly wrong with my setup?

Thanks in advance,
Behi

-- 
"Science is a differential equation. Religion is a boundary condition"
- Alan Turing
Behrang Saeedzadeh
http://www.jroller.com/page/behrangsa
http://my.opera.com/behrangsa