Skip to main content

Posts

Showing posts from April, 2013

Maven project with Spring data JPA and Hibernate

Following example shows how to create simple system using Maven, Spring Data JPA with Hibernate.   01. Create Project structure as above. (I have used IntelliJ Idea 12 as IDE) 02. Create application-context.xml for spring configurations as follows <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xmlns:jdbc="http://www.springframework.org/schema/jdbc"        xmlns:jpa="http://www.springframework.org/schema/data/jpa"        xmlns:context="http://www.springframework.org/schema/context"        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring...

Struts 2 with Ajax call example

Step 01. Create struts2 project struts.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC         "-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"         "http://struts.apache.org/dtds/struts-2.1.7.dtd"> <struts>     <package name="default" namespace="/" extends="struts-default">         <action name="resourceBundleRequest" class="struts.ajax.AjaxCallAction"                 method="responseForAjaxCall">             <result name="success">index.jsp</result>         </action>     </package> </struts> index.jsp <%@ page language="java" contentType="text/html;charset=UTF-8" %> <%...