Pages Navigation Menu

Coding is much easier than you think

RECENT POSTS

Dynamic Dependent Select Box in JSP & Servlet using JQuery and JSON via Ajax

Posted by in Ajax, J2EE, jQuery, Servlet

    In my previous post, I explained about making AJAX calls from JSP page to servlet and updating a part of the JSP page with the response of simple java object from the Servlet. In this post we shall make the servlet to return complex Java Objects such as lists, maps, etc with the help of JSON and JQuery.   Library required   Google’s gson   Steps done to set up our Servlet for JSON   From the browser perspective: jQuery jQuery allows you to issue an ajax request via get or post method and expects a JSON...

read more

AJAX implementation in Struts 2 using JQuery and JSON

Posted by in Ajax, jQuery, Struts-2 | 12 comments

    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, So 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

AJAX implementation in Java web application using JQuery

Posted by in J2EE, Java, jQuery

    In this post, we will learn to implement AJAX calls from a JSP page to a Servlet and display the servlets response back in the JSP using Jquery without page refresh. Please make a Google search about Ajax to if you are not aware of the same. Now to start with demonstration of above topic, let us create a Dynamic Web Project in Eclipse, with following project structure.     As show 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...

read more

Setting up jQuery jTable plugin in Servlets and JSP

Posted by in J2EE, Java, jQuery, jTable

  In this article we will learn to setup jTable and dependent libraries in a Java web application(using Servlets and JSP’s)     As per the definition in jTable.org, jTable is a jQuery plugin which is used to create AJAX based CRUD tables without coding HTML or Javascript. jTable takes a div id and automatically generates the html table inside the div and it uses jQuery UI dialog that pops up when the user clicks on add, edit or update record buttons and it has several pre-defined color themes . In this example I...

read more

Struts 2 and Tiles Framework Integration

Posted by in Struts-2 | 2 comments

Struts 2 and Tiles Framework Integration

  Apache Tiles is a templating framework used to simplify the development of web application user interfaces. Tiles allow defining page fragments which can be combined into a complete page at runtime. These fragments, or tiles, can be used as reusable templates in order to reduce the duplication of common page elements or even embedded within other tiles. See the snapshot below.   ** UPDATE: Struts 2 Complete tutorial now available here.   Advantage of tiles framework Code reusability Easy to modify Easy to remove Jar...

read more

Struts2-Jfreechart integration

Posted by in JFreeChart, Struts-2 | 1 comment

Struts2-Jfreechart integration

  In this article we will learn to integrate Struts 2 with JFreeChart using struts2-jfreechart-plugin-x.x.x.jar for creating a pie chart in web application using JFreeChart library.   The JFreeChart is easiest and the most widely used library for creating a wide variety of good looking charts. The Struts-JFreeChart plugin allows Struts 2 Actions to easily return generated charts and graphs. Instead of streaming a generated chart directly to the HTTP response, this plugin provides a ChartResult, which handles the generation for you....

read more

Create Auto-Refreshing Pie Chart/Bar Chart in Servlet dynamically using JFreeChart

Posted by in J2EE, Java, JFreeChart

Create Auto-Refreshing Pie Chart/Bar Chart in Servlet dynamically using JFreeChart

  In this article we will learn about the step by step process of creating a pie chart in Servlet with values retrieved from database and displaying it in an auto-refreshing JSP page using JFreeChart library.   The JFreeChart is easiest and the most widely used library for creating a wide variety of good looking charts. In this post, we’ll learn to create pie chart using JFreeChart that can be returned as an image from a servlet. Here, I am going to retrieve data from database, create pie charts in a Servlet and display it...

read more

Introduction to Hibernate

Posted by in Hibernate

Introduction to Hibernate

  In this to we will learn about what hibernate is, and how to use hibernate in our application and its features.   What is hibernate ? It called as ORM tool (we will learn in subsequent tut) Used in the data layer to save date into the database Implements JPA (JPA is a set of standards which is prescribed for doing any operation in database.   1. Problem which Hibernate solves   Mapping member variables to column Let take a Student class as an example, which has the following fields ID, Name, Department, Phone no,...

read more

Setting up jQuery jTable plugin in Struts 2 framework

Posted by in jQuery, jTable, Struts 2 Tutorial, Struts-2 | 18 comments

Setting up jQuery jTable plugin in Struts 2 framework

  In this article we will learn to setup jTable and dependent libraries in Struts 2 web application. jTable is a jQuery plugin which is used to create AJAX based CRUD tables without coding HTML or Javascript, to know more about jTable please refer the article here   Steps done to set up our application for jTable   Libraries required for the setup, jQuery jQuery UI jTable struts2-json-plugin-2.x.x.jar Commonly required Struts 2 jars   Now to start with demonstration of above topic, let us Create a Dynamic Web Project in...

read more

Java Heap Dump Analysis using Eclipse Memory Analyzer (MAT)

Posted by in Core Java, Eclipse, Java, JVM, Software

Java Heap Dump Analysis using Eclipse Memory Analyzer (MAT)

  In this article we will learn what a Java heap dump is and how to analyze a heap dumps generated through OutOfMemoryError using Memory Analyzer in Eclipse.   What is a heap dump?   A heap dump is a snapshot of memory at a given point in time. It contains information on the Java objects and classes in memory at the time the snapshot was taken.   Why would we want to read heap dump?   If your Java application crashes with an OutOfMemoryError it is possible to automatically get a heap dump to analyze. This view into the...

read more
SimpleCodeStuffs located at , India, Chennai . Reviewed by rated: 8.8 / 10