Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2004, 03:31 AM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default I can't install javamail

I use tomcat5.0 win2000server javamail1.3 and jaf1.0.2.
I copy the mail.jar and activation.jar to my own dirctory like follows:
(mydir)\WEB-INF\lib\mail.jar
(mydir)\WEB-INF\lib\activation.jar
but i can't use the javamail.
the error report:

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file

D:\server\Tomcat 5.0\work\Catalina\localhost\begjsp-ch17\org\apache\jsp\testJavaMail_jsp.java:6: package java.mail does not exist
import java.mail.*;
^
D:\server\Tomcat 5.0\work\Catalina\localhost\begjsp-ch17\org\apache\jsp\testJavaMail_jsp.java:8: package javax.mail.Internet does not exist
import javax.mail.Internet.*;
^
2 errors


    org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:127)
    org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:351)
    org.apache.jasper.compiler.Compiler.generateClass( Compiler.java:415)
    org.apache.jasper.compiler.Compiler.compile(Compil er.java:458)
    org.apache.jasper.compiler.Compiler.compile(Compil er.java:439)
    org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:553)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:291)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:856)

please help me
 
Old June 16th, 2004, 08:11 AM
Authorized User
 
Join Date: Jun 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

try adding .jar files path to CLASSPATH

Prasanth.C

prasanth.c
 
Old June 23rd, 2004, 09:50 PM
Registered User
 
Join Date: Mar 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The problem resides in your import statements. There is no such package as java.mail.* or javax.mail.Internet.*.

The correct imports should read:

import javax.mail.*;
import javax.mail.internet.*;

Hopefully this will do it.






Similar Threads
Thread Thread Starter Forum Replies Last Post
javamail instaling problem rasmikanta JSP Basics 0 August 17th, 2006 05:52 AM
Javamail + form(javabean) octave J2EE 0 February 23rd, 2006 05:37 AM
Problems with JavaMail 1.3.3 dgh BOOK: Beginning Cryptography with Java 0 September 7th, 2005 05:25 PM
Javamail elisha Apache Tomcat 1 December 31st, 2004 03:13 PM
related to javamail anishde J2EE 0 January 17th, 2004 09:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.