1 Reply Latest reply on Dec 15, 2003 5:52 PM by Jon Barnett

    JNDI References to JavaMail Session

    Craig McDaniel Newbie

      I am trying to reference a JavaMail session in a JSP using the JNDI name "java:comp/env/mail/Foo".

      I have mail-service.xml setup with a session at java:/Mail

      My web.xml is set up like so:

      <resource-ref>
       <res-ref-name>mail/Foo</res-ref-name>
       <res-type>javax.mail.Session</res-type>
       <res-auth>CONTAINER</res-auth>
      </resource-ref>

      And my jboss-web.xml maps this like so:

      <resource-ref>
       <res-ref-name>mail/Foo</res-ref-name>
       <jndi-name>Mail</jndi-name>
       </resource-ref>


      However, when I try to look it up, I get the following Exception:

      javax.servlet.jsp.JspException: Naming Exception Mail not bound

      Any hints?