Hello there,
Am using
JBoss 5.1.0GA and JDK 1.5.0_19 on OS X Leopard.
Created a working
SendMailServlet.
Have now decided to refactor it into two separate classes (extract out JavaMail code to a separate class and create a ServletController).
Am also trying to use JNDI to access the connection properties in the mail-service.xml configuration file residing in JBoss.
The Mailer class contains the reusable functionality needed to send an e-mail:
The MailController class serves as a standard
Java Servlet which invokes the Mailer.class's sendMsg() method:
Have the mail configuration set under $JBOSS_HOME/server/default/deploy/mail-service.xml:
web.xml (Deployment Descriptor):
This is what is outputted when I start JBOSS and click point my browser to:
https://localhost:8443/myapp/sendmail
Why am I getting this java.net.ConnectException: Connection refused exception?
Happy programming,
Mike