Sanitize JSON using Java

Introduction Here I am going to tell you how to sanitize JSON (JavaScript Object Notation) string using Java program. Given JSON-like content, convert it to valid JSON. The OWASP JSON Sanitizer Project is a simple to use Java library that can be attached at either end of a data-pipeline to help satisfy Postel’s principle: be conservative in what you do,…

jQuery ajaxSuccess

This AjaxEvent ajaxSuccess registers a handler to be executed whenever an Ajax request completes successfully. Whenever an Ajax request completes successfully, jQuery triggers the ajaxSuccess event. Any and all handlers that have been registered with the .ajaxSuccess() method are executed at this time. To observe this method in action, do the following

jQuery ajaxStart

This AJAXEvent ajaxStart registers a handler to be executed when the first Ajax request begins. Whenever an Ajax request is about to be sent, jQuery checks whether there are any other outstanding Ajax requests. If none are in progress, jQuery triggers the ajaxStart event. Any and all handlers that have been registered with the .ajaxStart() method are executed at this…

jQuery ajaxSend

This AJAXEvent ajaxSend registers a handler to be executed before an Ajax request is sent. Whenever an Ajax request is about to be sent, jQuery triggers the ajaxSend event. Any and all handlers that have been registered with the .ajaxSend() method are executed at this time. To observe this method in action, do the following

jQuery ajaxError

This AJAXEvent ajaxError registers a handler to be called when Ajax requests complete with an error. Whenever an Ajax request completes with an error, jQuery triggers the ajaxError event. Any and all handlers that have been registered with the .ajaxError() method are executed at this time. To observe this method in action, do the following

jQuery ajaxComplete

This AJAXEvent ajaxComplete registers a handler to be called when Ajax requests complete. Whenever an Ajax request completes, jQuery triggers the ajaxComplete event. Any and all handlers that have been registered with the .ajaxComplete() method are executed at this time. To observe this method in action, do the following

Creating JAX-WS Webservice using Maven

JAX WS Web Service This tutorial will show you how you can publish and consume SOAP (Simple Object Access Protocol) based JAX-WS webservice using maven wsgen and wsimport plugin. For this tutorial I will create two maven projects – first will be an web project for the service part and second one will be a standalone project for the client…

Extract Numeric Values from a String in Java

This tutorial will show you how we can extract the first non-breakable numeric values from a string using Java as well as all numeric values from the string. I am going to use regular expression for extracting the numeric values from string. I am going to use d and w for representing digits and characters in the string. This example…

LRU Cache Implementation In Java

Introduction A cache is an amount of faster memory used to improve data access by storing portions of a data set the whole of which is slower to access. Sometimes the total data set are not actually stored at all; instead, each data item is calculated as necessary, in which case the cache stores results from the calculations. If your…

DataTable Using Codeigniter MySQL and AJAX

DataTable I will show you how you can use DataTable API 1.10/1.12 to display tabular data in Codeigniter framework. Grid view in an Web page is a very important now-a-days. Functions like sorting, searching, pagination is not an easy job in HTML tables. One of many grid view frameworks, an open source, light weight, highly flexible and customizable DataTable API…