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 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.
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.