<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2344395409291630488</id><updated>2024-11-01T03:38:57.297-07:00</updated><title type='text'>Nirav Raval&#39;s Blog For J2EE Developer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://niravj2eedeveloper.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://niravj2eedeveloper.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04563631080311888035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2344395409291630488.post-3750068358328758239</id><published>2015-07-12T11:04:00.000-07:00</published><updated>2015-07-12T11:05:54.532-07:00</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;u&gt;Configure Apache 2.4 Web Server with Tomcat 8.0 as a Balancer to run the Java Web Application&lt;/u&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Hello Friends,&lt;/span&gt;&lt;u&gt; &lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Today I am gonna show you the Apache Web Server version 2.4 to act as mediator to handle the application load by dividing it into more than one Application Servers.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Here I am using Tomcat 8 as an Application Server to run a Java Based Web application.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;I have configure this in Windows 8 64 bit Operating System.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;I assume that you have done the tomcat server configuration to set context outside webapps folder of it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;For that write your context name and path in server.xml file of tomcat server as below.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;This must be written under &amp;lt;Host&amp;gt; tag.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;lt;Context&amp;nbsp; docBase=&quot;G:\Deploy\SampleWeb&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; path=&quot;/&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;SampleWeb&lt;/span&gt;&lt;/span&gt;&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; reloadable=&quot;true&quot; /&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;To do this, follow below steps. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Download Apache 2.x from apache site.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Download Apache Tomcat 8 also.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Install Apache web server on your system.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Make two copy of tomcat and&amp;nbsp; set context of web application as shown above.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Both tomcat must set on different port.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;I have set one Tomcat on 8080 and second on 8081 in &amp;lt;Connector&amp;gt; port in&amp;nbsp; Server.xml file.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Now open httpd file of Apache web server from conf folder and add below configuration in it.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;ServerName www.nirav.com:80&lt;br /&gt;&lt;br /&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerName www.nirav.com&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerAlias nirav.com &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;lt;Proxy balancer://mycluster&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;BalancerMember http://localhost:8080/ route=tomcat1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;BalancerMember http://localhost:8081/ route=tomcat2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;ProxySet lbmethod=byrequests&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Proxy&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProxyPass / balancer://mycluster/&lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;_____________________________________________________________&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;In above configuration, I have used byrequest method for load balancing.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;This means the load of requests is balanced based on each request i.e. First request served by tomcat 1, then second will be served by tomcat 2, then third will be served by tomcat 1 and so on.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;To activate this you need to un-comment below module in httpd file:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;Some others modules also need to be un-comment as shown below.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_module modules/mod_proxy.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_ajp_module modules/mod_proxy_ajp.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_balancer_module modules/mod_proxy_balancer.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_connect_module modules/mod_proxy_connect.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_express_module modules/mod_proxy_express.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_ftp_module modules/mod_proxy_ftp.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_html_module modules/mod_proxy_html.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_http_module modules/mod_proxy_http.so&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;LoadModule proxy_scgi_module modules/mod_proxy_scgi.so&amp;nbsp;&amp;nbsp;&lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;After adding above configuration in httpd file of Apache server, just restart apache server. Then start both tomcats.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;If any error shown on restart Apache server then read its log file and act accordingly.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;The error comes if the configuration is not properly done. Or any required module directive is not added.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;I have given almost all modules to make un-comment.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;I have set domain name as &lt;b&gt;www.nirav.com&lt;/b&gt; in my host file (C:\Windows\System32\Drivers\etc\host)&amp;nbsp;&amp;nbsp; to make run in local machine. You can use what you want.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Now this done. You can run your application with activated load balancer by Apache web server.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Just need to write &lt;a href=&quot;http://www.nirav.com/&quot;&gt;&lt;u&gt;&lt;b&gt;www.nirav.com/&lt;/b&gt;&lt;/u&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;u&gt;&lt;b&gt;SampleWeb&lt;/b&gt;&lt;/u&gt; in web browser and the request will be handled by two tomcats one by one on each request.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;I hope this will helpful to understand the basic configuration for enable balancer in Apache web server.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Here, I have not covered any theory part, you can google it separately. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: orange;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Thank you..!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://niravj2eedeveloper.blogspot.com/feeds/3750068358328758239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2015/07/configure-apache-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/3750068358328758239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/3750068358328758239'/><link rel='alternate' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2015/07/configure-apache-2.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04563631080311888035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344395409291630488.post-6180766313371674965</id><published>2014-12-24T10:13:00.000-08:00</published><updated>2015-07-12T10:23:15.302-07:00</updated><title type='text'>JQury Grouping Table Data</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9cTO7pEWvqoBrPQTy_zwp6tdxsN5XEr8XlzEZA347CtSJWqOYKkCtgWZDbiLLXaTJX_YdtYfupJWntHxGqrJ0vSG-uz8zy9XHjlB5PFtbETcZMcAjNUxb4evPwrQts_x2H36EtlqoKRkB/s1600/Without+grouping.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
Hello Friends,&lt;br /&gt;
Today, lets make some fun with jQuery demo of grouping HTML table data.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Problem:&lt;/b&gt;&lt;br /&gt;
I have one table with many columns but one column having same data.&lt;br /&gt;
And other columns with data related one single column.&lt;br /&gt;
&lt;b&gt;For e.g.&lt;/b&gt;&lt;br /&gt;
List of States. In which list of Cities or Locations.&lt;br /&gt;
I need to group all data State wise.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Below is our Table. We need to Group this table data based on State column.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9cTO7pEWvqoBrPQTy_zwp6tdxsN5XEr8XlzEZA347CtSJWqOYKkCtgWZDbiLLXaTJX_YdtYfupJWntHxGqrJ0vSG-uz8zy9XHjlB5PFtbETcZMcAjNUxb4evPwrQts_x2H36EtlqoKRkB/s1600/Without+grouping.bmp&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9cTO7pEWvqoBrPQTy_zwp6tdxsN5XEr8XlzEZA347CtSJWqOYKkCtgWZDbiLLXaTJX_YdtYfupJWntHxGqrJ0vSG-uz8zy9XHjlB5PFtbETcZMcAjNUxb4evPwrQts_x2H36EtlqoKRkB/s320/Without+grouping.bmp&quot; width=&quot;279&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Now, We will use jQuery for group above data based on State Column. And below will be the output.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXHC9oGP5MV38bIdsFMVQBkbPqypzOdTTM5WEyanZgaLijXY5thU9AXYVqraNRZSLIUsKncijlPrBGHNTvsAqxDdGoxLskUMXW2U3Dys60n7FPptp-b05A7v_wGfx4-paA-VwYoPtBx92u/s1600/Grouped+Table+Data.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXHC9oGP5MV38bIdsFMVQBkbPqypzOdTTM5WEyanZgaLijXY5thU9AXYVqraNRZSLIUsKncijlPrBGHNTvsAqxDdGoxLskUMXW2U3Dys60n7FPptp-b05A7v_wGfx4-paA-VwYoPtBx92u/s320/Grouped+Table+Data.bmp&quot; width=&quot;279&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;HTML Table Code before Group&lt;/b&gt;&lt;/u&gt;:&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;JQury Grouping Table Data&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;table id=&quot;myTable&quot; border=&quot;1&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Sr No&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;State&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Location&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th&amp;gt;Famous Area&amp;lt;/th&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Gujarat&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Ahmedabad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;AAA&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Gujarat&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Baroda&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;BBB&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Gujarat&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Surat&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;CCC&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Gujarat&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Rajkot&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;DDD&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Maharastra&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Mumbai&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;EEE&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Maharastra&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Nagpur&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;FFF&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Maharastra&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Khandala&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;GGG&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Madhya Pradesh&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Bhopal&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;HHH&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;9&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Madhya Pradesh&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Rajgarh&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;III&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;10&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Madhya Pradesh&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Sehore&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;JJJ&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Madhya Pradesh&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Bhind&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;KKK&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;12&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Madhya Pradesh&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Big&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;120&amp;lt;/td&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Now we will write one jQuery function and apply for above table to group it based on State name.&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $(document).ready(function() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(function() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; function groupTable($rows, startIndex, total) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (total === 0) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var i, currentIndex = startIndex, count = 1, lst = [];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var tds = $rows.find(&#39;td:eq(&#39; + currentIndex + &#39;)&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var ctrl = $(tds[0]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lst.push($rows[0]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for (i = 1; i &amp;lt;= tds.length; i++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (ctrl.text() == $(tds[i]).text()) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; count++;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(tds[i]).addClass(&#39;deleted&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lst.push($rows[i]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (count &amp;gt; 1) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ctrl.attr(&#39;rowspan&#39;, count);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; groupTable($(lst), startIndex + 1, total - 1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; count = 1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lst = [];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ctrl = $(tds[i]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; lst.push($rows[i]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; groupTable($(&#39;#myTable tr:has(td)&#39;), 1, 1);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(&#39;#myTable .deleted&#39;).remove();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Note:&lt;/u&gt; I have used below jQuery-2.1.3.min.js file.&lt;/b&gt;&lt;br /&gt;
&amp;lt;script src=&quot;http://code.jquery.com/jquery-2.1.3.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
______________________________________________________________________&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Hope you find this helpful....!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://niravj2eedeveloper.blogspot.com/feeds/6180766313371674965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2014/12/jqury-grouping-table-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/6180766313371674965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/6180766313371674965'/><link rel='alternate' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2014/12/jqury-grouping-table-data.html' title='JQury Grouping Table Data'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04563631080311888035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9cTO7pEWvqoBrPQTy_zwp6tdxsN5XEr8XlzEZA347CtSJWqOYKkCtgWZDbiLLXaTJX_YdtYfupJWntHxGqrJ0vSG-uz8zy9XHjlB5PFtbETcZMcAjNUxb4evPwrQts_x2H36EtlqoKRkB/s72-c/Without+grouping.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344395409291630488.post-1730425391995277272</id><published>2013-08-01T10:49:00.001-07:00</published><updated>2013-08-01T10:51:41.305-07:00</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;background-color: #fefdfa; color: #d52a33; font-family: Georgia, Utopia, &#39;Palatino Linotype&#39;, Palatino, serif; font-size: 22px; font-weight: normal; margin: 0px; position: relative; text-align: center;&quot;&gt;
Spring MVC - Hibernate Demo Application&lt;/h3&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Hello Friends,&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Nice to see you again.&lt;br /&gt;
In Previous Sessions &amp;nbsp;we have seen &amp;nbsp;Spring MVC with Annotation Demo. And learn how they work.&lt;br /&gt;
Today, we will see the example of &amp;nbsp;&lt;b&gt;Spring MVC with Hibernate basic tutorial&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This demo I have created using Netbeans IDE 7.1.2.&lt;/b&gt;&lt;br /&gt;
Netbeans provide Spring Project with Hibernate, So no need to find out every Jars as it provides by Netbeans itself.&lt;br /&gt;
&lt;br /&gt;
Ok Here we will create one&amp;nbsp;&lt;b&gt;Student Register Application demo which we previosuly develope without database&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Now we will extend that with adding Hibernate support to persist our data in MySQL Server.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Below is our final output.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8vK_s-4SAukgUHA5cGpdLuQF3rD3yzmF7n4dyueK_FfKtmIhoVGVPXATtLCidb3DSW1YellqV1zgUvFTz5WOf-8yZEkNAjEBlpHNdYXi8PUK56or2flnUxLeMJ3DOehnVMBUSmcLsV8qY/s1600/Spring-Hibernate+Demo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;305&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8vK_s-4SAukgUHA5cGpdLuQF3rD3yzmF7n4dyueK_FfKtmIhoVGVPXATtLCidb3DSW1YellqV1zgUvFTz5WOf-8yZEkNAjEBlpHNdYXi8PUK56or2flnUxLeMJ3DOehnVMBUSmcLsV8qY/s400/Spring-Hibernate+Demo.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Student Registration Demo&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;For create this application, I have create one Database Table &quot;Student&quot; in MySQL Server as below.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
CREATE&amp;nbsp;TABLE&amp;nbsp;`student`&amp;nbsp;(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`id`&amp;nbsp;int(11)&amp;nbsp;NOT&amp;nbsp;NULL&amp;nbsp;AUTO_INCREMENT,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`firstname`&amp;nbsp;varchar(30)&amp;nbsp;DEFAULT&amp;nbsp;NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`lastname`&amp;nbsp;varchar(30)&amp;nbsp;DEFAULT&amp;nbsp;NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`telephone`&amp;nbsp;varchar(15)&amp;nbsp;DEFAULT&amp;nbsp;NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`email`&amp;nbsp;varchar(30)&amp;nbsp;DEFAULT&amp;nbsp;NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;`created`&amp;nbsp;timestamp&amp;nbsp;NOT&amp;nbsp;NULL&amp;nbsp;DEFAULT&amp;nbsp;CURRENT_TIMESTAMP&amp;nbsp;ON&amp;nbsp;UPDATE&amp;nbsp;CURRENT_TIMESTAMP,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;PRIMARY&amp;nbsp;KEY&amp;nbsp;(`id`)&lt;br /&gt;
)&amp;nbsp;ENGINE=InnoDB&amp;nbsp;AUTO_INCREMENT=4&amp;nbsp;DEFAULT&amp;nbsp;CHARSET=latin1&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Project Structure&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlCRBBKN3qAukZyyy5QSHlcH6kePLKiJ9TcGUus4JBuozRaQticdLZ0ve3J2QLmO7SN2TzFyiw1buiWad_cld-UeOY4fJauWLTan1VhlwZ0zo0lObbGjWI_9KQhL7eCd4fkT7BHgNfsDtI/s1600/Project+Structure.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlCRBBKN3qAukZyyy5QSHlcH6kePLKiJ9TcGUus4JBuozRaQticdLZ0ve3J2QLmO7SN2TzFyiw1buiWad_cld-UeOY4fJauWLTan1VhlwZ0zo0lObbGjWI_9KQhL7eCd4fkT7BHgNfsDtI/s1600/Project+Structure.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Source Code:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;(1) Web.xml&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;web-app xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns:web=&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;id=&quot;WebApp_ID&quot; version=&quot;2.5&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;display-name&amp;gt;Spring3-Hibernate&amp;lt;/display-name&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;welcome-file-list&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;welcome-file&amp;gt;index.html&amp;lt;/welcome-file&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/welcome-file-list&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;servlet&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;servlet-name&amp;gt;spring&amp;lt;/servlet-name&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;servlet-class&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;org.springframework.web.servlet.DispatcherServlet&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/servlet-class&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/servlet&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;servlet-mapping&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;servlet-name&amp;gt;spring&amp;lt;/servlet-name&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;url-pattern&amp;gt;/&amp;lt;/url-pattern&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;/web-app&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;(2) spring-servlet.xml&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;?xml &amp;nbsp;version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns:aop=&quot;http://www.springframework.org/schema/aop&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns:context=&quot;http://www.springframework.org/schema/context&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns:jee=&quot;http://www.springframework.org/schema/jee&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns:lang=&quot;http://www.springframework.org/schema/lang&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns:p=&quot;http://www.springframework.org/schema/p&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns:tx=&quot;http://www.springframework.org/schema/tx&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xmlns:util=&quot;http://www.springframework.org/schema/util&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;context:annotation-config /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;context:component-scan base-package=&quot;com.j2eedeveloper&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;bean id=&quot;jspViewResolver&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;class=&quot;org.springframework.web.servlet.view.InternalResourceViewResolver&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;viewClass&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;value=&quot;org.springframework.web.servlet.view.JstlView&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;prefix&quot; value=&quot;/WEB-INF/jsp/&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;suffix&quot; value=&quot;.jsp&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/bean&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;bean id=&quot;messageSource&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;class=&quot;org.springframework.context.support.ReloadableResourceBundleMessageSource&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;basename&quot; value=&quot;classpath:messages&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;defaultEncoding&quot; value=&quot;UTF-8&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/bean&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;bean id=&quot;propertyConfigurer&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;class=&quot;org.springframework.beans.factory.config.PropertyPlaceholderConfigurer&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p:location=&quot;/WEB-INF/jdbc.properties&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;bean id=&quot;dataSource&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p:driverClassName=&quot;${jdbc.driverClassName}&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p:url=&quot;${jdbc.databaseurl}&quot; p:username=&quot;${jdbc.username}&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;p:password=&quot;root&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;bean id=&quot;sessionFactory&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;class=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;configLocation&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;value&amp;gt;classpath:hibernate.cfg.xml&amp;lt;/value&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/property&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;configurationClass&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;value&amp;gt;org.hibernate.cfg.AnnotationConfiguration&amp;lt;/value&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/property&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;hibernateProperties&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;props&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&amp;lt;prop key=&quot;hibernate.dialect&quot;&amp;gt;${jdbc.dialect}&amp;lt;/prop&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&amp;lt;prop key=&quot;hibernate.show_sql&quot;&amp;gt;true&amp;lt;/prop&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;/props&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/property&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/bean&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;tx:annotation-driven /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;bean id=&quot;transactionManager&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;class=&quot;org.springframework.orm.hibernate3.HibernateTransactionManager&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;property name=&quot;sessionFactory&quot; ref=&quot;sessionFactory&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/bean&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;/beans&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(3)&amp;nbsp;jdbc.properties&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
jdbc.driverClassName= com.mysql.jdbc.Driver&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
jdbc.dialect=org.hibernate.dialect.MySQLDialect&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
jdbc.databaseurl=jdbc:mysql://localhost:3306/test&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
jdbc.username=root&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
jdbc.password=root&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(4)&amp;nbsp;hibernate.cfg.xml&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;!DOCTYPE hibernate-configuration PUBLIC&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &quot;-//Hibernate/Hibernate Configuration DTD//EN&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &quot;http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;lt;hibernate-configuration&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;session-factory&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;mapping class=&quot;com.j2eedevloper.model.Student&quot; /&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/session-factory&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/hibernate-configuration&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(5)&amp;nbsp;messages_en.properties&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
label.firstname=First Name&lt;br /&gt;
label.lastname=Last Name&lt;br /&gt;
label.email=Email&lt;br /&gt;
label.telephone=Telephone&lt;br /&gt;
label.addStudent=Add Student&lt;br /&gt;
label.title=Student Manager&lt;br /&gt;
&lt;br /&gt;
label.footer=&amp;amp;copy; niravj2eedeveloper.blogspot.com&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(6)&amp;nbsp;StudentController.java&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
package com.j2eedeveloper.controller;&lt;br /&gt;
&lt;br /&gt;
import com.j2eedeveloper.service.StudentService;&lt;br /&gt;
import com.j2eedevloper.model.Student;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
import org.springframework.beans.factory.annotation.Autowired;&lt;br /&gt;
import org.springframework.stereotype.Controller;&lt;br /&gt;
import org.springframework.web.bind.annotation.ModelAttribute;&lt;br /&gt;
import org.springframework.web.bind.annotation.PathVariable;&lt;br /&gt;
import org.springframework.web.bind.annotation.RequestMapping;&lt;br /&gt;
import org.springframework.web.bind.annotation.RequestMethod;&lt;br /&gt;
&lt;br /&gt;
@Controller&lt;br /&gt;
public class StudentController {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Autowired&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private StudentService studentService;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @RequestMapping(&quot;/index&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public String listContacts(Map&amp;lt;String, Object&amp;gt; map) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.put(&quot;student&quot;, new Student());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.put(&quot;studentList&quot;, studentService.listStudent());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;student&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @RequestMapping(value = &quot;/add&quot;, method = RequestMethod.POST)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public String addContact(@ModelAttribute(&quot;student&quot;) Student student) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; studentService.addStudent(student);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;redirect:/index&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @RequestMapping(&quot;/delete/{studentId}&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public String deleteContact(@PathVariable(&quot;studentId&quot;) Integer studentId) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; studentService.removeStudent(studentId);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;redirect:/index&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(7)&amp;nbsp;StudentDAO.java&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
package com.j2eedeveloper.dao;&lt;br /&gt;
&lt;br /&gt;
import com.j2eedevloper.model.Student;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
&lt;br /&gt;
public interface StudentDAO {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void addStudent(Student student);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public List&amp;lt;Student&amp;gt; listStudent();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void removeStudent(Integer id);&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(8)&amp;nbsp;StudenttDAOImpl.java&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
package com.j2eedeveloper.dao;&lt;br /&gt;
&lt;br /&gt;
import com.j2eedevloper.model.Student;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
import org.hibernate.SessionFactory;&lt;br /&gt;
import org.springframework.beans.factory.annotation.Autowired;&lt;br /&gt;
import org.springframework.stereotype.Repository;&lt;br /&gt;
&lt;br /&gt;
@Repository&lt;br /&gt;
public class StudenttDAOImpl implements StudentDAO {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Autowired&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private SessionFactory sessionFactory;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void addStudent(Student student) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sessionFactory.getCurrentSession().save(student);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public List&amp;lt;Student&amp;gt; listStudent() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return sessionFactory.getCurrentSession().createQuery(&quot;from Student&quot;).list();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void removeStudent(Integer id) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Student student = (Student) sessionFactory.getCurrentSession().load(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Student.class, id);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (null != student) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sessionFactory.getCurrentSession().delete(student);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(9)&amp;nbsp;StudentService.java&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
package com.j2eedeveloper.service;&lt;br /&gt;
&lt;br /&gt;
import com.j2eedevloper.model.Student;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
&lt;br /&gt;
public interface StudentService {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void addStudent(Student student);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public List&amp;lt;Student&amp;gt; listStudent();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void removeStudent(Integer id);&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(10)&amp;nbsp;StudentServiceImpl.java&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
package com.j2eedeveloper.service;&lt;br /&gt;
&lt;br /&gt;
import com.j2eedeveloper.dao.StudentDAO;&lt;br /&gt;
import com.j2eedevloper.model.Student;&lt;br /&gt;
import java.util.List;&lt;br /&gt;
import org.springframework.beans.factory.annotation.Autowired;&lt;br /&gt;
import org.springframework.stereotype.Service;&lt;br /&gt;
import org.springframework.transaction.annotation.Transactional;&lt;br /&gt;
&lt;br /&gt;
@Service&lt;br /&gt;
public class StudentServiceImpl implements StudentService {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Autowired&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private StudentDAO studentDAO;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Transactional&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void addStudent(Student student) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; studentDAO.addStudent(student);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Transactional&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public List&amp;lt;Student&amp;gt; listStudent() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return studentDAO.listStudent();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @Transactional&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public void removeStudent(Integer id) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; studentDAO.removeStudent(id);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(11)&amp;nbsp;Student.java&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
package com.j2eedevloper.model;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
import javax.persistence.*;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
@Entity&lt;/div&gt;
&lt;div&gt;
@Table(name = &quot;Student&quot;)&lt;/div&gt;
&lt;div&gt;
public class Student {&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Id&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Column(name = &quot;ID&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @GeneratedValue&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private Integer id;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Column(name = &quot;FIRSTNAME&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private String firstname;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Column(name = &quot;LASTNAME&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private String lastname;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Column(name = &quot;EMAIL&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private String email;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; @Column(name = &quot;TELEPHONE&quot;)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; private String telephone;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public String getEmail() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return email;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public String getTelephone() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return telephone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public void setEmail(String email) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.email = email;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public void setTelephone(String telephone) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.telephone = telephone;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public String getFirstname() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return firstname;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public String getLastname() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return lastname;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public void setFirstname(String firstname) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.firstname = firstname;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public void setLastname(String lastname) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.lastname = lastname;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public Integer getId() {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return id;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; public void setId(Integer id) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.id = id;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(12) student.jsp&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&amp;lt;%@taglib uri=&quot;http://www.springframework.org/tags&quot; prefix=&quot;spring&quot;%&amp;gt;&lt;br /&gt;
&amp;lt;%@taglib uri=&quot;http://www.springframework.org/tags/form&quot; prefix=&quot;form&quot;%&amp;gt;&lt;br /&gt;
&amp;lt;%@taglib uri=&quot;http://java.sun.com/jsp/jstl/core&quot; prefix=&quot;c&quot;%&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;head&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;title&amp;gt;Spring 3 MVC Hibernate - Student Manager&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; body {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; font-family: sans-serif;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .data, .data td {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; border-collapse: collapse;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; width: 100%;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; border: 1px solid #aaa;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; margin: 2px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; padding: 2px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .data th {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; font-weight: bold;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; background-color: #5C82FF;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; color: white;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h2&amp;gt;&amp;lt;spring:message code=&quot;label.title&quot;/&amp;gt;&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;form:form method=&quot;post&quot; action=&quot;add.html&quot; commandName=&quot;student&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;table&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:label path=&quot;firstname&quot;&amp;gt;&amp;lt;spring:message code=&quot;label.firstname&quot;/&amp;gt;&amp;lt;/form:label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:input path=&quot;firstname&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:label path=&quot;lastname&quot;&amp;gt;&amp;lt;spring:message code=&quot;label.lastname&quot;/&amp;gt;&amp;lt;/form:label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:input path=&quot;lastname&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:label path=&quot;email&quot;&amp;gt;&amp;lt;spring:message code=&quot;label.email&quot;/&amp;gt;&amp;lt;/form:label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:input path=&quot;email&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:label path=&quot;telephone&quot;&amp;gt;&amp;lt;spring:message code=&quot;label.telephone&quot;/&amp;gt;&amp;lt;/form:label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:input path=&quot;telephone&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td colspan=&quot;2&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type=&quot;submit&quot; value=&quot;&amp;lt;spring:message code=&quot;label.addStudent&quot;/&amp;gt;&quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/table&amp;gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/form:form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h3&amp;gt;Students&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;c:if &amp;nbsp;test=&quot;${!empty studentList}&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;table class=&quot;data&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th style=&quot;width: 40%&quot;&amp;gt;Name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th style=&quot;width: 30%&quot;&amp;gt;Email&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th style=&quot;width: 20%&quot;&amp;gt;Telephone&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;c:forEach items=&quot;${studentList}&quot; var=&quot;student&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td style=&quot;width: 40%&quot;&amp;gt;${student.lastname} ${student.firstname} &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td style=&quot;width: 30%&quot;&amp;gt;${student.email}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td style=&quot;width: 20%&quot;&amp;gt;${student.telephone}&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;a href=&quot;delete/${student.id}&quot;&amp;gt;delete&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/c:forEach&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/c:if&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;hr/&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h3&amp;gt;&amp;lt;spring:message code=&quot;label.footer&quot;/&amp;gt;&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;hr/&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Now run URL&lt;b&gt;&amp;nbsp;http://localhost:8080/SpringHibernate/index&amp;nbsp;&lt;/b&gt;&amp;nbsp;in your browser.&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;b&gt;------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Hope you find this helpful....!&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://niravj2eedeveloper.blogspot.com/feeds/1730425391995277272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2013/08/hello-friends-nice-to-see-you-again.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/1730425391995277272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/1730425391995277272'/><link rel='alternate' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2013/08/hello-friends-nice-to-see-you-again.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04563631080311888035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8vK_s-4SAukgUHA5cGpdLuQF3rD3yzmF7n4dyueK_FfKtmIhoVGVPXATtLCidb3DSW1YellqV1zgUvFTz5WOf-8yZEkNAjEBlpHNdYXi8PUK56or2flnUxLeMJ3DOehnVMBUSmcLsV8qY/s72-c/Spring-Hibernate+Demo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344395409291630488.post-7344626072977078588</id><published>2013-07-19T10:14:00.000-07:00</published><updated>2013-07-19T10:14:00.822-07:00</updated><title type='text'>Spring MVC with Annotation</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Hello Friends,&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Nice to see you again.&lt;br /&gt;
In Previous Sessions &amp;nbsp;we have seen &amp;nbsp;Hibernate Basic Demo. And learn how they work.&lt;br /&gt;
Today, we will see the example of &amp;nbsp;Spring MVC with annotation basic tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This demo I have created using Netbeans IDE 7.1.2.&lt;/b&gt;&lt;br /&gt;
Netbeans provide Spring Project, So no need to find out every Jars as it provides by Netbeans itself.&lt;br /&gt;
&lt;br /&gt;
Ok Here we will create one &lt;b&gt;Student Register Application demo&lt;/b&gt;.&lt;br /&gt;
Where first page will have URL redirect for New Student Registration Page.&lt;br /&gt;
When Registration done then view registration page will call.&lt;br /&gt;
&lt;br /&gt;
Ok below is the screen dump showing my project structure.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgchFxl0Rs4vQox9uFGRZ4gAFUtgTwjJaCYmWi7vaxKWV7AD4a_RYKVTvi8qFg2BuP4HONPNTrsKiihkBbfNwCzQwObZh4kGodl1UpOfJlE7TkR5TmKQpIy9_lcnFz82xm7g2jesHyfBhze/s1600/Project+Structure.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgchFxl0Rs4vQox9uFGRZ4gAFUtgTwjJaCYmWi7vaxKWV7AD4a_RYKVTvi8qFg2BuP4HONPNTrsKiihkBbfNwCzQwObZh4kGodl1UpOfJlE7TkR5TmKQpIy9_lcnFz82xm7g2jesHyfBhze/s320/Project+Structure.bmp&quot; width=&quot;217&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;And below is the Libraries added by Netbeans for Spring Project. You choose which you want to use.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOGB3xC7duPh1PKfedsjYkjJOM1WGP7JJ4zMkZJ0NXSuvy8X8Uc0NUgIoeIMYBURaDwXgkdlOco8VRB5c4obcmWOT3A93JOC1afdy6YBtWT20ZDMRYsZPx_tBZbUZRDp34d5ksjnKIqcl2/s1600/Libraries.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOGB3xC7duPh1PKfedsjYkjJOM1WGP7JJ4zMkZJ0NXSuvy8X8Uc0NUgIoeIMYBURaDwXgkdlOco8VRB5c4obcmWOT3A93JOC1afdy6YBtWT20ZDMRYsZPx_tBZbUZRDp34d5ksjnKIqcl2/s320/Libraries.bmp&quot; width=&quot;308&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Output:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Run&amp;nbsp;&lt;/b&gt;http://localhost:8080/StudentSpringDemo/addStudent&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;1st Scrren:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDtXLF8lV4c00nW6O42_xHhFxBGjaneVOEypEeZN8x7d5NnqLD2rNMWiCNIYmBVXXQHhKjr_fByAcfxa6xVmJIYuOMw5QrEVWJ6_8UfrK6Z0n5v5CqxZYgjH48wiWsMGsnmM38kB6rCmop/s1600/welcome+page.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDtXLF8lV4c00nW6O42_xHhFxBGjaneVOEypEeZN8x7d5NnqLD2rNMWiCNIYmBVXXQHhKjr_fByAcfxa6xVmJIYuOMw5QrEVWJ6_8UfrK6Z0n5v5CqxZYgjH48wiWsMGsnmM38kB6rCmop/s320/welcome+page.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;2nd Screen:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEoHOPradfC5a_NBH8BOA92ynOGaYr8tz2kU4roy1HpHOu49Bead6FBaQg3Wf3sFM7rntwKCHfHO2KsP5CWXk4-FD3cYFVIDaO8KlKvdlPB6GvT3t2_twNuq43pVapL1Fe_24Hy-neMQE1/s1600/Input+Page.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;254&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEoHOPradfC5a_NBH8BOA92ynOGaYr8tz2kU4roy1HpHOu49Bead6FBaQg3Wf3sFM7rntwKCHfHO2KsP5CWXk4-FD3cYFVIDaO8KlKvdlPB6GvT3t2_twNuq43pVapL1Fe_24Hy-neMQE1/s320/Input+Page.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;3rd Screen:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjImsEx_E7mu2f3haGBbwB7ci1qSuRQVPTXhPWhBg4ZWQ3U5Dd4uiOwzCSP7Hhzhj_1mIwmt12HNwm15_XSETkj38RvB5bROgqYJzKxqMkEhDHdYYHvuZHkfieANz8S9I24eMvFQehRbd4u/s1600/Result+Page.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;211&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjImsEx_E7mu2f3haGBbwB7ci1qSuRQVPTXhPWhBg4ZWQ3U5Dd4uiOwzCSP7Hhzhj_1mIwmt12HNwm15_XSETkj38RvB5bROgqYJzKxqMkEhDHdYYHvuZHkfieANz8S9I24eMvFQehRbd4u/s320/Result+Page.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Source Code:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt; &lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;(1) Web.xml&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;web-app version=&quot;3.0&quot; xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;display-name&amp;gt;Spring MVC Form Handling With Nirav Raval&amp;lt;/display-name&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;servlet&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-name&amp;gt;J2eeDeveloper&amp;lt;/servlet-name&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-class&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; org.springframework.web.servlet.DispatcherServlet&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/servlet-class&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/servlet&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;servlet-mapping&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;servlet-name&amp;gt;J2eeDeveloper&amp;lt;/servlet-name&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;url-pattern&amp;gt;/&amp;lt;/url-pattern&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/servlet-mapping&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;/web-app&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;(2) J2eeDeveloper-servlet.xml&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xmlns:context=&quot;http://www.springframework.org/schema/context&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xsi:schemaLocation=&quot;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp;http://www.springframework.org/schema/beans &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp;http://www.springframework.org/schema/beans/spring-beans-3.0.xsd&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp;http://www.springframework.org/schema/context&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp;http://www.springframework.org/schema/context/spring-context-3.0.xsd&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;context:component-scan base-package=&quot;com.j2eedeveloper&quot; /&amp;gt; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;bean class=&quot;org.springframework.web.servlet.view.InternalResourceViewResolver&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;prefix&quot; value=&quot;/WEB-INF/jsp/&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;suffix&quot; value=&quot;.jsp&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/bean&amp;gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&amp;lt;/beans&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(3) StudentController.java&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
/*&lt;br /&gt;
&amp;nbsp;* To change this template, choose Tools | Templates&lt;br /&gt;
&amp;nbsp;* and open the template in the editor.&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
package com.j2eedeveloper;&lt;br /&gt;
&lt;br /&gt;
import org.springframework.stereotype.Controller;&lt;br /&gt;
import org.springframework.ui.ModelMap;&lt;br /&gt;
import org.springframework.web.bind.annotation.ModelAttribute;&lt;br /&gt;
import org.springframework.web.bind.annotation.RequestMapping;&lt;br /&gt;
import org.springframework.web.bind.annotation.RequestMethod;&lt;br /&gt;
import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @author Nirav&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
@Controller&lt;br /&gt;
public class StudentController {&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; @RequestMapping(value=&quot;/index&quot;, method= RequestMethod.GET)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public ModelAndView Startup(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return new ModelAndView(&quot;index&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; @RequestMapping(value=&quot;/student&quot;, method= RequestMethod.GET)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public ModelAndView Student(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return new ModelAndView(&quot;Student&quot;, &quot;command&quot;, new Student());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; @RequestMapping(value=&quot;/addStudent&quot;, method = RequestMethod.POST)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public String addStudent(@ModelAttribute(&quot;SpringWeb&quot;)Student student, ModelMap model){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model.addAttribute(&quot;id&quot;, student.getId());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model.addAttribute(&quot;rollno&quot;, student.getRollno());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model.addAttribute(&quot;age&quot;, student.getAge());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model.addAttribute(&quot;name&quot;, student.getName());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;result&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(4) index.jsp&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%-- &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document&amp;nbsp;&amp;nbsp; : index&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Created on : July 19, 2013, 9:38:17 PM&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Author&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Nirav&lt;br /&gt;--%&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@page contentType=&quot;text/html&quot; pageEncoding=&quot;UTF-8&quot;%&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;head&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Spring MVC DemoWith Nirav&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;body&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;h1&amp;gt;Spring MVC DemoWith Nirav&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a href=&quot;/StudentSpringDemo/student/&quot;&amp;gt;Add Student&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(5) Student.jsp&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&amp;lt;%-- &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document&amp;nbsp;&amp;nbsp; : Student&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Created on : Jun 10, 2013, 9:49:55 PM&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Author&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Nirav&lt;br /&gt;--%&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@taglib uri=&quot;http://www.springframework.org/tags/form&quot; prefix=&quot;form&quot;%&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Spring MVC Form Handling With Nirav Raval&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;h2&amp;gt;Student Information&amp;lt;/h2&amp;gt;&lt;br /&gt;&amp;lt;form:form method=&quot;POST&quot; action=&quot;/StudentSpringDemo/addStudent&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;table&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:label path=&quot;name&quot;&amp;gt;Name&amp;lt;/form:label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:input path=&quot;name&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:label path=&quot;age&quot;&amp;gt;Age&amp;lt;/form:label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:input path=&quot;age&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:label path=&quot;rollno&quot;&amp;gt;Roll No&amp;lt;/form:label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:input path=&quot;rollno&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:label path=&quot;id&quot;&amp;gt;id&amp;lt;/form:label&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;form:input path=&quot;id&quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td colspan=&quot;2&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;lt;/form:form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;(6) result.jsp&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;%-- &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document&amp;nbsp;&amp;nbsp; : result&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Created on : Jun 19, 2013, 9:51:52 PM&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Author&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Nirav&lt;br /&gt;--%&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@taglib uri=&quot;http://www.springframework.org/tags/form&quot; prefix=&quot;form&quot;%&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Spring MVC Form Handling With Nirav Raval&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;h2&amp;gt;Submitted Student Information&amp;lt;/h2&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;table&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;${name}&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Age&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;${age}&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Roll No&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;${rollno}&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;ID&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;${id}&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;b&gt;---------------------------------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Now run URL&lt;b&gt; &lt;/b&gt;&lt;b&gt;http://localhost:8080/StudentSpringDemo/addStudent&amp;nbsp;&lt;/b&gt; in your browser.&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Hope you find this helpful....! &lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://niravj2eedeveloper.blogspot.com/feeds/7344626072977078588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2013/07/spring-mvc-with-annotation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/7344626072977078588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/7344626072977078588'/><link rel='alternate' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2013/07/spring-mvc-with-annotation.html' title='Spring MVC with Annotation'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04563631080311888035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgchFxl0Rs4vQox9uFGRZ4gAFUtgTwjJaCYmWi7vaxKWV7AD4a_RYKVTvi8qFg2BuP4HONPNTrsKiihkBbfNwCzQwObZh4kGodl1UpOfJlE7TkR5TmKQpIy9_lcnFz82xm7g2jesHyfBhze/s72-c/Project+Structure.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344395409291630488.post-8711441626217072190</id><published>2012-07-10T00:01:00.000-07:00</published><updated>2012-07-10T00:01:08.312-07:00</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;Basic Hibernate Tutorial&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;b&gt;Hello Friends,&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Nice to see you again.&lt;br /&gt;
In Previous Sessions &amp;nbsp;we have seen &amp;nbsp;Java Spring Basic Demo. And learn how they work.&lt;br /&gt;
Today, we will see the example of &amp;nbsp;Hibernate basic tutorial in Java Swing..&lt;br /&gt;
&lt;br /&gt;
So be ready to learn this simple exmaple of Basic Hibernate Tutorail in Swing Based Application..&lt;br /&gt;
After apply this code in action, you will be capable of using Hibernate in your Swing Applications.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is Hibernate..?&lt;/b&gt;&lt;br /&gt;
Hibernate is a Java Based Powerful &amp;nbsp;tool to implement databse access and operation in Java based Project (either window based or web based).&lt;br /&gt;
It gives capacity to access any database with simple Java Object.&lt;br /&gt;
Hibernate uses basic Java Object concept and access columns of Database table as an Object.&lt;br /&gt;
&lt;br /&gt;
Hibernate works on &lt;b&gt;POJO (Plain Old Java Object)&lt;/b&gt; concept.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Required JAR files to enable Hibernate functionality as shown below:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Add these jar files in your eclipse project under lib folder.&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQMQJ0cUQNHWUlrgYmO9p_as4m9Yj1bxJnSWyChDYSNlbZaWztlM4J0rds9rso3rRUfPr0uqtcjAwb8ag9aeOYhRUw5KaaYG0dDF4WqIrXGoDYIKCiBsHf5ORt7P-WtDxEhIj1yPJ6oS43/s1600/hibernateJAR.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQMQJ0cUQNHWUlrgYmO9p_as4m9Yj1bxJnSWyChDYSNlbZaWztlM4J0rds9rso3rRUfPr0uqtcjAwb8ag9aeOYhRUw5KaaYG0dDF4WqIrXGoDYIKCiBsHf5ORt7P-WtDxEhIj1yPJ6oS43/s1600/hibernateJAR.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
To use hibernate in your project follow below steps.&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;1)&lt;/b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-weight: bold; white-space: pre;&quot;&gt; &lt;/span&gt;First create &lt;b&gt;hibernate.cfg.xml&lt;/b&gt; file. &amp;nbsp;As shown below.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;This is the hibernate configeration file which includes database connection details.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;For ex, databse driver registration, name of databse to be connect etc.&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
----------------------------------------------------------------------------------------------------------------------------------&lt;/div&gt;
&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;lt;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&amp;gt;
&amp;lt;!DOCTYPE hibernate-configuration PUBLIC
&quot;-//Hibernate/Hibernate Configuration DTD//EN&quot;
&quot;http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd&quot;&amp;gt;

&amp;lt;hibernate-configuration&amp;gt;
&amp;lt;session-factory&amp;gt;
      &amp;lt;property name=&quot;hibernate.connection.driver_class&quot;&amp;gt;com.mysql.jdbc.Driver&amp;lt;/property&amp;gt;
      &amp;lt;property name=&quot;hibernate.connection.url&quot;&amp;gt;jdbc:mysql://localhost/hibernatedatabase&amp;lt;/property&amp;gt;
      &amp;lt;property name=&quot;hibernate.connection.username&quot;&amp;gt;root&amp;lt;/property&amp;gt;
      &amp;lt;property name=&quot;hibernate.connection.password&quot;&amp;gt;root&amp;lt;/property&amp;gt;
      &amp;lt;property name=&quot;hibernate.connection.pool_size&quot;&amp;gt;10&amp;lt;/property&amp;gt;
      &amp;lt;property name=&quot;show_sql&quot;&amp;gt;true&amp;lt;/property&amp;gt;
      &amp;lt;property name=&quot;dialect&quot;&amp;gt;org.hibernate.dialect.MySQLDialect&amp;lt;/property&amp;gt;
      &amp;lt;property name=&quot;hibernate.hbm2ddl.auto&quot;&amp;gt;update&amp;lt;/property&amp;gt;
      &amp;lt;!-- Mapping files --&amp;gt;
      &amp;lt;mapping resource=&quot;contact.hbm.xml&quot;/&amp;gt;
&amp;lt;/session-factory&amp;gt;
&amp;lt;/hibernate-configuration&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;b&gt;----------------------------------------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;2)&lt;/b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-weight: bold; white-space: pre;&quot;&gt; &lt;/span&gt;Then create database mapping file for ex. xyz.hbm.xml file As shown below &amp;nbsp; &quot;contact.hbm.xml&quot;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;This file is used to map the database Table column to the Java Object.&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;This gives power to developer to work with database table as it is a Java Object.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;----------------------------------------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;
&amp;lt;!DOCTYPE hibernate-mapping PUBLIC 
    &quot;-//Hibernate/Hibernate Mapping DTD 3.0//EN&quot;
    &quot;http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd&quot;&amp;gt;
&amp;lt;hibernate-mapping&amp;gt;
  &amp;lt;class name=&quot;com.mapping.data.Contact&quot; table=&quot;CONTACT&quot;&amp;gt;
    &amp;lt;id name=&quot;id&quot; type=&quot;long&quot; column=&quot;ID&quot; &amp;gt;
    &amp;lt;generator class=&quot;assigned&quot;/&amp;gt;
   &amp;lt;/id&amp;gt;

   &amp;lt;property name=&quot;firstName&quot;&amp;gt;
   &amp;lt;column name=&quot;FIRSTNAME&quot; /&amp;gt;
   &amp;lt;/property&amp;gt;
   &amp;lt;property name=&quot;lastName&quot;&amp;gt;
  &amp;lt;column name=&quot;LASTNAME&quot;/&amp;gt;
   &amp;lt;/property&amp;gt;
   &amp;lt;property name=&quot;email&quot;&amp;gt;
  &amp;lt;column name=&quot;EMAIL&quot;/&amp;gt;
   &amp;lt;/property&amp;gt;
   &amp;lt;/class&amp;gt;

 &amp;lt;/hibernate-mapping&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;&lt;b&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;b&gt;----------------------------------------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;3)&lt;/b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-weight: bold; white-space: pre;&quot;&gt; &lt;/span&gt;Then create a getter - setter Java Class which will set and get values for insert in or&amp;nbsp;retrive from Database Table.&lt;/div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
Create &quot;Contact.java&quot; class as shown below.&lt;br /&gt;
&lt;b&gt;----------------------------------------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;color: #990000;&quot;&gt;package com.mapping.data;
/**
 * @author Nirav Raval
 *
 * http://www.niravjavadeveloper.blogspot.com
 * Java Class to map to the database Contact Table
 */

public class Contact {
 private String firstName;
 private String lastName;
 private String email;
 private long id;

 /**
  * @return Email
  */
 public String getEmail() {
  return email;
 }

 /**
  * @return First Name
  */
 public String getFirstName() {
  return firstName;
 }

 /** 
  * @return Last name
  */
 public String getLastName() {
  return lastName;
 }

 /**
  * @param string Sets the Email
  */
 public void setEmail(String string) {
  email = string;
  System.out.println(&quot;SetEmail = &quot;+email);
 }

 /**
  * @param string Sets the First Name
  */
 public void setFirstName(String string) {
  firstName = string;
 }

 /**
  * @param string sets the Last Name
  */
 public void setLastName(String string) {
  lastName = string;
 }

 /**
  * @return ID Returns ID
  */
 public long getId() {
  return id;
 }

 /**
  * @param l Sets the ID
  */
 public void setId(long l) {
  id = l;
 }

}&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;&lt;/pre&gt;
&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;---------------------------------------------------------------------------------&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
4)&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Finally create main Java class which will use the above files to access database tables.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;This main class have one hibenate &amp;nbsp;Session &amp;nbsp;which will use the hibernate config file to do the remaining works.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;text-align: left; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Create class &quot;&lt;b&gt;GUI.java&lt;/b&gt;&quot; as shown below.&lt;br /&gt;
------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;color: #990000;&quot;&gt;package com.gui.adddata;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;

import com.mapping.data.Contact;

/**
 * 
 * @author Nirav Raval
 * Main class use to insert data in MySQL Table Contact.
 *
 */
public class GUI extends JFrame{

 private static Dimension lbSize=new Dimension(100, 30);
 private static Dimension jtSize=new Dimension(150, 25);
 
 private static long tid = 0;
 private static String fname = null;
 private static String lname = null;
 private static String email = null;
 
 static Session session = null;
 private static Vector&amp;lt;Long&amp;gt; value=new Vector&amp;lt;Long&amp;gt;();
 
 public GUI()
 {
  setTitle(&quot;Enter Data&quot;);
  JPanel panel=new JPanel();
  panel.setLayout(new GridBagLayout());
  GridBagConstraints cn=new GridBagConstraints();
  cn.insets=new Insets(5,5,5,5);
  
  cn.gridx=0;
  cn.gridy=0;
  JLabel lbID=new JLabel(&quot;ID&quot;);
  lbID.setPreferredSize(lbSize);
  panel.add(lbID,cn);
  
  cn.gridx=1;
  cn.gridy=0;
  final JTextField jtID=new JTextField();
  jtID.setPreferredSize(jtSize);
  panel.add(jtID,cn);
  
  cn.gridx=0;
  cn.gridy=1;
  JLabel lbName=new JLabel(&quot;First Name&quot;);
  lbName.setPreferredSize(lbSize);
  panel.add(lbName,cn);
  
  cn.gridx=1;
  cn.gridy=1;
  final JTextField jtName=new JTextField();
  jtName.setPreferredSize(jtSize);
  panel.add(jtName,cn);
  
  cn.gridx=0;
  cn.gridy=2;
  JLabel lbLastName=new JLabel(&quot;Last Name&quot;);
  lbLastName.setPreferredSize(lbSize);
  panel.add(lbLastName,cn);
  
  cn.gridx=1;
  cn.gridy=2;
  final JTextField jtLastName=new JTextField();
  jtLastName.setPreferredSize(jtSize);
  panel.add(jtLastName,cn);
  
  cn.gridx=0;
  cn.gridy=3;
  JLabel lbEmail=new JLabel(&quot;Email&quot;);
  lbEmail.setPreferredSize(lbSize);
  panel.add(lbEmail,cn);
  
  cn.gridx=1;
  cn.gridy=3;
  final JTextField jtEmail=new JTextField();
  jtEmail.setPreferredSize(jtSize);
  panel.add(jtEmail,cn);
  
  cn.gridwidth=2;
  cn.gridx=0;
  cn.gridy=4;
  JButton jbInsert=new JButton(&quot;Insert&quot;);
  panel.add(jbInsert,cn);
  
  getContentPane().add(panel,BorderLayout.NORTH);
  
  
  pack();
  
  Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
  // Center horizontally.
  int X = (screen.width / 2) - (this.getWidth()/ 2); 
  // Center vertically.
  int Y = (screen.height / 2) - (this.getHeight() / 2); 
  
  //Set Frame in Center of the screen
  this.setBounds(X,Y , this.getWidth(),this.getHeight());
  
  setVisible(true);
  setResizable(false);
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
  // Button ActionEvent
  
  jbInsert.addActionListener(new ActionListener() {
   
   @Override
   public void actionPerformed(ActionEvent arg0) {
    // TODO Auto-generated method stub
    tid = Integer.valueOf(jtID.getText());
    fname = jtName.getText();
    lname = jtLastName.getText();
    email = jtEmail.getText();
    int flag=0;
    
    //this class is used to check the id field in Contact table
    //of MySQL database.
    GetId gid=new GetId();
    
    value=gid.fetchId();
    
    for(int i=0;i&amp;lt;value.size();i++)
    {
     if(value.elementAt(i)==tid)
     {
      JOptionPane.showMessageDialog(null, 
        &quot;Id Already Exist&quot;,&quot;Error&quot;,
        JOptionPane.ERROR_MESSAGE);
      flag=1;
     }
    }
    
    if(flag==0)
    {
     setData();
    }
    jtID.setText(null);
    jtName.setText(null);
    jtLastName.setText(null);
    jtEmail.setText(null);
    jtID.grabFocus();
   }
  });
 
  
 }
 
 /**
  * This method is used to insert data in MySQL Table
  * with the help of Hibernate Session.
  */
 private static void setData()
 {
  try{
   // This step will read hibernate.cfg.xml and 
   //      prepare hibernate for use
   SessionFactory sessionFactory = new 
   Configuration().configure().buildSessionFactory();
   session =sessionFactory.openSession();
   Transaction tx = session.beginTransaction();
   
    //Create new instance of Contact and set values in 
    // it by reading them from form object
     System.out.println(&quot;Inserting Record&quot;);
    Contact contact = new Contact();
    contact.setId(tid);
    contact.setFirstName(fname);
    contact.setLastName(lname);
    contact.setEmail(email);
    
    session.save(contact);
    tx.commit();
    JOptionPane.showMessageDialog(null,
      &quot;Data inserted successfully!&quot;, 
      &quot;Done&quot;,JOptionPane.INFORMATION_MESSAGE);
    
  }catch(Exception e){
  
   JOptionPane.showMessageDialog(null,e.getMessage(), 
     &quot;Error&quot;,JOptionPane.ERROR_MESSAGE);
  }finally{
   // Actual contact insertion will happen at this step
   session.flush();
   session.close();

  }
 }
 
 
 
 public static void main(String s[])
 {
  new GUI();
 }
}&lt;/span&gt;
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;5)&lt;/b&gt; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Now we have to create class &quot;&lt;b&gt;GetId.java&lt;/b&gt;&quot; as shown below.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; This class is used to check the ID in database.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; So duplicate value can be avoided.&lt;/div&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;


&lt;/span&gt;&lt;span style=&quot;color: #990000;&quot;&gt;package com.gui.adddata;

import java.util.Iterator;
import java.util.Vector;

import org.hibernate.Query;
import org.hibernate.SessionFactory;

import org.hibernate.cfg.Configuration;
import org.hibernate.classic.Session;


public class GetId {
 private static Session session=null;
 
 public Vector&amp;lt;Long&amp;gt; fetchId()
 {
  Vector&amp;lt;Long&amp;gt; vID=new Vector&amp;lt;Long&amp;gt;();
  try{
   
   // This step will read hibernate.cfg.xml and 
   // prepare hibernate for use
   SessionFactory sessionFactory = new 
    Configuration().configure().buildSessionFactory();
   session =sessionFactory.openSession();
    
   // This step will read hibernate.cfg.xml and 
   // prepare hibernate for use
   String SQL_QUERY =&quot;Select contact.id from Contact contact&quot;;
    Query query = session.createQuery(SQL_QUERY);
    
    for(Iterator&amp;lt;Long&amp;gt; it=query.iterate();it.hasNext();){
     vID.add(it.next());
    }
    
  }catch(Exception e){
   System.out.println(e.getMessage());
  }finally{
   session.flush();
   session.close();
  }
  
  return vID;
 }
 
}&lt;/span&gt;
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;OK. Now you have to run GUI.java class to check the result..&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Just see the project folder how it looks like in eclipse as shown below.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWWLmxmZtPbDAiSyBJs3Q-ybExt1dEo_M7xTflrfMKgfYUO5wsYFfqycZs2oazFdl2i_2Rnuv5XUpoW1nkZ_WhAhR6GKzMe4OSVV4-gM_IsXoa535aWh-yspt-LPH4GeecMfcGlarYAS0j/s1600/ProjectFolder.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWWLmxmZtPbDAiSyBJs3Q-ybExt1dEo_M7xTflrfMKgfYUO5wsYFfqycZs2oazFdl2i_2Rnuv5XUpoW1nkZ_WhAhR6GKzMe4OSVV4-gM_IsXoa535aWh-yspt-LPH4GeecMfcGlarYAS0j/s1600/ProjectFolder.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/span&gt; &lt;b&gt;Before Run the class make sure you create one database called &quot;hibernatedatabase&quot;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;in MySQl Database as shown below.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeuQqjU09GivOWuOHChqPNUE0GYAzt_3RehQfEI5zPIL8qaYQ5lc74JipVJXJvaTyn44cbQTfb_kc7nEy7pDww2tIBYEaaiUQYhiVHFMjnXsrEeRy7x7FDF_tO7QHhf8nTNp9uLPzHq2Y-/s1600/hibernateDatabase.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeuQqjU09GivOWuOHChqPNUE0GYAzt_3RehQfEI5zPIL8qaYQ5lc74JipVJXJvaTyn44cbQTfb_kc7nEy7pDww2tIBYEaaiUQYhiVHFMjnXsrEeRy7x7FDF_tO7QHhf8nTNp9uLPzHq2Y-/s1600/hibernateDatabase.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
After run the class first you get following window to accept values from user.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgozGXIhjqZZOdsOrpBGdOKQI_vN8GfbC5IPr7ORBMVFppbD4AuIRbjN6zJI6LvIL3ETCdfgeswxEDe4sbXhjwnbnWxWna4DaY_xkEJh_SDKxbFgUDnjK1D492f-JpmKOH3LEPjwsIh4CeH/s1600/hibernateGUI.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgozGXIhjqZZOdsOrpBGdOKQI_vN8GfbC5IPr7ORBMVFppbD4AuIRbjN6zJI6LvIL3ETCdfgeswxEDe4sbXhjwnbnWxWna4DaY_xkEJh_SDKxbFgUDnjK1D492f-JpmKOH3LEPjwsIh4CeH/s1600/hibernateGUI.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;After entering values as shown above, click Insert data will be added in database table and following message will be generated.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdk6Qd6oNuIr8YLw0SOgP1RAi6Ci55mIz0fHhk5h-xJoN0Gn-MkGyw7UVYB3XyHH7KLEHda-ap2pcgT9x1xcipnxQA7Vkycr7Ys4AKFkO2HHhFzA1x2EnB-NAL-J9On3moQzwD0szPnIhK/s1600/hibernateInsert.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdk6Qd6oNuIr8YLw0SOgP1RAi6Ci55mIz0fHhk5h-xJoN0Gn-MkGyw7UVYB3XyHH7KLEHda-ap2pcgT9x1xcipnxQA7Vkycr7Ys4AKFkO2HHhFzA1x2EnB-NAL-J9On3moQzwD0szPnIhK/s1600/hibernateInsert.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Now you can check in MySQL that the record is added as shown below.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-jON99YvzrmBfU6TIqCHO9qRScR5G9aETc_1rBjNxv4BYAzTnUhcTWcLuaWUSYDbpggxBEqcSdd35QG9PsDAqqXr0b2ky317-r77skW1qEeaZu_CYeHo52iUKKe3s6F3iw1b10iR-y52z/s1600/hibernateSelectData.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-jON99YvzrmBfU6TIqCHO9qRScR5G9aETc_1rBjNxv4BYAzTnUhcTWcLuaWUSYDbpggxBEqcSdd35QG9PsDAqqXr0b2ky317-r77skW1qEeaZu_CYeHo52iUKKe3s6F3iw1b10iR-y52z/s1600/hibernateSelectData.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;So I hope this code is helpful in understanding the working of Hibernate in JAVA.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Feel free to ask me if you have any dought regarding this.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;You can also give me suggessions to improve this tutorial.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Leave comments if you like this post...!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Thank you.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Nirav Raval&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niravj2eedeveloper.blogspot.com/feeds/8711441626217072190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2012/07/basic-hibernate-tutorial-hello-friends.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/8711441626217072190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/8711441626217072190'/><link rel='alternate' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2012/07/basic-hibernate-tutorial-hello-friends.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04563631080311888035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQMQJ0cUQNHWUlrgYmO9p_as4m9Yj1bxJnSWyChDYSNlbZaWztlM4J0rds9rso3rRUfPr0uqtcjAwb8ag9aeOYhRUw5KaaYG0dDF4WqIrXGoDYIKCiBsHf5ORt7P-WtDxEhIj1yPJ6oS43/s72-c/hibernateJAR.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344395409291630488.post-8895620049107822666</id><published>2011-06-27T08:54:00.000-07:00</published><updated>2012-01-05T22:31:42.571-08:00</updated><title type='text'>Spring Hello World</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;Spring Hello World&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Hello Friends,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Nice to see you again.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;In Previous Session &amp;nbsp;we have seen &lt;a href=&quot;http://niravj2eedeveloper.blogspot.com/2011/06/what-is-spring.html&quot;&gt;What is Spring.?&lt;/a&gt;. &amp;nbsp;And learn theory aspect.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Today, we will see the example of &amp;nbsp;Hello World with Spring &amp;nbsp;Framework of Java.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;So be ready to learn this simple example of Spring Framework Tutorail in JAVA Application..&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;After apply this code in action, you will be capable of using Spring in your Java Applications.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;First Download the required JAR to run Spring Framework in Eclipse as shown Below.&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyu6CzKHMhniPzPSoEWRrB60z3DWldmC0_3vTKsKysmFhwsPevMxwjJLkpcKWThZoUJZsrgDVRlU-Wv5ZD_Ek0_fu2U9aDME-XuPcvW3a3OjyLdCCWfdFoR7dJHyUmpa4YY1UWQFIlmrl0/s1600/SpringJARs.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyu6CzKHMhniPzPSoEWRrB60z3DWldmC0_3vTKsKysmFhwsPevMxwjJLkpcKWThZoUJZsrgDVRlU-Wv5ZD_Ek0_fu2U9aDME-XuPcvW3a3OjyLdCCWfdFoR7dJHyUmpa4YY1UWQFIlmrl0/s1600/SpringJARs.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;To use Spring in your project follow below steps.&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;1)&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;First create HelloWorld.java class file &amp;nbsp;As shown below.&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;The &lt;b&gt;HelloWorld&lt;/b&gt; class has a message property and its value is set using the&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;setMessage() &amp;nbsp;&lt;/b&gt;&amp;nbsp;method.&amp;nbsp;&amp;nbsp;This is called setter injection. Instead of directly hard&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; coding the message,&amp;nbsp;we inject it through an external configuration file.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The design pattern used&amp;nbsp;here is called Dependency Injection design pattern&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;The HelloWorld class also has a &lt;b&gt;display() &lt;/b&gt;method to display the message.&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--------------------------------------------------------------------------------------------------------------------&lt;/div&gt;&lt;pre class=&quot;brush: java; toolbar: true;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;package com.test;
/**
&amp;nbsp;*
&amp;nbsp;* @author Nirav Raval
&amp;nbsp;* this class is used to set Property Values.
&amp;nbsp;* and will display it to user.
&amp;nbsp;*
&amp;nbsp;*/
public class HelloWorld {

&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private String message;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private String name;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setMessage(String message) {

&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.message = message;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}

&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void display()
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(message);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;System.out.println(name);
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;
&amp;nbsp; &amp;nbsp; public void setName(String name) {
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;this.name = name;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}
}&lt;/span&gt;
&lt;/pre&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-------------------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;2)&lt;/b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-weight: bold; white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;The next step is to add an entry for this in the bean configuration file.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The &lt;b&gt;bean configuration file&lt;/b&gt; is used to configure the beans in the&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Spring IoC&amp;nbsp;&amp;nbsp;container.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;To create a new bean configuration file right &lt;b&gt;click the src folder&lt;/b&gt; and select&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;New -&amp;gt; Spring Bean Configuration File&lt;/b&gt;.. Save as &lt;b&gt;beans.xml&lt;/b&gt; file.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;And write below lines in it.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-----------------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;pre class=&quot;brush: xml; toolbar: false; auto-links:false&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&amp;lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;http://www.springframework.org/schema/beans/spring-beans.xsd&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                     &lt;/span&gt;&amp;lt;bean id=&quot;helloWorld&quot; class=&quot;com.test.HelloWorld&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                              &lt;/span&gt;&amp;lt;property name=&quot;message&quot; value=&quot;Hello World.!&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                              &lt;/span&gt;&amp;lt;property name=&quot;name&quot; value=&quot;Nirav Raval!&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;                      &lt;/span&gt;&amp;lt;/bean&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;&amp;lt;/beans&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Here, If you want to display a differnt message, the only change you need&lt;br /&gt;
to is to change the value of the message in the bean configuration&lt;br /&gt;
file. This is one of the main benefits of using the Dependency Injection&lt;br /&gt;
design pattern, this makes the code loosely coupled.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-------------------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3)&lt;/b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;font-weight: bold; white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;Now Finally, To dispaly the message, create the following&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;HelloWorldApplication.java &amp;nbsp;&lt;/b&gt;class&lt;b&gt;.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-------------------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #990000;&quot;&gt;package com.test;

/**
 * 
 * @author Nirav Raval
 * 
 */
import org.springframework.context.
      ApplicationContext;
import org.springframework.context.
       support.ClassPathXmlApplicationContext;

public class HelloWorldApplication {

 public static void main(String[] args) {
  
  ApplicationContext context = 
   new ClassPathXmlApplicationContext(&quot;beans.xml&quot;);
  
  HelloWorld helloWorld = 
   (HelloWorld) context.getBean(&quot;helloWorld&quot;);
  
  helloWorld.display();
   
  }
}&lt;/span&gt;
&lt;/pre&gt;&lt;div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
After done above steps our directory structure of project in Eclipse PAckage Explorer is as below.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTMDgEeVl8LRXNkQQ8gsMN-vU8bPy4hXovP7lIaYx7tw9dR9RMNdRRYWIjSWoWxM_zktccVoM_D1qmLE9qctxP0uv8WrXBRqwjRNFcldz-lfADi9R4NYImj9QrCAQDgknYX0onaxHEErAD/s1600/projectView.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTMDgEeVl8LRXNkQQ8gsMN-vU8bPy4hXovP7lIaYx7tw9dR9RMNdRRYWIjSWoWxM_zktccVoM_D1qmLE9qctxP0uv8WrXBRqwjRNFcldz-lfADi9R4NYImj9QrCAQDgknYX0onaxHEErAD/s1600/projectView.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ok this is done. &amp;nbsp;Now run &lt;b&gt;HelloWorldApplication.java&lt;/b&gt; &amp;nbsp;to see output in console.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;The output will be like as shown below.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQcURrIHDq-v9hseUt8Xi1j7YX3c5zau8TuUiw82QzME781_hgvdBBA1nBzuiDwk9NoKLc0GDtOSaBNAqy6zWqZZ2JQgj3M7neOPsBs21YzWSV0ahbDyZLRKSS52Q4ZCqGjWNpwrPiLj1X/s1600/output.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQcURrIHDq-v9hseUt8Xi1j7YX3c5zau8TuUiw82QzME781_hgvdBBA1nBzuiDwk9NoKLc0GDtOSaBNAqy6zWqZZ2JQgj3M7neOPsBs21YzWSV0ahbDyZLRKSS52Q4ZCqGjWNpwrPiLj1X/s1600/output.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What we are doing here is,&lt;br /&gt;
First we instantiate the Spring IoC container with the bean configuration file beans.xml.&lt;br /&gt;
We use the getBean() method to retrive the helloWorld bean from the application context&lt;br /&gt;
and call the display() method to display the message in the console.&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;---------------------------------------------------------------------------------------------------------------&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;So I hope this code is helpful in understanding the working of Spring&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Framework&amp;nbsp;&lt;/b&gt;&lt;b&gt;in JAVA.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Feel free to ask me if you have any dought regarding this.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;You can also give me suggessions to improve this tutorial.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Leave comments if you like this post...!&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Thank you.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Nirav Raval&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niravj2eedeveloper.blogspot.com/feeds/8895620049107822666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2011/06/spring-hello-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/8895620049107822666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/8895620049107822666'/><link rel='alternate' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2011/06/spring-hello-world.html' title='Spring Hello World'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04563631080311888035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyu6CzKHMhniPzPSoEWRrB60z3DWldmC0_3vTKsKysmFhwsPevMxwjJLkpcKWThZoUJZsrgDVRlU-Wv5ZD_Ek0_fu2U9aDME-XuPcvW3a3OjyLdCCWfdFoR7dJHyUmpa4YY1UWQFIlmrl0/s72-c/SpringJARs.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344395409291630488.post-3958934964283508578</id><published>2011-06-22T09:23:00.000-07:00</published><updated>2011-06-22T09:34:35.999-07:00</updated><title type='text'>What is Spring</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;
  var _gaq = _gaq || [];
  _gaq.push([&#39;_setAccount&#39;, &#39;UA-24077726-1&#39;]);
  _gaq.push([&#39;_trackPageview&#39;]);

  (function() {
    var ga = document.createElement(&#39;script&#39;); ga.type = &#39;text/javascript&#39;; ga.async = true;
    ga.src = (&#39;https:&#39; == document.location.protocol ? &#39;https://ssl&#39; : &#39;http://www&#39;) + &#39;.google-analytics.com/ga.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #674ea7;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;What is Spring.?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Hello Friends,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Nice to see you again.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;In Previous Sessions &amp;nbsp;we have seen&lt;a href=&quot;http://niravj2eedeveloper.blogspot.com/2011/06/what-is-spring.html&quot;&gt; Spring Setup in Eclipse IDE.&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Now this is the basic core explanation of Spring Framework of JAVA.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;So be ready to learn this simple exmaple of Spring Framework..&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;What is Spring..?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;By definition the Spring Framework is “&lt;b&gt;An open-source layered Java/J2EE application framework having a light-weight container implementing Inversion-of-Control and Aspect Oriented Programming.&lt;/b&gt;”&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The key points here are “&lt;b&gt;layered application framework&lt;/b&gt;” and “&lt;b&gt;Inversion of Control and Aspect Oriented Programming.&lt;/b&gt;”&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;These key points can be divided into &lt;b&gt;two &lt;/b&gt;broad categories:&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;1) Patterns&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;2) Components of the Framework&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The &lt;b&gt;former &lt;/b&gt;refers to the design patterns supported by Spring Framework&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; And the &lt;b&gt;latter&lt;/b&gt; refers to the components that build up the Framework.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Spring has two patterns at its core. They are:&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;1) Inversion-of-Control&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2) Aspect Oriented Programming&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The &lt;b&gt;former&lt;/b&gt; is also called &lt;b&gt;IoC&lt;/b&gt; and&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The &lt;b&gt;latter&lt;/b&gt; is known as &lt;b&gt;AOP&lt;/b&gt;. Here are the details.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Inversion-of-Control&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;It is called &lt;b&gt;IoC &lt;/b&gt;for short. IoC &lt;b&gt;“is a concept, and an associated set of programming techniques, in which the control flow is inverted compared to the traditional interaction model expressed in imperative style by a series of procedure calls.”&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; In other words, &lt;b&gt;the framework calls the procedures created by the programmer, rather than programmer calling the procedures or methods of the framework&lt;/b&gt;. IoC is also known as the “Hollywood Principle.” The Hollywood Principle says “Don’t call me, I will call you.”&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;IoC &lt;/b&gt;is used to ‘&lt;b&gt;inject&lt;/b&gt;’ &lt;b&gt;dependencies at runtime.&lt;/b&gt; When one uses this pattern, the dependencies of a particular object are not satisfied at compile time. Instead, the framework provides the required dependencies to the object at runtime. Thus, this pattern releases the programmer from the chore of providing all the dependencies at compile time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Aspect Oriented Programming:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; AOP&lt;/b&gt; for short, is by definition “&lt;b&gt;An approach to programming that attempts the separation of concerns, specifically cross-cutting concerns, as an advance in modularization.&lt;/b&gt;”&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Here, the key point is separation of concerns. Concern is another term for a module of an application, where module refers to a functionality of the application.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;Separation of concerns&lt;/b&gt; means that the applications are divided into modules that do not overlap in terms of functionality. However, some functionalities or modules/concerns always overlap other modules/concerns. Logging is an example of such a concern.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;AOP&lt;/b&gt; provides techniques to encapsulate cross cutting or overlapping concerns. In other words, by using AOP a developer can encapsulate cross cutting concerns.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Spring provides both &lt;b&gt;IoC &lt;/b&gt;as well as &lt;b&gt;AOP&lt;/b&gt;. They are built into the core of the Spring Framework. The next aspect of the Spring Framework worth noting is its support for layered architecture. It provides this support through its various components. Some of them are:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;MVC Component&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;IOC container&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;DAO support&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;These three cater to the &lt;b&gt;Presentation&lt;/b&gt;, &lt;b&gt;Business&lt;/b&gt;, and &lt;b&gt;Persistence layers&lt;/b&gt;. Here is a brief overview:&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;MVC Component:&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The flexibility of the Spring Framework is that one can use any MVC framework with it. However, it also provides its own framework, called &lt;b&gt;Spring MVC&lt;/b&gt;. &amp;nbsp;Spring MVC implements MVC-Model 2 for JSP. It does this by providing controller Servlet and JSP taglib for you to view.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;IoC Container:&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The business logic layer can be developed without coupling it with any other layers by using IoC provided by the Spring Framework. The IoC container is the core component of the framework. &lt;b&gt;IoC &lt;/b&gt;lets the developer implement the business logic as &lt;b&gt;Plain Old Java Objects (POJO) &lt;/b&gt;and wire them up so that they can be injected or called at runtime. This approach lets you avoid specifying the business objects as dependencies at compile time.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;DAO Support:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Any of the technologies, including &lt;b&gt;JDBC&lt;/b&gt;, &lt;b&gt;Hibernate&lt;/b&gt;, and &lt;b&gt;iBatis&lt;/b&gt;, can be used with the Spring Framework to access persisted data. The Spring Framework provides this functionality through its DAO support component. A developer can plug in almost any of the persistence framework by using the DAO component.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;That completes the bird’s eye view of the Spring Framework. Next, let us have a look at the steps involved in using the Spring Framework, specifically the IoC capability of the Spring Framework.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
check here for Detailed Overview Of Spring:&lt;br /&gt;
&lt;a href=&quot;http://www.opensourcelive.com/Denver/springbasics.pdf&quot;&gt;http://www.opensourcelive.com/Denver/springbasics.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;So I hope this explanation is helpful in understanding the Spring Framework in JAVA.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Feel free to ask me if you have any dought regarding this.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;You can also give me suggessions to improve this tutorial.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Leave comments if you like this post...!&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Thank you.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Nirav Raval&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niravj2eedeveloper.blogspot.com/feeds/3958934964283508578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2011/06/what-is-spring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/3958934964283508578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/3958934964283508578'/><link rel='alternate' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2011/06/what-is-spring.html' title='What is Spring'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04563631080311888035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344395409291630488.post-587709160121160831</id><published>2011-06-20T06:53:00.001-07:00</published><updated>2011-06-20T19:52:24.652-07:00</updated><title type='text'>Spring Setup in Eclipse IDE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;
  var _gaq = _gaq || [];
  _gaq.push([&#39;_setAccount&#39;, &#39;UA-24077726-1&#39;]);
  _gaq.push([&#39;_trackPageview&#39;]);

  (function() {
    var ga = document.createElement(&#39;script&#39;); ga.type = &#39;text/javascript&#39;; ga.async = true;
    ga.src = (&#39;https:&#39; == document.location.protocol ? &#39;https://ssl&#39; : &#39;http://www&#39;) + &#39;.google-analytics.com/ga.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #674ea7; font-size: large;&quot;&gt;Spring Setup in Eclipse IDE&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Hello Friends,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Today, we will see the plugin setup of Spring Framework in Eclipse IDE.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Here I am using Eclipse 3.4.1 for demonstration.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;You can use any version for this, ther is not much changes in different&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;version of Eclipse.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;The name of plugin for Spring is Spring IDE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1)&amp;nbsp;&lt;/b&gt; To install Spring IDE, Go to &lt;b&gt;Help -&amp;gt; Software Updates&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt; &amp;nbsp;If you are using Eclipse Helios then it will&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;Help -&amp;gt; Install New Software..&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqFBZbR5fuLRBVy8a9JPPBiS53MRTpy-oCcYrnr1w_BkVJFV7R47VszwcylN_ImnEySs0NrxI3685Hdjdi0Jk8mSOXcrnLPPPeAYKNhZe1yFxfmsFA1VDPiZwq16BECLpe6uwIWJ1qk69k/s1600/spring-ide-pic-1.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;289&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqFBZbR5fuLRBVy8a9JPPBiS53MRTpy-oCcYrnr1w_BkVJFV7R47VszwcylN_ImnEySs0NrxI3685Hdjdi0Jk8mSOXcrnLPPPeAYKNhZe1yFxfmsFA1VDPiZwq16BECLpe6uwIWJ1qk69k/s320/spring-ide-pic-1.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;2)&lt;/b&gt;&amp;nbsp; &amp;nbsp;Then, Click the &lt;b&gt;&quot;Add Site&lt;/b&gt;&quot; button and enter&lt;br /&gt;
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;http://springide.org/updatesite&quot;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;in the Add Site popup.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3f0yqaB2XtAU7w_zqyC-37S0JnptdDCsRXTmCmMmASa3Ghd8mFLkb6ZVtXVOfI_9r1SR6XOelyRCsOl8dMNK2sE7MN0yO68LfEQeYM8YAZvKzb9g3m3y6EUPgFt-Opqezf23kA4lFufWJ/s1600/spring-ide-pic-2.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3f0yqaB2XtAU7w_zqyC-37S0JnptdDCsRXTmCmMmASa3Ghd8mFLkb6ZVtXVOfI_9r1SR6XOelyRCsOl8dMNK2sE7MN0yO68LfEQeYM8YAZvKzb9g3m3y6EUPgFt-Opqezf23kA4lFufWJ/s400/spring-ide-pic-2.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #674ea7; font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;3) &lt;/b&gt;&amp;nbsp; Select all the Spring IDE features and click Install.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSb5c1ojSb-p6mf3D2Eu1QXQrP_OvQHsGisSWMA9aqSMX-hc3rcIK431yI_PGag8Awb0IIBWku4RY3h47JgJrh_bB9JyXqgo4I0x5jcI9FX7Rxrnb1itJXhNtZ7pCLpeX47sOssOCHBXJ8/s1600/spring-ide-pic-3.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;303&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSb5c1ojSb-p6mf3D2Eu1QXQrP_OvQHsGisSWMA9aqSMX-hc3rcIK431yI_PGag8Awb0IIBWku4RY3h47JgJrh_bB9JyXqgo4I0x5jcI9FX7Rxrnb1itJXhNtZ7pCLpeX47sOssOCHBXJ8/s400/spring-ide-pic-3.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Once the installation is complete you are done.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;4) &lt;/b&gt;&lt;b style=&quot;font-size: x-large;&quot;&gt;&amp;nbsp;&lt;/b&gt;Now let&#39;s see how to create new Spring Project using the Spring IDE.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;go to&lt;b&gt; File -&amp;gt; New -&amp;gt; Project&lt;/b&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrOj_7y4y3msI4lYbKDeOkyIPCAv7bxl7cpLvfEhePXbym7KcCI6f5y4J6Nt6x5feryE7AtBebJ7fMkdMdzN4jt4_zCvT9_VLYNtp-0eDdrj91BJPDDFe5xe2Nwk58HcP5GnpOEU1b6Zjn/s1600/spring-ide-pic-4.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrOj_7y4y3msI4lYbKDeOkyIPCAv7bxl7cpLvfEhePXbym7KcCI6f5y4J6Nt6x5feryE7AtBebJ7fMkdMdzN4jt4_zCvT9_VLYNtp-0eDdrj91BJPDDFe5xe2Nwk58HcP5GnpOEU1b6Zjn/s400/spring-ide-pic-4.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-size: x-large; font-weight: bold;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Then Select Spring Project From List&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHicX05zkcbkCYvexzzQ8mjcQVjQrYR7lfAwsrLvdHvc0OuMqxVufVL75Bhz-UEnw72j04QCOTfvh6xY96l2snRRev-gZMuS1YvHljnt192inp7z7VeAbm-cy4Cozom4hSHgBJlNGu_qAG/s1600/spring-ide-pic-5.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHicX05zkcbkCYvexzzQ8mjcQVjQrYR7lfAwsrLvdHvc0OuMqxVufVL75Bhz-UEnw72j04QCOTfvh6xY96l2snRRev-gZMuS1YvHljnt192inp7z7VeAbm-cy4Cozom4hSHgBJlNGu_qAG/s400/spring-ide-pic-5.gif&quot; width=&quot;398&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;So I hope this explanation is helpful in setting the Spring IDE in Eclipse.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Feel free to ask me if you have any dought regarding this.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;You can also give me suggessions to improve this tutorial.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Leave comments if you like this post...!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Thank you.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Nirav Raval&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niravj2eedeveloper.blogspot.com/feeds/587709160121160831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2011/06/spring-setup-in-eclipse-ide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/587709160121160831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344395409291630488/posts/default/587709160121160831'/><link rel='alternate' type='text/html' href='http://niravj2eedeveloper.blogspot.com/2011/06/spring-setup-in-eclipse-ide.html' title='Spring Setup in Eclipse IDE'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/04563631080311888035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqFBZbR5fuLRBVy8a9JPPBiS53MRTpy-oCcYrnr1w_BkVJFV7R47VszwcylN_ImnEySs0NrxI3685Hdjdi0Jk8mSOXcrnLPPPeAYKNhZe1yFxfmsFA1VDPiZwq16BECLpe6uwIWJ1qk69k/s72-c/spring-ide-pic-1.gif" height="72" width="72"/><thr:total>0</thr:total></entry></feed>