Database connection example in PHP and MySQL

Introduction This tutorial shows database connection example in PHP and MySQL. Here we will create a PHP file with commonly used functions on how to connect to MySQL database using PHP. It is mandatory to establish database connection when you are working on a dynamic application. The database may be any one of your choice or according to the requirement of your application. Here I am going to use MySQL database to serve the purpose. I have used here mysqli_* function to show a database connection example in PHP and…

Continue

Integrate Spring 3, Struts 2 and Hibernate 3

Introduction This tutorial shows how to integrate Spring 3, Struts 2 and Hibernate 3 in the following example. In this example, Struts 2 will be used as a web framework and Spring 3 will be used as a core service. We will use ORM (Object Relational Mapping) framework Hibernate for our persistent layer to interact with database. We are going to use MySQL database for our example, you may use any database of your choice. You may also like to read: Struts 2, Spring 4, Hibernate 4 and Maven Integration

Continue

Nested Comments System in PHP, MySQL and AJAX

Introduction This tutorial shows how to create nested comment system in PHP MySQL and AJAX. This nested comment system is also called hierarchical comment system. Here I will use MySQL database and jQuery library. This threaded or nested comment system in PHP AJAX accepts reply up to maximum of five level depth. If you want to accept unlimited level or customize level of depth then you can modify the source code according to your needs. You may also read Nested Comments using Codeigniter, AJAX

Continue

Spring, JSP and Servlet integration example

Introduction In this tutorial we will create web application for Spring, JSP and Servlet integration example. In this spring, jsp and servlet integration example we will use spring version 3, jsp version 2 and servlet version 3. Though there are several MVC frameworks like JSF, Struts, Spring MVC etc. but still if you need to use Servlet without any MVC framework, here it is. Most of us know how to work with Servlet and JSP. So if you have any knowledge of Spring then it will be easier for you…

Continue

Global Exception configuration using web.xml, servlet and jsp

This tutorial shows how we can configure exception/error handling globally using deployment descriptor, servlet and jsp. The aim of this tutorial is to teach whenever an exception or error occurrs in an web based application then that exception or error will be thrown in an appropriate manner and show the error page with the exception or error information in jsp page.

Continue