Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 16th, 2004, 03:31 AM
Registered User
 
Join Date: May 2004
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old June 16th, 2004, 08:11 AM
Authorized User
 
Join Date: Jun 2004
Location: Tirupati, Andhra Pradesh, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

try adding .jar files path to CLASSPATH

Prasanth.C

prasanth.c
Reply With Quote
  #3 (permalink)  
Old June 23rd, 2004, 09:50 PM
Registered User
 
Join Date: Mar 2004
Location: , , .
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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.