Ajax in Java
How to use JQuery dialog as Confirm dialog?
There are quite a few articles you might have read on SimpleCodeStuffs on jQuery like jQuery Tutorial for Beginners, AJAX implementation in Servlets using jQuery and jQuery UI etc. This example will help you if you have any one of below queries: How to implement “confirmation” dialog in jQuery UI dialog? How to use jQuery UI dialog as JavaScript confirm BOX? How to use JQuery dialog as Confirm dialog? jQuery UI Replacement for alert() Issue: How many times did you have to code some confirmation logic on your website to...
read moreStruts2 AngularJS integration
In this post, we will learn to implement AJAX calls from a JSP page to a Struts 2 Action class using AngularJS and update the same JSP page back with the Json response from the Struts 2. Library Required Since Angular can send and receive only in json format, to handle it you need struts2-json-plugin-2.x.x.jar. This plugin allows you to serialize the Action class attribute which has getter and setter into a JSON object. How to use? First of all create a “Dynamic Web Project” in Eclipse and...
read moreAngularJS Interacting with Java Servlet using JSON
In this post, I am going to demonstrate a simple example on how to make AJAX calls from a JSP page to a Servlet using AngularJS and update the same JSP page back with the JSON response from the Servlet. In other words, this post will give you an overview on how to integrate AngularJS in a Java web applications. There are many JSON libraries available that can be used to pass AJAX updates between the server and the client. I am going to use google’s gson library in this example. Below are the steps to reproduce to...
read moreAjax Cascading DropDownList in JSP & Servlet using JQuery and JSON
There are times in a web application where you want to populate a dropdown list based on the value of another drop down list. In this example, we will be creating a dropdown list for favorite spots and favorite player; since this scenario involves in returning complex java objects like lists, maps, etc, so I’m using JSON for this purpose. In the article on AJAX in Servlet & jsp using JQuery I have demonstrated on returning simple object from servlet to jsp via jquery. Library required Google...
read moreRefresh DIV Content Without Reloading Page using jQuery
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 the response from the Servlet. This article will help you to Refresh DIV Content Without Reloading Page using jQuery with simple html page. Refresh Div without Reloading Page Refresh DIV Content Without Reloading Page using jQuery Demo by Mohaideen - @ SimpleCodeStuffs This div will get refreshed for every 2 seconds..! Another must read...
read moreAJAX Tooltip in Java Web Application using qTip2 jQuery plugin
This article discusses AJAX Tooltip in Java Web Application using qTip2 jQuery plugin. This library is used for creating Asynchronous display of tool tip. Library required jQuery Library qTip2 Google gson Project Structure Now Create a dynamic web project in Eclipse with following folder structure Set up from browser perspective: jQuery qTip2 Jsp form which ToolTip via ajax AJAX Tool tip using qTip2 jQuery plugin Qtip2 Demo With Ajax Call Student...
read moreAjax implementation in Servlet 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 Servlet application. ** UPDATE: Servlet Complete tutorial now available here. Folder Structure Jsp Page Ajax implementation in Servlet without...
read morejQuery Tutorial for Beginners
In this article we are going to take a look at introduction to jQuery, what it is, what is does and why we should use in our website. If you are looking to perform Ajax operations in your website with lot of cool effects on it and you are not completely familiar with java script, then jQuery is a very easy and flexible way to integrate thing like effects, Ajax, animation and so on. A Little Bit About jQuery jQuery is Open-Source JavaScript library that contains variety of functions and other functionality that...
read morePagination in Struts 2 using jQuery jTable plugin
This is the third article on jQuery jTable plugin in Struts 2 that describes on how to implement pagination feature to do server side paging in struts 2 using the JQuery jTable plugin and here I have not explained about how to setup jTable plugin in struts 2. So If you have not read my previous articles “Setting up JQuery jTable plugin in Struts 2” and “Ajax based curd operation in Struts 2 using JQuery jTables plugin”, I will recommend that you read that article first because first one explains how you...
read moreAJAX implementation in Struts 2 using JQuery and JSON
In this post, we will learn to implement AJAX calls from a JSP page to a Struts 2 Action class using JQuery and update the same JSP page back with the Json response from the Struts 2. Library required Since the response to be sent to jQuery is of type JSON, to handle it you need struts2-json-plugin-2.x.x.jar. This plugin allows you to serialize the Action class attribute which has getter and setter into a JSON object. Steps done to set up our action for JSON From the browser perspective:...
read more