I've only every declared in in META-INF/context.xml ...but I've also experienced another problem before that you may be having and that is truncating the resource name...it will take your valid name and chop off part of it (seems to truncate at / ) and then complain that it couldn't find the resource. The reason you may be having this issue is I noticed in your log error it says
javax.naming.NameNotFoundException: Name mail is not bound in this Context Based on my experience using it I would expected to see ResourceLink javax.naming.NameNotFoundException: Name mail/Session is not bound in this Context If you are still having the problem after moving your to the context.xml file, you may want to try a name without slashes to see. We are running tomcat 5.5.25 and this version seems to recognize names with slashes but we upgraded from a version (don't know the number) that I never could get resource links with slashes in them to work. Curtis On Thu, Oct 15, 2009 at 9:19 AM, Mikolaj Rydzewski <m...@ceti.pl> wrote: > Ken T. wrote: >> >> I'm having some difficulty setting up a shared email resource under Tomcat >> and I can't seem to find the answer anywhere online. Everything seems to be >> working under Tomcat, but for some reason my application can't find the JNDI >> name.. > > You have to include mapping in Context as well: > > META-INF/context.xml: > > <Context> > <ResourceLink global="mail/Session" name="mail/Session" > type="javax.mail.Session" > /> > > > -- > Mikolaj Rydzewski <m...@ceti.pl> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Curtis Garman Web Programmer Heartland Community College --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org