Hi, Richard

The Session class is in javax.mail package. getInstance() is a static method
of the class.

Hardeep

----- Original Message -----
From: "Richard Yee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 1:06 PM
Subject: Re: JavaMail and JSP


> Hardeep,
> Where is the Session variable coming from?
>    Session session = Session.getInstance(properties,null);
>
> The implicit session object available in the JSP is named 'session' not
> 'Session'.
>
> -Richard
>
> At 12:50 PM 8/31/01 +0530, you wrote:
> >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
>
>
===========================================================================
> 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
>

===========================================================================
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