Home arrow JavaScript arrow JSP Libraries and AJAX
JAVASCRIPT

JSP Libraries and AJAX


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.

Author Info:
By: Mamun Zaman
Rating: 4 stars4 stars4 stars4 stars4 stars / 17
August 29, 2007
TABLE OF CONTENTS:
  1. · JSP Libraries and AJAX
  2. · AjaxTags Tags
  3. · jMaki
  4. · jMaki widgets
  5. · jMaki Menu, Data Table and More

print this article
SEARCH DEVARTICLES

JSP Libraries and AJAX
(Page 1 of 5 )

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.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- Project Nashorn to Make Java, JavaScript Wor...
- JavaScript Virus Attacks Tumblr Blogs
- Google Releases Stable Dart Version, JavaScr...
- Khan Academy Unveils New JavaScript Learning...
- Accessing Nitro? There`s an App for That
- JQuery 2.0 Leaving Older IE Versions Behind
- Fastest JavaScript Engine Might Surprise You
- Microsoft Adjusting Chakra for IE 10
- Brendan Eich: We Don`t Need Google Native Cl...
- An Overview of JavaScript Statements
- An Overview of JavaScript Operators
- Overview of JavaScript Variables
- More of the Top jQuery Social Plugins
- The Top jQuery Social Plugins
- More of the Top jQuery Slider Plugins

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials