Apache
  Home arrow Apache arrow Page 2 - Creating Your First Tapestry Project
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
APACHE

Creating Your First Tapestry Project
By: Alexander Kolesnikov
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 34
    2007-04-17


    Table of Contents:
  • Creating Your First Tapestry Project
  • Adding Tapestry
  • Deployment descriptor
  • The First Tapestry Page

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Creating Your First Tapestry Project - Adding Tapestry
    ( Page 2 of 4 )

    So far, we have dealt with a generic Java Web application. Now we are going to add Tapestry. Basically, Tapestry is just a set of libraries that bring with them a lot of important and useful functionality.

    One way to obtain these libraries is to go to the Tapestry website (http://tapestry.apache.org/download.html) and download a binary package acceptable for your platform. I recommend that you choose version 4.1.1. Although it is stated that it is "still undergoing lots of active development," it is also considered to be "stable enough." The downside of this approach, i.e. downloading the libraries from the Tapestry website, is that the libraries are packaged in a somewhat inconvenient way -- every single library is put into a separate subfolder.

    For our purposes, it will be more convenient to put all the JAR files together into one folder. You can repackage them yourself, or you can simply download the package that I have already created for you; please go to the beginning of this article and click on the appropriate link.

    Unpack the libraries into some folder on your hard drive. In my case, I have put them all into the tapestry41 folder in my home directory.

    Now, if you expand the Libraries folder in the Projects view of your NetBeans IDE, you will see that it already contains JDK and Bundled Tomcat libraries. Right-click (or Ctrl-click on a Mac) on the Libraries folder and choose Add Library... The Add Library dialog will appear, similar to this one:

    We don't have any Tapestry libraries here yet, so we need to add one. Press the Manage Libraries... button. The Library Manager dialog will open as shown below:

    Now press the New Library... button and in the dialog that opens, enter a name for the new library, such as Tapestry41. Press OK.

    Back in the Library Manager, make sure that the name of the new library is selected in the Libraries view on the left side and press the Add JAR/Folder... button. In the Browse Jar/Folder dialog that opens, navigate to the folder where you have unpacked all the Tapestry-related JAR files and select them all, then press the Add JAR/Folder button. Yes, I know, it's too many dialogs and buttons for such a simple operation, but we need to do this only once; any other projects you create in the same IDE will simply make use of this new library. The final result should look like this:

    Press OK and then, back in the Add Library dialog, choose the newly added library and press the Add Library button. Phew... A bunch of files gets added to the Libraries folder of your project and now, not only is the IDE aware of all the classes you will need for Tapestry development, but these libraries will also be packed into the final package with the application we are going to create.



     
     
    >>> More Apache Articles          >>> More By Alexander Kolesnikov
     

       

    APACHE ARTICLES

    - Creating a VAMP (Vista, Apache, MySQL, PHP) ...
    - Putting Apache in Jail
    - Containing Intrusions in Apache
    - Server Limits for Apache Security
    - Setting Permissions in Apache
    - Installing Apache
    - Apache Installation and Configuration
    - Apache Tapestry and Custom Components: DateI...
    - Tapestry and AJAX: Autocompleter and InlineE...
    - PropertySelection and IPropertySelectionMode...
    - The DatePicker and Shell Components of Apach...
    - Apache Tapestry: ASO and More Components
    - Apache Tapestry and DirectLink, IoC and DI
    - Making a CelebrityCollector with Apache Tape...
    - Apache Tapestry and Listener Methods, Condit...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek