SunQuest
 
       JavaScript
  Home arrow JavaScript arrow JSP Libraries and AJAX
IBM developerWorks
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
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? 
JAVASCRIPT

JSP Libraries and AJAX
By: Mamun Zaman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 10
    2007-08-29

    Table of Contents:
  • JSP Libraries and AJAX
  • AjaxTags Tags
  • jMaki
  • jMaki widgets
  • jMaki Menu, Data Table and More

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    JSP Libraries and AJAX


    (Page 1 of 5 )

    In the first part of this article we learned about AJAX techniques and using AJAX with PHP and JSP. In this part we will try to use some advanced JSP tag libraries to develop feature-rich web applications using AJAX.

    We will mainly use AjaxTags an an open source JSP tag library, and JMaki. Let's start developing applications using AjaxTags.

    This AJAX Tag Library is a set of JSP tags that simplify the use of AJAX technology in Java Server Pages. Some of the common JSP tags are Autocomplete, Callout, Cascading dropdown, Toggle, Update field, Portlet, Tab Panel.

    To use the tag library, you'll need JDK 1.5+ and Servlet container running Servlets 2.3+ and JSP 1.0+ like the Tomcat server. We also need Prototype (prototype.js) from http://www.prototypejs.org, the Scriptaculous library from http://script.aculo.us and the OverLIBMWS library from http://www.macridesweb.com. One fine thing is that the AjaxTags distribution also includes these necessary JavaScript items, CSS and the necessary libraries.

    To download AjaxTags please visit the project homepage at http://ajaxtags.sourceforge.net/index.html. After downloading the binary distribution of AjaxTags, extract the compressed (.zip) file and copy the ajaxtags-1.3.jar into your WEB-INF/lib directory. This distribution also has a tag library named ajaxtags.tld. Add the tag library information in your web.xml.

    To use the AjaxTags tag library in your JSP page use following code.

    <%@ taglib uri="http://ajaxtags.org/tags/ajax" prefix="ajax" %>

    You also need to add the necessary JavaScript libraries bundled with AjaxTags distributions. AjaxTags needs the following CSS as well. Include them in the head section. Use the following codes.

    <link rel="stylesheet" type="text/css" rel="nofollow" target="_blank" href = "css/ajaxtags.css" />

    <link rel="stylesheet" type="text/css" rel="nofollow" target="_blank" href = "css/displaytag.css" />

    Using AjaxTags you can request any server side part like Servlets or JSP or any other non-Java applications as long as the response is in the proper format. Different tags have different response parsers. AjaxTags supports plain string or XML as shown below.

    <?xml version="1.0" encoding="UTF-8"?>
    <ajax-response>
      <response>
        <item>
          <name>Record 1</name>
          <value>1</value>
        </item>
        ...
      </response>
    </ajax-response>

    The AjaxTags distribution has some helper classes for generating this XML for Java application.

    More JavaScript Articles
    More By Mamun Zaman


     

    JAVASCRIPT ARTICLES

    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget
    - Ajax Hack for Entering Information Without R...
    - EXT JS 2.1 Overview
    - Using the Style Object for Zebra Tables with...
    - Binary Searching
    - An Improved Approach to Building Zebra Tables
    - Assigning Background Colors Dynamically to Z...
    - Building Zebra Tables with CSS and JavaScript
    - JavaScript: Array Objects
    - A Closer Look at Smart Markers with Yahoo! M...
    - Using Polylines and Smart Markers with Yahoo...
    - Bulleted Menu of Links
    - Creating Click Loggers and Basic Markers wit...
    - Adding Pan Controls to Yahoo! Maps







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway