you're right ....
just below my error page :
javax.servlet.ServletException: No provider for pop3
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:459)
at
mail._0002fmail_0002fpop_0002ejsppop_jsp_17._jspService(_0002fmail_0002f
pop_0002ejsppop_jsp_17.java:187)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:797)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpConnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
at java.lang.Thread.run(Thread.java:484)
Root cause:
javax.mail.NoSuchProviderException: No provider for pop3
at javax.mail.Session.getProvider(Session.java:249)
at javax.mail.Session.getStore(Session.java:323)
at javax.mail.Session.getStore(Session.java:303)
at
mail._0002fmail_0002fpop_0002ejsppop_jsp_17._jspService(_0002fmail_0002f
pop_0002ejsppop_jsp_17.java:94)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
a:797)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpConnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
at java.lang.Thread.run(Thread.java:484)
-----Message d'origine-----
De : Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi 26 avril 2001 13:04
Ŕ : '[EMAIL PROTECTED]'
Objet : AW: Please Help on Java Mail / tomcat
You should provide some more information about the
kind of error or symptoms you see.
> -----Ursprüngliche Nachricht-----
> Von: Marot Laurent [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 26. April 2001 12:58
> An: [EMAIL PROTECTED]
> Betreff: Please Help on Java Mail / tomcat
>
>
> I'm trying to get the content of an e-mail box on a pop3 server.
>
> Everything run all right with Jrun but doesn't with Tomcat 3.2
>
> Could somenone explain ???
>
> thanks
>
> <%@ page import="javax.mail.*" %>
> <%@ page import="javax.mail.internet.*" %>
> <%@ page import="java.util.*" %>
> <%@ page import="java.io.*" %>
> <HTML>
> <HEAD>
> <link href="style.css" rel="stylesheet" type="text/css">
> <TITLE>Boite aux lettres</TITLE>
> <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
> </HEAD>
> <BODY bgColor=#008080>
> <% String log1="", pwd1="", bl1="", opt1="",dest1="",
> exp1="",dat1="",suj1="",con1="", chaine="", tempo="";
> char ch;
> int fi=0;
> if (request.getParameter("log")!=null)
> log1=request.getParameter("log");
> if (request.getParameter("pwd")!=null)
> pwd1=request.getParameter("pwd");
> if (request.getParameter("nb")!=null) bl1=request.getParameter("nb");
> if (request.getParameter("des")!=null)
> dest1=request.getParameter("des");
> if (request.getParameter("exp")!=null)
> exp1=request.getParameter("exp");
> if (request.getParameter("opt")!=null)
> opt1=request.getParameter("opt");
> if (request.getParameter("dat")!=null)
> dat1=request.getParameter("dat");
> if (request.getParameter("suj")!=null)
> suj1=request.getParameter("suj");
> if (request.getParameter("con")!=null)
> con1=request.getParameter("con");
> %>
> <table width=75% cellpadding=0 celspacing=0>
> <% String host = "XXX",username = "ZZZ/"+log1+"/"+bl1, password =
> pwd1, provider = "pop3";
> Properties props = new Properties();
> Session mailSession = Session.getDefaultInstance(props, null);
> Store store = mailSession.getStore(provider);
> store.connect(host, username, password);
> Folder inbox = store.getFolder("INBOX");
> if (inbox == null) {
> out.println("No INBOX");
> System.exit(1);
> }
> inbox.open(Folder.READ_ONLY);
> Message[] messages = inbox.getMessages();
> for (int i = 0; i < messages.length; i++) {
> out.println("<TR><TD class=txt <BR><b>");
> out.println("<img src=arrow_news.gif border=0> Message " +
> (i+1));
> out.println("</b><BR></TD></TR><TR><TD class=smtxt>");
> if (dest1.equals("on")){
> Address[] from = messages[i].getFrom();
> if (from != null) {
> for (int j = 0; j < from.length; j++) {
> out.println("<B>De :</b> " + "<a href=FormMail.htm>" + from[j] +
> "</a>");
> out.println("<BR>");
> }
> }
> }
> if (dest1.equals("on")){
> Address[] to =
> messages[i].getRecipients(Message.RecipientType.TO);
> if (to != null) {
> for (int j = 0; j < to.length; j++) {
> out.println("<b>A :</b> " + to[j]);
> out.println("<BR>");
> }
> }
> }
> if (suj1.equals("on")){
> String subject = messages[i].getSubject();
> if (subject != null) {
> out.println("<B>Sujet:</b> " + subject);
> out.println("<BR>");
> }
> }
> if (dat1.equals("on")){
> Date d = messages[i].getSentDate();
> if (d != null) {
> out.println("<b>Date:</b> " + d);
> out.println("<BR>");
> }
> }
> out.println();
> %>
> </td></tr><tr><td class=smtxt><font size="-1">
> <% if (con1.equals("on")) {
> tempo="cnt"+String.valueOf(i)+".txt";
> FileWriter letters = new FileWriter(tempo);
> Object content = messages[i].getContent();
> if (content instanceof String) {
> chaine=(String)content;
> out.println(content);
> for (int j = 0; j < chaine.length(); j++) {
> ch=chaine.charAt(j);
> letters.write(ch);
> }
> }
> else if (content instanceof InputStream) {
> InputStream in = (InputStream) content;
> int c;
> while ((c = in.read()) != -1) out.write(c);
> letters.write((char)c);
> }
> else {
> System.out.println("Type de contenu non reconnu");
> }
> letters.close();
> out.println("<BR><bR>");
> } %>
> </font>
> <% }
> inbox.close(false);
> store.close();
> %>
> </td></tr></table>
> </BODY>
> <HTML>
>
>