Hi all,
I'm trying to teach mailing to my local JSPWiki on Tomcat 6. Since I'm
using Apache Roller, too, I'd like to configure a global Mail
resource.
My JSPWiki is running with custom authentication via the
CookieAuthModule.
I added the following code to Tomcat's server.xml
<GlobalNamingResources> section:
---
<Resource name="mail/Session" auth="Application"
type="javax.mail.Session"
mail.user="[EMAIL PROTECTED]"
mail.password="secret"
mail.smtp.host="smtp.1und1.de"
mail.smtp.starttls.enable="true"
mail.smtp.auth="true"
debug="true"
description="some desc." />
---
Then I added this jspwiki.xml to Catalina/localhost to map the global
resource to JSPWiki's Context:
---
<Context path="/jspwiki" debug="0">
<ResourceLink
name="mail/Session"
global="mail/Session"
type="javax.mail.Session"
/>
</Context>
---
The next thing was modifying JSPWiki's web.xml:
---
<resource-ref>
<description>Resource reference to a application-managed JNDI JavaMail
factory for sending e-mails.</description>
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Application</res-auth>
</resource-ref>
---
Well, mailing isn't working :-( I'm not sure if this log entry is
related to this issue:
23.01.2008 12:16:28 org.apache.catalina.core.ApplicationContext log
INFO: No jspwiki.propertyfile defined for this context, using default from
/WEB-INF/jspwiki.properties
JSPWiki's log tells me that it falls back to its own settings. BTW,
when commenting out all custom mail settings, the log simply contains
a NullPointerException at this place.
I'm new to all this JNDI, JEE a.s.o. stuff and maybe I'm doing a basic
mistake?
Would appreciate any help!
Regards,
Florian