This post elaborates on how to implement Ajax in Struts 2 application.
** UPDATE: Struts 2 Complete tutorial now available here.
In my previous post, I explained about making AJAX calls to a servlet from a JSP page and updating a part of the JSP page with a simple response from the Servlet . In this post I am going to add something more to it by making the servlet return complex Java Objects such as lists, maps, etc with the help of JSON in addition to JQuery and AJAX.
Here I’m going to use a JSON library in Servlet to convert this complex Java objects (lists,maps,arrays.etc) to JSON strings that will be parsed by JQuery in the JSP page and will be...
In this article we will learn to setup jTable and dependent libraries in a Java web application.
Let us take a look at what happens if we are not using a Jquery Plugin for front end Table data management.
Pre-requisites for usage:
A lot of time on hand
Last but not the least...
In this article we shall learn the basic coding that required to create JQuery DataTable using JSON passed by servlet. DataTable is a jQuery plugin which adds a lot of functionality to plain HTML tables, such as filtering, paging sorting, changing page length, server side processing etc.
jQuery UI themes
Above download will provide two JQuery plugin jquery.js and jquery.dataTables.js
Implementing Ajax features in a Java web application will be so easy if you are using JQuery library; Since this library provides built-in methods that can be used to enable Ajax. In this post, I am going to demonstrate the JQuery’s Ajax capability using on blur event in java web application.
As highlighted in the image download the jQuery library and place in js folder of eclipse work-space, and refer this jQuery files in the head section in the jsp, this jQuery file is responsible...
Steps done to set up our application for jTable
Libraries required for the setup,
Commonly required Struts 2 jars
Now to start with demonstration of above topic, let us Create a Dynamic Web Project in...
In this article we will learn to create a pie chart in Servlet with YUI3 jquery chart plugin and this demo is as follows
YUI3 provides a “charts” module for creating a wide variety of good looking charts, this module can be called using use() method. These charts requires input data to be in JSON format. For more Information on YUI3 chart, read on its official document – http://yuilibrary.com/yui/docs/charts/
Create Auto-Refreshing Pie Chart/Bar Chart in Servlet dynamically...
In my previous article on File Upload Example in Servlet & Jsp we learnt how to upload a file into sever via Apache Commons FileUpload plugin, In this article we shall add ajax style feature to our previous example using jQuery.AjaxFileUpload.js plugin.
Before getting into the tutorial, I will let you know the small modification which I made in jQuery Form Plugin.
1. By default this plugin allows only images, this is specified in jQuery.AjaxFileUpload.js as below.