Apache Roller 4.0 – Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Time for action — downloading the JAF API

In this exercise, we're going to download the JAF API from the Sun website. The steps are almost identical to the JavaMail exercise, so you can use it as a reference.

  1. Open your web browser and go to http://java.sun.com/javase/technologies/desktop/javabeans/jaf/downloads/index.html. Scroll down through the page until you find the Download JavaBeans Activation Framework 1.1.1 release Download link, and click on it:
    Time for action — downloading the JAF API
  2. Select I agree to the Software License Agreement and click on Continue:
    Time for action — downloading the JAF API
  3. Click on the jaf-1_1_1.zip link to open the Opening jaf-1_1_1.zip dialog. Select the Save File radio button and click on the OK button:
    Time for action — downloading the JAF API
  4. Once the download is complete, go to the directory where you downloaded the jaf-1_1_1.zip file.
  5. Unzip the jaf-1_1_1.zip file and locate the activation.jar file inside the jaf-1_1_1 folder. Right-click on the activation.jar file and select Copy from the pop-up menu:
    Time for action — downloading the JAF API
  6. Use Windows Explorer to navigate to Tomcat's lib directory and paste the activation.jar file in there. Your Tomcat's lib folder should now include the activation.jar and mail.jar files, as shown in the following screenshot:
    Time for action — downloading the JAF API
  7. You can close Windows Explorer and your web browser now.

What just happened?

Now that you have the mail.jar and activation.jar files inside Tomcat's lib folder, Roller will be able to send e-mail notifications when someone leaves comments on your blog. The good part is that you don't need to know how to manipulate the Java code inside mail.jar or activation.jar, Roller takes care of that automatically, and you just have to blog, blog, and blog!

The MySQL JDBC driver

MySQL Connector/J 5.1 is the official JDBC driver used for connecting to MySQL databases from Java applications such as Apache Roller. In this next exercise, you'll download the Connector/J 5.1 jar file and copy it to Tomcat's lib folder, so that Roller can communicate with the rollerdb database that you'll create in a later section.