Ajax in Java
jQuery form validation using jQuery Validation plugin
This article discusses client-side validation using jQuery’s validation plugin. This jQuery plugin has a bunch of standard validation methods such as a required field, valid email or URL, minimum and maximum lengths for a field, etc. In addition to that you can customize the look and feel of the error messages and their placement. Library required jQuery Library jQuery Validation Plugin Let us start with a simple example. Jsp <!DOCTYPE HTML> <html> <head> <script...
read moreAutocomplete in Struts 2 using Jquery
I have already written a detailed post on Autocompleter Textbox & dropdown in Struts 2 using struts2-dojo-plugin.jar. In this post, I am going to describe how to implement Ajax based autocomplete in Struts 2 web application using jQuery plugin. jQuery Autcomplete is part of the jQuery UI library which allows converting a normal textbox into an autocompleter textbox by providing a data source for the autocompleter values. Here when user types a character in text box, jQuery will fire an ajax request using autocomplete...
read moreCRUD Operations in Struts 2 using jTable jQuery plugin via Ajax
In the previous article “Setting up jQuery jTable plugin with Struts 2 framework” I have explained about how to setup jTable plugin in struts 2 application. This article describes on how to implement “Ajax based curd operation in Struts 2 using the JQuery jTable plugin, If you have not read the previous articles “Setting up jQuery jTable plugin with Struts 2 framework” I will recommend that you read that article first because it explains what jTable plugin is and how you can integrate it in Struts 2...
read moreSetup and Load Data in jQGrid using Servlets and JSP
JqGrid is an Ajax-enabled JavaScript control that provides solutions for representing and manipulating grid data on the web. Since the grid loads data at client side via Ajax call-backs, so it can be integrated with any server-side technology, including PHP, ASP and Java. JqGrid uses a jQuery Java Script Library and is written as plugin for that package. Library required JqGrid library Jquery UI theme google-gson-2.2.4.jar Now to start with demonstration of above topic, let us Create a Dynamic Web Project in Eclipse,...
read moreCRUD Operations in Java Web Applications using jTable jQuery plugin via Ajax
In the previous article “Setting up JQuery jTable plugin in Java Web Applications” I have explained how to setup jTable plugin in java web application. This article describes on how to implement “Ajax based curd operation in Java Web Applications using the JQuery jTable plugin and it will not explain how to setup jTable plugin in java web application. So If you have not read the previous articles “Setting up JQuery jTable plugin in Java Web Applications I will recommend that you read that article first...
read moreGridView in Struts2 using jQuery DataTable via Ajax
In this post, I am going to explain on how to use DataTable plugin to display data in Gridview format with pagination feature in Struts 2 web application. 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. Library struts2-json-plugin-x.x.x.jar DataTable Plugin OpenCSV(Optional – I am using this to deal with a csv file as data source instead of database to keep it simple) jQuery UI themes In...
read moreAjax File Upload with Progress Bar using jQuery in Java web application
In my previous article we learnt on how to implement AJAX Style file upload in a java web application. In this post we shall learn on how to create AJAX file uploading system with progress bar which shows upload progress in percentage (%) using jQuery in java web application. I have used jQuery Form plugin for this purpose. This plugin is easy to use and supports iframe file transportation. Libraries required for the setup jQuery.form.js jquery Apache Commons FileUpload commons-io.jar Folder structure Now Create a...
read moreTab Style Login and Signup example using jQuery in Java web application
In this post, I am going to describe on how to design tab style login and registration panel using jquery ui tabs in java web applications. Here I’m using oracle database as a back end for registering and authenticating users. Libraries required for the setup, Servlet-api.jar jQuery jQuery UI Ojdbc.jar Now create a dynamic web project in eclipse and create two folders under WebContent and name it as ‘js’ and ‘css’. And add the downloaded jQuery javascript and css files to it. The final...
read moreAutocomplete in java web application using Jquery and JSON
This article will describe how to implement jQuery Autocomplete in java web application. jQuery Autcomplete is part of the jQuery UI library which allows converting a normal textbox into an autocompleter textbox by providing a data source for the autocompleter values. Here when user types a character in text box ,jQuery will fire an ajax request using autocomplete plugin to the controller, this controller(Servlet) in turn call the dao class which connects to the database and returns the required data back as an array...
read moreAjax implementation in Struts 2 without jQuery plugin
AJAX is a technique for creating better, faster, and more interactive web applications. With AJAX, your JavaScript can communicate directly with the server, using the JavaScript XMLHttpRequest object. With this object, your JavaScript can transfer data with a web server, without reloading the page. This post elaborates on how to implement Ajax in Struts 2 application. ** UPDATE: Struts 2 Complete tutorial now available here. Action class package com.simplecode.action; import...
read more