Logo

Navigation
  • Home
  • Services
    • ERP Solutions
    • Implementation Solutions
    • Support and Maintenance Solutions
    • Custom Solutions
    • Upgrade Solutions
    • Training and Mentoring
    • Web Solutions
    • Production Support
    • Architecture Designing
    • Independent Validation and Testing Services
    • Infrastructure Management
  • Expertise
    • Microsoft Development Expertise
    • Mobile Development
    • SQL Server Database and BI
    • SAP BI, SAP Hana, SAP BO
    • Oracle and BI
    • Oracle RAC
  • Technical Training
    • Learn Data Management
      • Business Intelligence
      • Data Mining
      • Data Modeling
      • Data Warehousing
      • Disaster Recovery
    • Learn Concepts
      • Application Development
      • Client Server
      • Cloud Computing Tutorials
      • Cluster Computing
      • CRM Tutorial
      • EDI Tutorials
      • ERP Tutorials
      • NLP
      • OOPS
      • Concepts
      • SOA Tutorial
      • Supply Chain
      • Technology Trends
      • UML
      • Virtualization
      • Web 2.0
    • Learn Java
      • JavaScript Tutorial
      • JSP Tutorials
      • J2EE
    • Learn Microsoft
      • MSAS
      • ASP.NET
      • ASP.NET 2.0
      • C Sharp
      • MS Project Training
      • Silverlight
      • SQL Server 2005
      • VB.NET 2005
    • Learn Networking
      • Networking
      • Wireless
    • Learn Oracle
      • Oracle 10g
      • PL/SQL
      • Oracle 11g Tutorials
      • Oracle 9i
      • Oracle Apps
    • Learn Programming
      • Ajax Tutorial
      • C Language
      • C++ Tutorials
      • CSS Tutorial
      • CSS3 Tutorial
      • JavaScript Tutorial
      • jQuery Tutorial
      • MainFrame
      • PHP Tutorial
      • VBScript Tutorial
      • XML Tutorial
    • Learn Software Testing
      • Software Testing Types
      • SQA
      • Testing
  • Career Training
    • Career Improvement
      • Career Articles
      • Certification Articles
      • Conflict Management
      • Core Skills
      • Decision Making
      • Entrepreneurship
      • Goal Setting
      • Life Skills
      • Performance Development
      • Personal Excellence
      • Personality Development
      • Problem Solving
      • Relationship Management
      • Self Confidence
      • Self Supervision
      • Social Networking
      • Strategic Planning
      • Time Management
    • Education Help
      • Career Tracks
      • Essay Writing
      • Internship Tips
      • Online Education
      • Scholarships
      • Student Loans
    • Managerial Skills
      • Business Communication
      • Business Networking
      • Facilitator Skills
      • Managing Change
      • Marketing Management
      • Meeting Management
      • Process Management
      • Project Management
      • Project Management Life Cycle
      • Project Management Process
      • Project Risk Management
      • Relationship Management
      • Task Management
      • Team Building
      • Virtual Team Management
    • Essential Life Skills
      • Anger Management
      • Anxiety Management
      • Attitude Development
      • Coaching and Mentoring
      • Emotional Intelligence
      • Stress Management
      • Positive Thinking
    • Communication Skills
      • Conversation Skills
      • Cross Culture Competence
      • English Vocabulary
      • Listening Skills
      • Public Speaking Skills
      • Questioning Skills
    • Soft Skills
      • Assertive Skills
      • Influence Skills
      • Leadership Skills
      • Memory Skills
      • People Skills
      • Presentation Skills
    • Finding a Job
      • Etiquette Tips
      • Group Discussions
      • HR Interviews
      • Interview Notes
      • Job Search Tips
      • Resume Tips
      • Sample Resumes
 

Quickly Develop Java Programs With Tapestry

By Exforsys | on July 12, 2006 |
J2EE

How To Quickly Develop Java Programs With Tapestry

As you work with J2EE, you will find that there are a large number of programs which have been designed to make it easier to work with. If you are a programmer, the last thing you should want to concern yourself with is basic low level programming work.

If you are like many programmers, you probably want do deal with issues that are related to business. One example of a program that can help you is called the Model View Controller, or MVC. There are a number of other useful frameworks such as JavaServer Faces, which is popularized by Sun.

Another program which has gathered a lot of attention is called Tapestry. Tapestry is an open-sourced program which is designed to work with programmers who want to create object oriented Java applications. Programmers who use Tapestry will be able to store data with object properties, and they will also be able to work with user actions and event handling. Another feature that you will find impressive about Tapestry is the HTML templates. Each page in Tapestry will have an HTML tag which is designed for browsers. It is much easier to use than JSTL or JSP.

Tapestry is built with a basic Servlet API. This means it can run on any Java program server. Before you begin, you will need to create the Tapestery servlet on the web.xml file. Below is the code that will help you accomplish this:

< ?xml version="1.0" encoding="UTF-8"? >
< !DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >

< web-app >
< display-name > Introduction to Tapestry Tutorial< /display-name >
< servlet >
< servlet-name > app< /servlet-name >
< servlet-class >org.apache.tapestry.ApplicationServlet< /servlet-class >
< load-on-startup >0< /load-on-startup >
< /servlet >
< servlet-mapping >
< servlet-name >app< /servlet-name >
< url-pattern >/app< /url-pattern >
< /servlet-mapping >
< /web-app >

You can pick any name you want to use for the servlet. At the same time, changing the URL is a bit more complex. Because of this, it is best to leave it alone unless you have some experience dealing with this issue. To fully understand how Tapestry can help you create Java programs, it is first important to list an example. I will go over a basic tutorial of the Tapestry interface. In this example you will be using a website which sells cheap plane tickets. Your discount offers will be represented by the TravelOffer class.

The TravelOffer class will provide information about the city that you are traveling to, as well as the price. The FeatureOffer class will give information about the business methods for various discounts. The FeatureOfferImpl class will deal with the creation of the interface. You will now want to create the very first page of Tapestry. Each Tapestry program will have a homepage called Home. The homepage you see will have a limited amount of information.

However, there are two important things it will need to have, and these are the page template and the Java class which is connected to it. The page template will have a combination of HTML code and Tapestry elements which are dynamic. The Java class will show information about the dynamic elements of the page. If you are using Tapestry 3, the pages will need to have specification files. These files will be XML types, and they will give a description of the mapping between the Java class and page template. If you are doing something basic, they are not necessary. The page template that you will be working with should look something like this:

< html >
< head >
< title >Tutorial: Introduction to Tapestry< /title >
< /head >

< body >
< h3 >Online Travel Discounts< /h3 >
< h4 >One of today’s feature destinations:< /h4 >
< p >
A trip to
< span jwcid="@Insert" value="ognl:featureDestination.destination" >Paris< /span >
for only $< span jwcid="@Insert" value="ognl:featureDestination.price" >199< /span >
< /p >
< /body >
< /html >

This is the basic interface you will need to know before moving on to finish the tutorial. Once this has been done, things will be easier. Tapestry is a powerful program which can allow you to build Java programs within a short period of time.

« « A Java TOC2 Class Which Can Contact Aim
How To Make Sure Your Essay Is Perfect » »

Author Description

Avatar

Editorial Team at Exforsys is a team of IT Consulting and Training team led by Chandra Vennapoosa.

Free Training

RSSSubscribe 392 Followers
  • Popular
  • Recent
  • .NET and J2EE – A Comparsion Study

    November 26, 2005 - 0 Comment
  • JSP Basics

    May 7, 2006 - 0 Comment
  • How To Use Java DB as Your Client Mobile Database

    July 14, 2006 - 0 Comment
  • Future of Java Technology

    November 26, 2005 - 0 Comment
  • Antipatterns In Java Programs

    July 1, 2006 - 0 Comment
  • Java Overview

    July 17, 2006 - 0 Comment
  • Is Ejb really significant in enterprise applications?

    November 26, 2005 - 0 Comment
  • How a Profiler Can Improve Your Java Applications

    July 1, 2006 - 0 Comment
  • Java Virtual Machine

    July 13, 2006 - 0 Comment
  • Java for Stand-Alone Applications

    November 26, 2005 - 0 Comment
  • Why It is Important To Focus On Java Exceptions For Your Programs

    July 27, 2006 - 0 Comment
  • Important Features of Java – Multithreading, AWT

    July 26, 2006 - 0 Comment
  • What You Should Know About Java XML

    July 25, 2006 - 0 Comment
  • What You Can Do To Deal With Java’s Memory Retention Problems

    July 22, 2006 - 0 Comment
  • Java Overview

    July 17, 2006 - 0 Comment
  • How To Use Java DB as Your Client Mobile Database

    July 14, 2006 - 0 Comment
  • How To Run J2ME Programs on Palm Devices

    July 14, 2006 - 0 Comment
  • Java Virtual Machine

    July 13, 2006 - 0 Comment
  • A Java TOC2 Class Which Can Contact Aim

    July 12, 2006 - 0 Comment
  • How To Perform Class Loading With Java

    July 8, 2006 - 0 Comment

Exforsys e-Newsletter

ebook
 

Related Articles

  • Why It is Important To Focus On Java Exceptions For Your Programs
  • Important Features of Java – Multithreading, AWT
  • What You Should Know About Java XML
  • What You Can Do To Deal With Java’s Memory Retention Problems
  • Java Overview

Latest Articles

  • Project Management Techniques
  • Product Development Best Practices
  • Importance of Quality Data Management
  • How to Maximize Quality Assurance
  • Utilizing Effective Quality Assurance Strategies
  • Sitemap
  • Privacy Policy
  • DMCA
  • Trademark Information
  • Contact Us
© 2023. All Rights Reserved.IT Training and Consulting
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptReject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT