JSP Insider 5: Using Javamail--1 in JSP

Source: Internet
Author: User
Tags html form mail
JS are you interested in using JSP to construct the mail tool? If yes, then you come to the right place. This tutorial will demonstrate the underlying concepts behind the mail tool, including the HTML code that collects the email data, several key features of the JavaMail API, and how to integrate these features into the JSP. This javamail introductory tutorial includes an example of a successful implementation of JavaMail in JSP, and once mastered, JavaMail becomes a powerful API tool in the JSP application.

This tutorial requires preliminary knowledge of the JSP, JavaBeans, and JavaMail APIs, and if you intend to understand the basics of JSP or JavaBean, see JSP Insider Archive, where we provide introduction to Java Server pages and other good tutorials. You can also visit Sun ' s product Information page. To learn more about JavaBeans, visit Sun ' s JavaBean Tutorial. Knowledge about JavaMail is presented in this and subsequent courses.

If you know nothing about the above three knowledge points, but your server supports JSP and JavaMail, you can copy the tool to your server and use it directly. In addition to this tutorial, you can also get an informal javamail tag library.

JavaMail is a sun-developed API for email processing, which presets the implementation of some of the most popular mail transfer protocols and is easy to use. For more background information, see Sun ' s Product Information page.

Although JavaMail is an API developed by Sun, it is not currently included in the standard Java Development Kit. This means you need to download the JavaMail class file. To access JavaMail's Web site, please click here http://java.sun.com/products/javamail/index.html. You also need Sun's JavaBeans activation Framework (JAF) http://java.sun.com/products/javabeans/glasgow/jaf.html. Without JAF participation, JavaMail will not be able to work. Once you have downloaded all the necessary files, make sure that the Java compiler has access to these class files. For example, in Windows 2000, you only need to add the path to the class file in the CLASSPATH environment variable. Similar work is required in other operating systems.

Alas!
So far, you haven't written a line of code, you're sweating? Don't worry too much, this is the hardest part of the tutorial and make sure everything is installed and then let's go ahead.

The remainder of the tutorial will be divided into three sections:

Part One: HTML forms
Part II: About JavaMail
Part III: JavaMail and JSP work together
The first part provides an example of an HTML form to collect typical email data, the second part, will introduce more about the function of Javamai, the third part, the HTML form and Javamai organization together, let JavaMail and JSP to work together, Create a basic mail tool.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.