Hi,

I had written a simple mail application that worked as a stand alone Java
app. Then, I converted it to a JSP and deployed it on Pramati (an app server
available from Pramati.com). Now, I deployed it on Tomcat. The same thing
does not work. The code reads:

  java.util.Properties properties = System.getProperties();
  Session session = Session.getInstance(properties,null);

  MimeMessage message = new MimeMessage(session);
  //set MIME details
  System.out.println("Connecting...");
  Transport transport = session.getTransport("smtp");
  System.out.println("Connected...");

The line session.getTransport("smtp") throws a NoSuchProviderException.
Although the same thing works as an application. My contention is that
Tomcat returns something wrong as Session. This session cannot then cannot
connect to smtp port of my webserver.

Any solutions?

Hardeep Singh
http://SeeingWithC.cjb.net

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to