<?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-6372457994650349888</id><updated>2025-11-23T02:26:04.291-08:00</updated><category term="jdbc tutorials"/><category term="odisha students"/><category term="servlet tutorials"/><category term="odisha java jobs"/><category term="servlet programming"/><category term="java jobs"/><category term="jdbc"/><category term="jsp tutorials"/><category term="odiajobs"/><category term="corejava tutorials"/><category term="free servlet tutorials"/><category term="hibernate"/><category term="hibernate 1.x"/><category term="hibernate 2.x"/><category term="hibernate 3.x"/><category term="hibernate 4.x"/><category term="hibernate framework"/><category term="hibernate in hyderabad"/><category term="hibernate tutorials"/><category term="java in hyderabad"/><category term="java in odisha"/><category term="java servlet"/><category term="java tutorials"/><category term="jdbc help"/><category term="naresh i technologies"/><category term="odia java students"/><category term="odisha java student"/><category term="odisha tutorials"/><category term="ant tutorial"/><category term="hibernate architechture"/><category term="hibernate architechture details"/><category term="hibernate architechture diagram"/><category term="hibernate architechture image"/><category term="hibernate java framework"/><category term="j2ee in odisha"/><category term="java drivers"/><category term="java jobs in odisha"/><category term="java students"/><category term="java tools tutorial"/><category term="odia java jobs"/><category term="odia java software"/><category term="odia java spftware"/><category term="odia students"/><category term="odisha news"/><category term="odisha titorials"/><category term="orissa java institute"/><category term="orissa students"/><category term="oriya java student"/><category term="sathya technologies"/><category term="spring tutorials"/><category term="struts tutorials"/><category term="tools tutorial"/><category term="web application"/><title type='text'>Odia Java Student</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-3892699093553041781</id><published>2012-12-08T10:15:00.003-08:00</published><updated>2012-12-08T10:15:49.992-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hibernate architechture"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate architechture details"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate architechture diagram"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate architechture image"/><title type='text'>Hibernate Architecture</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;h1 align=&quot;left&quot;&gt;
&lt;a href=&quot;http://www.prasant.co.in/hibernate-architecture/&quot;&gt;Hibernate Architecture&lt;/a&gt;&lt;/h1&gt;
&lt;img alt=&quot;&quot; class=&quot;alignnone  wp-image-105&quot; data-mce-src=&quot;http://www.prasant.co.in/wp-content/uploads/2012/12/Hibernate-Architechture.png&quot; height=&quot;443&quot; src=&quot;http://www.prasant.co.in/wp-content/uploads/2012/12/Hibernate-Architechture.png&quot; title=&quot;Hibernate Architechture&quot; width=&quot;599&quot; /&gt;&lt;br /&gt;
&lt;div align=&quot;left&quot;&gt;
&lt;span data-mce-style=&quot;color: #000080;&quot; style=&quot;color: navy;&quot;&gt;Hibernate architecture has three main components:&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span data-mce-style=&quot;color: #000080;&quot; style=&quot;color: navy;&quot;&gt;&lt;strong&gt;Connection Management&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span data-mce-style=&quot;color: #000080;&quot; style=&quot;color: navy;&quot;&gt;&lt;strong&gt;Transaction management&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;
&lt;span data-mce-style=&quot;color: #000080;&quot; style=&quot;color: navy;&quot;&gt;&lt;strong&gt;Object relational mapping:&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/3892699093553041781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/12/hibernate-architecture.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/3892699093553041781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/3892699093553041781'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/12/hibernate-architecture.html' title='Hibernate Architecture'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-7506573390928199256</id><published>2012-12-08T09:26:00.002-08:00</published><updated>2012-12-08T09:26:31.836-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate 1.x"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate 2.x"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate 3.x"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate 4.x"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate framework"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate in hyderabad"/><category scheme="http://www.blogger.com/atom/ns#" term="java in hyderabad"/><category scheme="http://www.blogger.com/atom/ns#" term="java in odisha"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha java jobs"/><title type='text'>How Hibernate came into existence?</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;h1&gt;
&lt;a href=&quot;http://www.prasant.co.in/how-hibernate-came-into-existence/&quot;&gt;How Hibernate came into existence?&lt;/a&gt;&lt;/h1&gt;
&lt;img alt=&quot;&quot; class=&quot;alignnone size-medium wp-image-98&quot; data-mce-src=&quot;http://www.prasant.co.in/wp-content/uploads/2012/12/Hibernate_logo_a-300x83.png&quot; height=&quot;83&quot; src=&quot;http://www.prasant.co.in/wp-content/uploads/2012/12/Hibernate_logo_a-300x83.png&quot; title=&quot;Hibernate_logo_a&quot; width=&quot;300&quot; /&gt;&lt;br /&gt; =&amp;gt; Entity Beans of EJB technology were addressing almost all the limitations of direct usage of JDBC in data access layer.&lt;br /&gt; =&amp;gt; Entity beans had two major limitations:&lt;br /&gt; (1) Very bad performance&lt;br /&gt; (2) Very complex to develope&lt;br /&gt; =&amp;gt; Gavinn King developed Hibernate in 2001.&lt;br /&gt; =&amp;gt; In 2003 Hibernate 2.x released.&lt;br /&gt; =&amp;gt; In 2004 industry starts using Hibernate extensively.&lt;br /&gt; =&amp;gt; Most of the Hibernate projects are using Hibernate 3.x.&lt;br /&gt; =&amp;gt; Latest edition of Hibernate is 4.1.2.&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/7506573390928199256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/12/how-hibernate-came-into-existence.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/7506573390928199256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/7506573390928199256'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/12/how-hibernate-came-into-existence.html' title='How Hibernate came into existence?'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-6063052319136884078</id><published>2012-12-08T08:04:00.001-08:00</published><updated>2012-12-08T08:04:41.898-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate 1.x"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate 2.x"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate 3.x"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate 4.x"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate framework"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate in hyderabad"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate java framework"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate tutorials"/><title type='text'>What is Hibernate ?</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;a href=&quot;http://www.prasant.co.in/what-is-hibernate/&quot;&gt;What is Hibernate ?&lt;/a&gt;&lt;br /&gt;
=&amp;gt; Hibernate is a java persistent framework.&lt;br /&gt;
=&amp;gt; Hibernate is a software product to be installed into a computer system in order to use it to build data access layer of Java enterprise application.&lt;br /&gt;
=&amp;gt; Hibernate follows ORM approach to build data access layer &amp;amp; performs CRUD operations.&lt;br /&gt;
=&amp;gt; Hibernate is one of the ORM implements.&lt;br /&gt;
=&amp;gt; Hibernate consist of the followings:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(1) Hibernate API&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(2) Hibernate Engine&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(3) HQL&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(4) DTD (&amp;amp; Schema) for generating mapping files and Annotations to specify mapping.&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/6063052319136884078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/12/what-is-hibernate.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/6063052319136884078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/6063052319136884078'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/12/what-is-hibernate.html' title='What is Hibernate ?'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-8984434444905659314</id><published>2012-12-07T11:04:00.002-08:00</published><updated>2012-12-07T11:04:50.069-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ant tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="corejava tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="java in odisha"/><category scheme="http://www.blogger.com/atom/ns#" term="java jobs in odisha"/><category scheme="http://www.blogger.com/atom/ns#" term="java tools tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="odia java jobs"/><category scheme="http://www.blogger.com/atom/ns#" term="tools tutorial"/><title type='text'>Apache Ant – Building Simple Java Projects</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;h3 style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 20px; margin: 5px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://www.prasant.co.in/apache-ant-building-simple-java-projects/&quot;&gt;Ant Tutorial&lt;/a&gt;&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #008800; font-family: inherit;&quot;&gt;&lt;span style=&quot;display: inline; font-size: 12px; font-style: inherit; height: auto;&quot;&gt;&lt;a href=&quot;http://www.prasant.co.in/apache-ant-building-simple-java-projects/&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-91 alignleft&quot; height=&quot;288&quot; src=&quot;http://www.prasant.co.in/wp-content/uploads/2012/12/ant-java-build-tool-prasant.png&quot; style=&quot;border: 0px; display: inline; float: left; height: auto; margin: 0px 10px 10px 0px; padding: 0px;&quot; title=&quot;ant java build tool prasant&quot; width=&quot;288&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;By using this tutorial you can easily and quickly learn how to use Ant to build&amp;nbsp; java projects.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 20px; margin: 5px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Ant Definition&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Apache Ant is an open source, cross-platform based build tool that is use XML scripting to build&amp;nbsp; Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications. Ant can also be used effectively to build non Java applications. More generally, Ant can be used to pilot any type of process which can be described in terms of targets and tasks.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 20px; margin: 5px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Apache Ant Overview&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Ant is developed by Apache Foundation specifically to build projects based on java platform. Ant is an abbreviation for&lt;em style=&quot;border: 0px; font-family: inherit; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Another Neat Tool&lt;/em&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
A Java build process typically includes:&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;ul style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; list-style: none; margin: 0px; outline: 0px; padding: 0px 0px 10px; vertical-align: baseline;&quot; type=&quot;disc&quot;&gt;
&lt;li style=&quot;background-image: url(http://www.prasant.co.in/wp-content/themes/xZTh/images/dot.png); background-position: 0px 11px; background-repeat: no-repeat no-repeat; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 3px 0px 3px 10px; vertical-align: baseline;&quot;&gt;the compilation of the Java source code into Java Bytecode&lt;/li&gt;
&lt;li style=&quot;background-image: url(http://www.prasant.co.in/wp-content/themes/xZTh/images/dot.png); background-position: 0px 11px; background-repeat: no-repeat no-repeat; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 3px 0px 3px 10px; vertical-align: baseline;&quot;&gt;creation of the .jar file for the distribution&lt;/li&gt;
&lt;li style=&quot;background-image: url(http://www.prasant.co.in/wp-content/themes/xZTh/images/dot.png); background-position: 0px 11px; background-repeat: no-repeat no-repeat; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 3px 0px 3px 10px; vertical-align: baseline;&quot;&gt;creation of the Documentation&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em style=&quot;border: 0px; font-family: inherit; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Ant&lt;/em&gt;&amp;nbsp;uses an&lt;code style=&quot;background-color: whitesmoke; border: 0px; color: #666666; display: block; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin: 1.5em 0px; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline; white-space: pre;&quot;&gt;XML&lt;/code&gt;file for its configuration. You can’t give any name to this file, this file is usually called&lt;code style=&quot;background-color: whitesmoke; border: 0px; color: #666666; display: block; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin: 1.5em 0px; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline; white-space: pre;&quot;&gt;build.xml&lt;/code&gt;.&amp;nbsp;&lt;em style=&quot;border: 0px; font-family: inherit; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;It&lt;/em&gt;&amp;nbsp;builds are based on three blocks:&amp;nbsp;&lt;em style=&quot;border: 0px; font-family: inherit; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;tasks&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;border: 0px; font-family: inherit; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;targets&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em style=&quot;border: 0px; font-family: inherit; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;extension points&amp;nbsp;&lt;/em&gt;.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
A task is a individual work like compile source code or creating Javadoc. More than one task can be combine to form a group called targets.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
A target can be directly invoked via Ant. Targets can specify their dependencies&amp;nbsp; using “depends” attribute. Ant tool will automatically execute dependent targets.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
For example if&amp;nbsp;&lt;em style=&quot;border: 0px; font-family: inherit; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;target&lt;/em&gt;&amp;nbsp;Run depends on Compile, than&amp;nbsp;&lt;em style=&quot;border: 0px; font-family: inherit; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Ant&lt;/em&gt;&amp;nbsp;will first perform Compile and then Run.&lt;/div&gt;
&lt;pre style=&quot;background-color: whitesmoke; border: 0px; color: #666666; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin-bottom: 1.5em; margin-top: 1.5em; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline;&quot;&gt;&lt;code style=&quot;border: 0px; display: block; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin: 1.5em 0px; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline;&quot;&gt;&amp;lt;target&amp;nbsp;name=&quot;compile&quot;&amp;gt;&lt;/code&gt;
 &lt;code style=&quot;border: 0px; display: block; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin: 1.5em 0px; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline;&quot;&gt;...................&lt;/code&gt;
 &lt;code style=&quot;border: 0px; display: block; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin: 1.5em 0px; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/target&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: whitesmoke; border: 0px; color: #666666; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin-bottom: 1.5em; margin-top: 1.5em; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline;&quot;&gt;&lt;code style=&quot;border: 0px; display: block; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin: 1.5em 0px; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline;&quot;&gt;&amp;lt;target&amp;nbsp;name=&quot;run&quot;&amp;nbsp;depends=&quot;compile&quot;&amp;gt;&lt;/code&gt;
 &lt;code style=&quot;border: 0px; display: block; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin: 1.5em 0px; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline;&quot;&gt;...................&lt;/code&gt;
 &lt;code style=&quot;border: 0px; display: block; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin: 1.5em 0px; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/target&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
In your&lt;code style=&quot;background-color: whitesmoke; border: 0px; color: #666666; display: block; font-family: &#39;andale mono&#39;, &#39;monotype.com&#39;, &#39;lucida console&#39;, monospace; font-size: 12px; margin: 1.5em 0px; outline: 0px; overflow: auto; padding: 1em; vertical-align: baseline; white-space: pre;&quot;&gt;build.xml&lt;/code&gt;file you can specify the default target. Ant will execute this target, if no explicit target is specified.&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 20px; margin: 5px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
History of Ant&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
The development of Ant technology originated as an integral component of Tomcat application server based on Java Servlet and Java Server Faces. Ant, as a part of Apache Jakarta Project is an open source solution based on java platform.&amp;nbsp; Ant used as a major tool in building java projects and now it has become a top-level Apache project for server-side solutions. The latest release of Ant is version 1.8.4.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Introduction to Apache Ant (Another Neat Tool)&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Ant is an open source build technology developed by Apache intended to build processes in Java environment. Ant is based on XML and uses java classes in automatic generation of build processes that makes it platform independent. It is applicable to any integrated development environment (IDE) that uses java. A build file is generally named as&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;em style=&quot;border: 0px; font-family: inherit; font-size: 12px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;build.xml&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;(can’t be other than build.xml).&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; margin-bottom: 10px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
The best features of the Ant technology can be summarized as below -&lt;/div&gt;
&lt;ul style=&quot;background-color: white; border: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 20px; list-style: none; margin: 0px; outline: 0px; padding: 0px 0px 10px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;background-image: url(http://www.prasant.co.in/wp-content/themes/xZTh/images/dot.png); background-position: 0px 11px; background-repeat: no-repeat no-repeat; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 3px 0px 3px 10px; vertical-align: baseline;&quot;&gt;·&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;Easy to Use&lt;/strong&gt;: As it is an XML based scripting tool, therefore easy to understand and implement.&lt;/li&gt;
&lt;li style=&quot;background-image: url(http://www.prasant.co.in/wp-content/themes/xZTh/images/dot.png); background-position: 0px 11px; background-repeat: no-repeat no-repeat; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 3px 0px 3px 10px; vertical-align: baseline;&quot;&gt;·&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;Portable and Cross-platform based&lt;/strong&gt;:&amp;nbsp; it can be run on any operating system.&lt;/li&gt;
&lt;li style=&quot;background-image: url(http://www.prasant.co.in/wp-content/themes/xZTh/images/dot.png); background-position: 0px 11px; background-repeat: no-repeat no-repeat; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 3px 0px 3px 10px; vertical-align: baseline;&quot;&gt;·&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;Extended Functionality&lt;/strong&gt;:&amp;nbsp; It is easier to implement than any specific IDE because it is automated and ubiquitous.&lt;/li&gt;
&lt;li style=&quot;background-image: url(http://www.prasant.co.in/wp-content/themes/xZTh/images/dot.png); background-position: 0px 11px; background-repeat: no-repeat no-repeat; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 3px 0px 3px 10px; vertical-align: baseline;&quot;&gt;·&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;Build Automation&lt;/strong&gt;: Ant provides automated build processes that is faster and more efficient than manual procedures and other build tools can also be integrated with it.&lt;/li&gt;
&lt;li style=&quot;background-image: url(http://www.prasant.co.in/wp-content/themes/xZTh/images/dot.png); background-position: 0px 11px; background-repeat: no-repeat no-repeat; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 3px 0px 3px 10px; vertical-align: baseline;&quot;&gt;·&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;Compilation of Source Code&lt;/strong&gt;: Ant can use and compile source code from a variety of version controls and packaging of the compiled code and resources can also be done.&lt;/li&gt;
&lt;li style=&quot;background-image: url(http://www.prasant.co.in/wp-content/themes/xZTh/images/dot.png); background-position: 0px 11px; background-repeat: no-repeat no-repeat; border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 3px 0px 3px 10px; vertical-align: baseline;&quot;&gt;·&lt;strong style=&quot;border: 0px; font-family: inherit; font-size: 12px; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;Handling Dependencies between Targets&lt;/strong&gt;: An Ant Project describes the target and tasks associated with it and also handles dependencies between various targets and tasks.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/8984434444905659314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/12/apache-ant-building-simple-java-projects.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/8984434444905659314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/8984434444905659314'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/12/apache-ant-building-simple-java-projects.html' title='Apache Ant – Building Simple Java Projects'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-3364144609928413268</id><published>2012-07-28T11:26:00.000-07:00</published><updated>2012-07-28T11:26:09.133-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jsp tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="odia java software"/><category scheme="http://www.blogger.com/atom/ns#" term="odia java spftware"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha java student"/><category scheme="http://www.blogger.com/atom/ns#" term="oriya java student"/><title type='text'>JSP Tag Libraries in Breif</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;post-header-line-1&quot;&gt;
&lt;div style=&quot;padding: 1px 5px 5px 0; text-align: right;&quot;&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body&quot; id=&quot;post-6772234438703823483&quot;&gt;


&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&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/AVvXsEiSWlg-p4dU1KlefloKDzNbYKW6bmVv7Je2279_FBXpFVM6B_DoZXZhFZ8N3-9QxA7-KUGG_XLTlFj-Tyue-f2jSnac2MDAJNu5cx9wCn2pdme8RcSmdRvTo898ISmytpKxiKKmcgXtnilH/s1600/logo_jsp-420x250.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;118&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSWlg-p4dU1KlefloKDzNbYKW6bmVv7Je2279_FBXpFVM6B_DoZXZhFZ8N3-9QxA7-KUGG_XLTlFj-Tyue-f2jSnac2MDAJNu5cx9wCn2pdme8RcSmdRvTo898ISmytpKxiKKmcgXtnilH/s200/logo_jsp-420x250.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
You have many options when it comes to generating dynamic content inside the JSP page. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;These options are as follows :&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Scripting elements calling servlet code directly&lt;/li&gt;
&lt;li&gt;Scripting elements calling servlet code indirectly (by means of utility&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; classes)&lt;/li&gt;
&lt;li&gt;Beans&lt;/li&gt;
&lt;li&gt;Servlet/JSP combo (MVC)&lt;/li&gt;
&lt;li&gt;MVC with JSP expression language&lt;/li&gt;
&lt;li&gt;Custom tags&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=6372457994650349888&quot; name=&quot;more&quot;&gt;&lt;/a&gt;&lt;b&gt;The&lt;/b&gt; options at the top of the list are much 
simpler to use and are just  as legitimate as the options at the bottom 
of the list. However,  industry has adopted a best practice to avoid 
placing Java code inside  the JSP page. This best practice stems from it
 being much harder to  debug and maintain Java code inside the JSP page.
 In addition, JSP pages  should concentrate only on the presentation 
logic. Introducing Java  code into the JSP page tends to divert its 
purpose and, inevitably,  business logic starts to creep in. To enforce 
this best practice,  version 2.4 of the servlet specification went so 
far as to provide a way  to disable any type of JSP scripting for a 
group of JSP pages. We  discuss how to disable scripting in Section 2.14
 (Configuring JSP  Pages).&lt;br /&gt;
&lt;br /&gt;
That said, there are cases where the presentation logic itself is quite 
 complex and using the non-Java code options in the JSP page to express 
 that logic becomes either too clunky and unreadable or, sometimes, just
  impossible to achieve. This is where logic through the familiar  
HTML-like structures.&lt;br /&gt;
&lt;br /&gt;
Although the&lt;b&gt; SimpleTag API&lt;/b&gt; completely replaces the classic tag 
API, you  should keep in mind that it works only in containers compliant
 with  servlet specification 2.4 and above. Because there are still a 
lot of  applications running on servlet 2.3-compliant containers, you 
should  consider avoiding the SimpleTag API if you are not sure what 
type of  container your code will end up on.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Tag Library Components :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To use custom JSP tags, you need to define three separate components :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
- The tag handler class that defines the tag&#39;s behavior&lt;br /&gt;
- The TLD file that maps the XML element names to the tag implementations&lt;br /&gt;
- The JSP file that uses the tag library&lt;br /&gt;
&lt;br /&gt;
Most people find that the first tag they write is the hardest—the  
difficulty being in knowing where each component should go, not in  
writing the components. So, we suggest that you start by just  
downloading the simplest of the examples of this chapter from &lt;a href=&quot;http://volume2.coreservlets.com/&quot; target=&quot;_blank&quot;&gt;http://volume2.coreservlets.com/&lt;/a&gt; and getting those examples to work on your machine. After that, you can move on and try creating some of your own tags.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;The Tag Handler Class :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When defining a new tag, your first task is to define a Java class that 
 tells the system what to do when it sees the tag. This class must  
implement the SimpleTag interface. In practice, you extend  
SimpleTagSupport, which implements the &lt;b&gt;&lt;a href=&quot;http://download.oracle.com/javaee/1.4/api/javax/servlet/jsp/tagext/SimpleTag.html&quot;&gt;SimpleTag&lt;/a&gt; interface&lt;/b&gt; and supplies  standard implementations for some of its methods. Both the &lt;b&gt;SimpleTag  interface&lt;/b&gt; and the &lt;a href=&quot;http://download.oracle.com/javaee/1.4/api/javax/servlet/jsp/tagext/SimpleTagSupport.html&quot;&gt;&lt;b&gt;SimpleTagSupport &lt;/b&gt;&lt;/a&gt;class reside in the &lt;a href=&quot;http://javabynataraj.blogspot.in/2011/10/jsp-tag-libraries-in-breif.html&quot;&gt;&lt;b&gt;&lt;i&gt; &lt;/i&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;i&gt;&lt;a href=&quot;http://download.oracle.com/javaee/1.3/api/javax/servlet/jsp/tagext/package-summary.html&quot;&gt;javax.servlet.jsp.tagext package&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
The very first action the container takes after loading the tag handler 
 class is instantiating it with its no-arg constructor. This means that 
 every tag handler must have a no-arg constructor or its instantiation  
will fail. Remember that the Java compiler provides one for you  
automatically unless you define a constructor with arguments. In that  
case, be sure to define a no-arg constructor yourself.&lt;br /&gt;
&lt;br /&gt;
The code that does the actual work of the tag goes inside the doTag  
method. Usually, this code outputs content to the JSP page by invoking  
the print method of the JspWriter class. To obtain an instance of the  
JstWriter class you call &lt;i&gt;getJspContext().getOut()&lt;/i&gt; inside the 
doTag  method. The doTag method is called at request time. It&#39;s 
important to  note that, unlike the classic tag model, the SimpleTag 
model never  reuses tag handler instances. In fact, a new instance of 
the tag handler  class is created for every tag occurrence on the page. 
This alleviates  worries about race conditions and cached values even if
 you use instance  variables in the tag handler class.&lt;br /&gt;
&lt;br /&gt;
You place the compiled tag handler in the same location you would place a  regular servlet, inside the &lt;i&gt;WEB-INF/classes &lt;/i&gt;directory,
 keeping the  package structure intact. For example, if your tag handler
 class belongs  to the mytags package and its class name is &lt;b&gt;MyTag&lt;/b&gt;, you would place the  &lt;b&gt;MyTag.class&lt;/b&gt; file inside the &lt;i&gt;WEB-INF/classes/mytags/ directory.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example Tag Handler Class :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;smallfont&quot; style=&quot;margin-bottom: 2px;&quot;&gt;
Code:&lt;/div&gt;
&lt;pre class=&quot;brush:java;&quot;&gt;package javabynataraj;

import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;

public class ExampleTag extends SimpleTagSupport {
  public void doTag() throws JspException, IOException {
    JspWriter out = getJspContext().getOut();
    out.print(&quot;&amp;lt;b&amp;gt;Hello World!&amp;lt;/b&amp;gt;&quot;);
  }
}
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;The Tag Library Descriptor File :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Once you have defined a tag handler, your next task is to identify this 
 class to the server and to associate it with a particular XML tag name.
  This task is accomplished by means of a TLD file in XML format. This  
file contains some fixed information (e.g., XML Schema instance  
declaration), an arbitrary short name for your library, a short  
description, and a series of tag descriptions. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example Tag Library Descriptor File :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;smallfont&quot; style=&quot;margin-bottom: 2px;&quot;&gt;
Code:&lt;/div&gt;
&lt;pre class=&quot;brush:java;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&amp;gt;
&amp;lt;taglib xmlns=&quot;http://java.sun.com/xml/ns/j2ee&quot;
  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd&quot;
  version=&quot;2.0&quot;&amp;gt;
  &amp;lt;tlib-version&amp;gt;1.0&amp;lt;/tlib-version&amp;gt;
  &amp;lt;short-name&amp;gt;csajsp-taglib&amp;lt;/short-name&amp;gt;
  &amp;lt;tag&amp;gt;
    &amp;lt;description&amp;gt;Example tag&amp;lt;/description&amp;gt;
    &amp;lt;name&amp;gt;example&amp;lt;/name&amp;gt;
    &amp;lt;tag-class&amp;gt;package.TagHandlerClass&amp;lt;/tag-class&amp;gt;
    &amp;lt;body-content&amp;gt;empty&amp;lt;/body-content&amp;gt;
    &amp;lt;/tag&amp;gt;
&amp;lt;/taglib&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
We describe the details of the contents of the TLD file in later  
sections. For now, just note that the tag element through the following 
 subelements in their required order defines the custom tag.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;description&lt;/i&gt;&lt;/b&gt; : This optional element allows the tag developer to document the purpose of the custom tag.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;name&lt;/i&gt;&lt;/b&gt; : This required element defines the name of the tag  
as it will be referred to by the JSP page (really tag suffix, as will be
  seen shortly).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;tag-class&lt;/i&gt;&lt;/b&gt; : This required element identifies the fully qualified name of the implementing tag handler class.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;body-content&lt;/i&gt;&lt;/b&gt; : This required element tells the container  
how to treat the content between the beginning and ending occurrence of 
 the tag, if any. The value that appears here can be either empty,  
scriptless, tagdependent, or JSP.&lt;br /&gt;
&lt;br /&gt;
The value of empty means that no content is allowed to appear in the body of the tag. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This would mean that the declared tag can only appear in the form :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;smallfont&quot; style=&quot;margin-bottom: 2px;&quot;&gt;
Code:&lt;/div&gt;
&lt;div class=&quot;smallfont&quot; style=&quot;margin-bottom: 2px;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;brush:java;&quot;&gt;&amp;lt;prefix:tag/&amp;gt;
      or
&amp;lt;prefix:tag&amp;gt;&amp;lt;/prefix:tag&amp;gt;&lt;/pre&gt;
&lt;pre class=&quot;brush:java;&quot;&gt;&lt;/pre&gt;
&lt;br /&gt;
(without any spaces between the opening and closing tags). Placing any  
content inside the tag body would generate a page translation error.&lt;br /&gt;
&lt;br /&gt;
The value of scriptless means that the tag body is allowed to have JSP  
content as long as it doesn&#39;t contain any scripting elements like &amp;lt;% 
 ... %&amp;gt; or &amp;lt;%= ... %&amp;gt;. If present, the body of the tag would be
  processed just like any other JSP content.&lt;br /&gt;
&lt;br /&gt;
The value of tagdependent means that the tag is allowed to have any type
  of content as its body. However, this content is not processed at all 
 and completely ignored. It is up to the developer of the tag handler to
  get access to that content and do something with it. For example, if 
you  wanted to develop a tag that would allow the JSP page developer to 
 execute an SQL statement, providing the SQL in the body of the tag, you
  would use tagdependent as the value of the body-content element.&lt;br /&gt;
&lt;br /&gt;
Finally, the value of JSP is provided for backward compatibility with  
the classic custom tag model. It is not a legal value when used with the
  SimpleTag API.&lt;br /&gt;
&lt;br /&gt;
Note that there is no legal way of allowing any scripting elements to appear as the tag body under the new SimpleTag API model.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Core Warning :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When using the SimpleTag API, it is illegal to include scripting elements in the body of the tag.&lt;br /&gt;
&lt;br /&gt;
The TLD file must be placed inside the WEB-INF directory or any subdirectory thereof.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example JSP File :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;smallfont&quot; style=&quot;margin-bottom: 2px;&quot;&gt;
Code:&lt;/div&gt;
&lt;pre class=&quot;brush:java;&quot;&gt;&amp;lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&amp;gt;
&amp;lt;HTML&amp;gt;
&amp;lt;HEAD&amp;gt;
&amp;lt;TITLE&amp;gt;Example JSP page&amp;lt;/TITLE&amp;gt;
&amp;lt;LINK REL=STYLESHEET
      HREF=&quot;JSP-Styles.css&quot;
      TYPE=&quot;text/css&quot;&amp;gt;
&amp;lt;/HEAD&amp;gt;
&amp;lt;BODY&amp;gt;
&amp;lt;%@ taglib uri=&quot;/WEB-INF/tlds/example.tld&quot;
             prefix=&quot;test&quot; %&amp;gt;
&amp;lt;test:example/&amp;gt;
&amp;lt;test:example&amp;gt;&amp;lt;/test:example&amp;gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/3364144609928413268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/jsp-tag-libraries-in-breif.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/3364144609928413268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/3364144609928413268'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/jsp-tag-libraries-in-breif.html' title='JSP Tag Libraries in Breif'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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/AVvXsEiSWlg-p4dU1KlefloKDzNbYKW6bmVv7Je2279_FBXpFVM6B_DoZXZhFZ8N3-9QxA7-KUGG_XLTlFj-Tyue-f2jSnac2MDAJNu5cx9wCn2pdme8RcSmdRvTo898ISmytpKxiKKmcgXtnilH/s72-c/logo_jsp-420x250.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-156315114286794776</id><published>2012-07-28T11:20:00.001-07:00</published><updated>2012-07-28T11:20:21.539-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jsp tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="naresh i technologies"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha students"/><category scheme="http://www.blogger.com/atom/ns#" term="orissa java institute"/><category scheme="http://www.blogger.com/atom/ns#" term="sathya technologies"/><title type='text'>Static ContextPath to Dynamic ContextPaths in Jsp and JS pages</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;post-header-line-1&quot;&gt;
&lt;div style=&quot;padding: 1px 5px 5px 0; text-align: right;&quot;&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body&quot; id=&quot;post-3419033028243545973&quot;&gt;


&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; trbidi=&quot;on&quot;&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/AVvXsEiHmgDo05qlBjxHD4IyCyMGYLCIZ3umP6juqP3WWceenlGROpWNUCzDUfDXdJbLGbQaUwjPj99qqNFJi5mBkE46vyep7MeQ58ETDvKWn-tomOoCwWK6qq8zkoHy8RmmmimAQi00rfEES6w8/s1600/ContextPath_JavabynataraJ.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHmgDo05qlBjxHD4IyCyMGYLCIZ3umP6juqP3WWceenlGROpWNUCzDUfDXdJbLGbQaUwjPj99qqNFJi5mBkE46vyep7MeQ58ETDvKWn-tomOoCwWK6qq8zkoHy8RmmmimAQi00rfEES6w8/s1600/ContextPath_JavabynataraJ.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Changing
 Static ContextPath to Dynamic ContextPath references in JSP and JS 
pages in our project. If you are working with any project on java and 
jsp technologies, if the requirement may come to change the static 
context paths to dynamic context path. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What is the need to change context path from static to dynamic context path?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
While developing our application we use to develop to put our 
contextPath directly in some areas like for links and mostly for images 
we give absolute paths with context. We put this in developing the 
project. After developing the project , it goes to Testing after then to
 production.&lt;br /&gt;
Let us assume our project contextPath is&lt;b&gt; &quot;/myproj&quot;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=6372457994650349888&quot; name=&quot;more&quot;&gt;&lt;/a&gt;&lt;br /&gt;
Now this project is going for testing, then the testers change the contextPath as theirs purpose like &lt;b&gt;&quot;/myprojTest&quot;&lt;/b&gt; then the images and links all will broken. For this purpose the dynamic context references will be&amp;nbsp;use full.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Change to Dynamic ContextPaths in Pager Tags of JSP pages.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The Old Code having Static ContextPath:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;pg:pager maxPageItems=&quot;10&quot;

            prevNextUrl=&quot;/myproj/auto/sheetAuditResults.do&quot;

            url=&quot;/myproj/auto/sheetAuditResults.do&quot; 

            name=&quot;caseResponseForm&quot;&amp;gt;
               -------
              ------------
&amp;lt;/pg:pager&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
Here the ContextPath is /myproj need to change to Dynamic path as given below: &lt;br /&gt;
&lt;br /&gt;
use jsp:useBean tags to define the variable name and get the contextPath
 then assign the link to the variables pnUrlName and urlName in the 
scriptlets.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;jsp:useBean id=&quot;pnUrlName&quot; class=&quot;java.lang.String&quot; scope=&quot;page&quot; /&amp;gt;

&amp;lt;jsp:useBean id=&quot;urlName&quot; class=&quot;java.lang.String&quot; scope=&quot;page&quot; /&amp;gt;

      &amp;lt;%pnUrlName = request.getContextPath()+&quot;/auto/sheetAuditResults.do&quot;; %&amp;gt;

      &amp;lt;%urlName = request.getContextPath()+&quot;/auto/sheetAuditResults.do&quot;; %&amp;gt;

      &amp;lt;pg:pager maxPageItems=&quot;10&quot;

            prevNextUrl=&quot;&amp;lt;%=pnUrlName %&amp;gt;&quot;

            url=&quot;&amp;lt;%=urlName %&amp;gt;&quot; 

            name=&quot;auditInformationResultsResponseForm&quot;&amp;gt;

&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;2. Change ContextPath for images in Jsp page&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;img src=&quot;/myproj/images/calbtn.gif&quot; border=&quot;0&quot; alt=&quot;popup selection calendar &quot;&amp;gt;
&lt;/pre&gt;
We have to change the static contextPath /myproj to dynamically.&lt;br /&gt;
&lt;br /&gt;
for that we have to declare in jsp page below to the taglib tags. as given below:&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;%@ taglib uri=&quot;/WEB-INF/tlds/struts-core.tld&quot; prefix=&quot;c&quot; %&amp;gt;
&amp;lt;c:set var=&quot;path&quot; value=&quot;${pageContext.request.contextPath}&quot;/&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
Convert the image with static contextPath to dynamically as given below&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;img src=&quot;&amp;lt;c:out value=&quot;${path}&quot;/&amp;gt;/images/calbtn.gif&quot; border=&quot;0&quot; alt=&quot;popup selection calendar&quot;&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;3. Change ContextPath in javascript file to open a new window.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;caseWindow = window.open(&#39;/myapp/cases/displayCase.do?previousPage=addDeposit&#39;+jsessionId,&#39;
DN_modalEms&#39;,&#39;width=800,height=600,resizable=yes,
scrollbars=yes,status=yes,menubar=no,toolbar=no,modal=yes&#39;);&lt;/pre&gt;
&lt;br /&gt;
Then change the contextPath /myproj to dynamic contextPath &lt;br /&gt;
&lt;br /&gt;
As we did before for the jsp page we have to define the contextPath to a variable path using jsp core tag library tags.&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;c:set var=&quot;path&quot; value=&quot;${pageContext.request.contextPath}&quot;/&amp;gt;&lt;/pre&gt;
use the contextPath in the javascript function: &lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;
      contextPath = &#39;&amp;lt;c:out value=&quot;${path}&quot;/&amp;gt;&#39;;
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;pre class=&quot;brush: js&quot;&gt;modalCaseWindow = window.open(contextPath+&#39;/cases/displayCreateCase1.do?previousPage=addDeposit&#39;+jsessionId,&#39;DN_modalEms&#39;,
&#39;width=800,height=600,resizable=yes,scrollbars=yes,
status=yes,menubar=no,toolbar=no,modal=yes&#39;);
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;4.Change contextPath for hyperlinks:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;a href=&quot;/myproj/updateMyDeviceId.do?device=&#39; + ent.deviceId + &#39;&quot;&amp;gt;&#39;;&lt;/pre&gt;
Change the static context root reference to dynamic contextPath for the hyperlink in jsp file as given below.&lt;br /&gt;
&lt;br /&gt;
Use the same defined contextPath variable to use here. Actually the 
contextPath is global accessible in an application any where. NO need to
 define in every page of jsp.&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;a href=&quot;&#39;+ contextPath +&#39;/updateMyDeviceId.do?device=&#39; + ent.deviceId + &#39;&quot;&amp;gt;&#39;;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;5.Change contextPath in javascript file for image.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;if (data.status == 1) {

                  $(&#39;#status&#39;).text(&#39;Enabled&#39;);
                  $(&#39;#circle&#39;).attr(&#39;src&#39;, &#39;/myproj/images/green-circle.png&#39;)
                  $(&#39;#statusButton&#39;).val(&#39;Disable&#39;);
            }&lt;/pre&gt;
Change the context path in the if condition. For this define a variable as ctx to get contextPath using &lt;i&gt;request.getContextPath()&lt;/i&gt; method.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;&amp;lt;script&amp;gt;var ctx = &quot;&amp;lt;%=request.getContextPath()%&amp;gt;&quot;&amp;lt;/script&amp;gt;&lt;/pre&gt;
Declare the ctx variable below to the taglib uri tags then we can use any where in the program. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js&quot;&gt;if (data.status == 1) {
                  $(&#39;#status&#39;).text(&#39;Enabled&#39;);
                  $(&#39;#circle&#39;).attr(&#39;src&#39;,ctx+&#39;/images/green-circle.png&#39;)
                  $(&#39;#statusButton&#39;).val(&#39;Disable&#39;);
            }&lt;/pre&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;

&lt;center&gt;

&lt;/center&gt;

      
&lt;div style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;lws_0&quot;&gt;
&lt;div class=&quot;linkwithin_outer&quot; style=&quot;border: 0; clear: both; margin: 0; padding: 0;&quot;&gt;

&lt;div class=&quot;linkwithin_inner&quot; style=&quot;border: 0; margin: 0; padding: 0; width: 596px;&quot;&gt;

    &lt;div class=&quot;linkwithin_text&quot; id=&quot;linkwithin_text_0&quot; style=&quot;border: 0px; font-weight: bold; margin: 0px; padding: 20px 0px 5px;&quot;&gt;

        You might also like: &amp;nbsp; &amp;nbsp;&amp;nbsp;&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://www.java.odiajobs.com/feeds/156315114286794776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/static-contextpath-to-dynamic.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/156315114286794776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/156315114286794776'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/static-contextpath-to-dynamic.html' title='Static ContextPath to Dynamic ContextPaths in Jsp and JS pages'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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/AVvXsEiHmgDo05qlBjxHD4IyCyMGYLCIZ3umP6juqP3WWceenlGROpWNUCzDUfDXdJbLGbQaUwjPj99qqNFJi5mBkE46vyep7MeQ58ETDvKWn-tomOoCwWK6qq8zkoHy8RmmmimAQi00rfEES6w8/s72-c/ContextPath_JavabynataraJ.png" height="72" width="72"/><thr:total>3</thr:total><georss:featurename>Unknown location.</georss:featurename><georss:point>17.148624 78.341789</georss:point><georss:box>17.141037500000003 78.3319185 17.1562105 78.351659500000011</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-6785811673934698746</id><published>2012-07-20T04:24:00.001-07:00</published><updated>2012-07-20T04:24:08.142-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="j2ee in odisha"/><category scheme="http://www.blogger.com/atom/ns#" term="odia java students"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha java jobs"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet programming"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="web application"/><title type='text'>Web application introduction.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;WebApplication&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;is a collection of web resources like&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;HTML&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;files,&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;JavaScript&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;files,&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;image&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;files&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Servlets&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;jsps&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;and etc.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5340082328559589554&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBpu1mYJ95OwwMANgPFWRvCTEelozQvSy_8B6EGW46jyLs9oTlSqpkvx9ky1OoUsts-3lkPJR2WGaJFdpEmPJHagJVB7sU0Xjwn7di-Sasq74cd2p-EfHr9E0iMtEBdPVmBFU1j-C0uyiV/s1600/JAVA1.bmp&quot; style=&quot;border: 1px solid rgb(255, 255, 255); color: #282828; display: block; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px auto 10px; padding: 5px; text-align: center;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;In order to make resources of a application as globally accessible resources developed as web resources of web-application each web-resource develops one webpage and this webpage is globally accessible page.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The web-application that is moved to internet network after development is called Website.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;A web application contains&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;two types&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;of web-resources.&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp; Server side&lt;/b&gt;&amp;nbsp;Web-resource&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp; Client side&lt;/b&gt;&amp;nbsp;Web-resource&lt;/div&gt;
&lt;ol style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 1.6em; margin: 0px; padding: 12px 0px 12px 30px;&quot;&gt;&lt;/ol&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;A web resource that comes to browser(client) from web application placed in web-server/application server for execution is called client side web resource.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;i style=&quot;color: red; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;EX:&lt;/b&gt;&lt;/i&gt;&lt;span style=&quot;color: red; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;HTML,JavaScript programs.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The web-resource program that executed in the server(web-server/application server)is called server-side web-resource program.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;i style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;b style=&quot;color: red; margin: 0px; padding: 0px;&quot;&gt;EX :&lt;/b&gt;&lt;/i&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;Servlet,JSP&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;ul style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 1.6em; margin: 0px; padding: 12px 0px 12px 30px;&quot;&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;Don&#39;t decide weather web-server program is server-side or client side based on the place where it resides and decide based on the place where it executes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/6785811673934698746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/web-application-introduction.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/6785811673934698746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/6785811673934698746'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/web-application-introduction.html' title='Web application introduction.'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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/AVvXsEhBpu1mYJ95OwwMANgPFWRvCTEelozQvSy_8B6EGW46jyLs9oTlSqpkvx9ky1OoUsts-3lkPJR2WGaJFdpEmPJHagJVB7sU0Xjwn7di-Sasq74cd2p-EfHr9E0iMtEBdPVmBFU1j-C0uyiV/s72-c/JAVA1.bmp" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-9038582787208281466</id><published>2012-07-20T04:20:00.000-07:00</published><updated>2012-07-20T04:20:26.417-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java in hyderabad"/><category scheme="http://www.blogger.com/atom/ns#" term="naresh i technologies"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha java jobs"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha students"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet programming"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet tutorials"/><title type='text'>What is the difference between doGet() and doPost() methods ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;fullpost&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;The difference has given below......&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;center style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/center&gt;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;table align=&quot;left&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px 6.75pt; padding: 0px; text-align: left;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border: 1pt solid black; margin: 0px; padding: 0in 5.4pt; width: 174.6pt;&quot; valign=&quot;top&quot; width=&quot;233&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px; text-align: center;&quot;&gt;
&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;doGet&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px; text-align: center;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border: 1pt solid black; margin: 0px; padding: 0in 5.4pt; width: 171.9pt;&quot; valign=&quot;top&quot; width=&quot;229&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px; text-align: center;&quot;&gt;
&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;doPost&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border: 1pt solid black; margin: 0px; padding: 0in 5.4pt; width: 174.6pt;&quot; valign=&quot;top&quot; width=&quot;233&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;In doGet Method the parameters are appended to the URL and sent along with header information&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom-color: black; border-bottom-width: 1pt; border-right-color: black; border-right-width: 1pt; border-style: none solid solid none; margin: 0px; padding: 0in 5.4pt; width: 171.9pt;&quot; valign=&quot;top&quot; width=&quot;229&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;In doPost parameters are sent in separate line in the body&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border: 1pt solid black; margin: 0px; padding: 0in 5.4pt; width: 174.6pt;&quot; valign=&quot;top&quot; width=&quot;233&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;Maximum size of data that can be sent using doget is 240 bytes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom-color: black; border-bottom-width: 1pt; border-right-color: black; border-right-width: 1pt; border-style: none solid solid none; margin: 0px; padding: 0in 5.4pt; width: 171.9pt;&quot; valign=&quot;top&quot; width=&quot;229&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;There is no maximum size for data&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border: 1pt solid black; margin: 0px; padding: 0in 5.4pt; width: 174.6pt;&quot; valign=&quot;top&quot; width=&quot;233&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;Parameters are not encrypted&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom-color: black; border-bottom-width: 1pt; border-right-color: black; border-right-width: 1pt; border-style: none solid solid none; margin: 0px; padding: 0in 5.4pt; width: 171.9pt;&quot; valign=&quot;top&quot; width=&quot;229&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;Parameters are encrypted&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border: 1pt solid black; margin: 0px; padding: 0in 5.4pt; width: 174.6pt;&quot; valign=&quot;top&quot; width=&quot;233&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;DoGet method generally is used to query or to get some information from the server&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom-color: black; border-bottom-width: 1pt; border-right-color: black; border-right-width: 1pt; border-style: none solid solid none; margin: 0px; padding: 0in 5.4pt; width: 171.9pt;&quot; valign=&quot;top&quot; width=&quot;229&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;DoPost is slower compared to doGet since doPost does not write the content length&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border: 1pt solid black; margin: 0px; padding: 0in 5.4pt; width: 174.6pt;&quot; valign=&quot;top&quot; width=&quot;233&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;DoGet should be idempotent. i.e. doget should be able to be repeated safely many times&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom-color: black; border-bottom-width: 1pt; border-right-color: black; border-right-width: 1pt; border-style: none solid solid none; margin: 0px; padding: 0in 5.4pt; width: 171.9pt;&quot; valign=&quot;top&quot; width=&quot;229&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;This method does not need to be idempotent. Operations requested through POST can have side effects for which the user can be held accountable for example updating stored data or buying items online.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border: 1pt solid black; margin: 0px; padding: 0in 5.4pt; width: 174.6pt;&quot; valign=&quot;top&quot; width=&quot;233&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;DoGet should be safe without any side effects for which user is held responsible.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border-bottom-color: black; border-bottom-width: 1pt; border-right-color: black; border-right-width: 1pt; border-style: none solid solid none; margin: 0px; padding: 0in 5.4pt; width: 171.9pt;&quot; valign=&quot;top&quot; width=&quot;229&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0px 0px 0in; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Times, serif; font-size: 12pt; margin: 0px; padding: 0px;&quot;&gt;This method does not need to be either safe.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/9038582787208281466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/what-is-difference-between-doget-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/9038582787208281466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/9038582787208281466'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/what-is-difference-between-doget-and.html' title='What is the difference between doGet() and doPost() methods ?'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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-6372457994650349888.post-7044488684775751589</id><published>2012-07-20T02:27:00.001-07:00</published><updated>2012-07-20T02:27:31.900-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="free servlet tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="java servlet"/><category scheme="http://www.blogger.com/atom/ns#" term="odiajobs"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet programming"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet tutorials"/><title type='text'>Upload CSV file into MySql Database based on columns using Servlets and Java</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; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjX-MT9l5cpxrWy6zTp71xZFNSz7_gHtI8f44_Upkdr_8DLSbI408xkfwJOljl0Xo7sN0N-1B3n55rwo6_ZC-gWO4hUwemOPDPLVn61hYIlG8FkATTYrsq8_eHYfcMBtLn5R_BgCpsY0KB/s1600/csv_file_javabynataraj.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; color: #0033ff; float: right; margin: 0px 0px 1em 1em; padding: 0px;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjX-MT9l5cpxrWy6zTp71xZFNSz7_gHtI8f44_Upkdr_8DLSbI408xkfwJOljl0Xo7sN0N-1B3n55rwo6_ZC-gWO4hUwemOPDPLVn61hYIlG8FkATTYrsq8_eHYfcMBtLn5R_BgCpsY0KB/s200/csv_file_javabynataraj.png&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;CSV&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;file is having multiple values to insert in perticular columns and rows in mysql database.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;margin: 0px; padding: 0px;&quot; trbidi=&quot;on&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;Here we have two files so we have to insert in two tables .&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;*** one is&amp;nbsp;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;Header&lt;/b&gt;&amp;nbsp;part file&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;*** another is&amp;nbsp;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;Detail&lt;/b&gt;&amp;nbsp;part file&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;Basically these two are to upload the questions and answers into the examination portal to upload question papers and answer paper in (Merit Tracking System project).&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;First we have to do the things are Uploaded file has to save in perticular folder and then they have to insert the values into the database table.This is our main task to do.&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;a href=&quot;&quot; name=&quot;more&quot; style=&quot;color: #0033ff; margin: 0px; padding: 0px; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;The required files to this program are&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;#1. index.jsp&lt;/b&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;#2. succ.jsp&lt;/b&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;#3. web.xml&lt;/b&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;#4. DBConnection.java&lt;/b&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;#5. SaveFile.java&lt;/b&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;#6. UploadFile2DB.java&lt;/b&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;and Some other libraries to add&amp;nbsp;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/b&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;#1. mysql-connector-java-3.1.11.jar&lt;/b&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;#2. servlet-api.jar&lt;/b&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;These are enough to our requirement add this files to your &quot;lib&quot; folder.&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDzVMkGiUSCr87PvwRRXK1Oy_ek9PESiGK8xuVuVgO2833LL-WTdnxHllrd0767gtGOQRZVvu_RWRtdylsl2cRsdwUadRRw8TJRVcP0VV9nKXMLc4BCn3y85poJx8-KoalpJoDHXKY1wqu/s1600/Upload1.bmp&quot; imageanchor=&quot;1&quot; style=&quot;color: #0033ff; margin: 0px 1em; padding: 0px;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDzVMkGiUSCr87PvwRRXK1Oy_ek9PESiGK8xuVuVgO2833LL-WTdnxHllrd0767gtGOQRZVvu_RWRtdylsl2cRsdwUadRRw8TJRVcP0VV9nKXMLc4BCn3y85poJx8-KoalpJoDHXKY1wqu/s400/Upload1.bmp&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;388&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #cc0000; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; margin: 0px; padding: 0px;&quot;&gt;#1. index.jsp&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;pre class=&quot;brush:html;&quot; style=&quot;background-color: #efefef; border: 1px solid rgb(166, 176, 191); font-size: 14px; line-height: 14px; overflow: auto; padding: 10px;&quot;&gt;&amp;lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=ISO-8859-1&quot;
 pageEncoding=&quot;ISO-8859-1&quot;%&amp;gt;
&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&amp;gt;
&amp;lt;html&amp;gt;

&amp;lt;form name=&quot;fileuploadform&quot;
 action=&quot;http://localhost:8080/UploadCSV/uploadfile&quot;&amp;gt;Upload CSV
File&amp;lt;br&amp;gt;
Select the header file to upload &amp;lt;input type=&quot;file&quot; name=&quot;filehdr&quot; /&amp;gt;&amp;lt;br&amp;gt;
Select the detail file to upload &amp;lt;input type=&quot;file&quot; name=&quot;filedtl&quot; /&amp;gt;&amp;lt;br&amp;gt;

Please select a folder to which the file has to be uploaded. &amp;lt;input
 type=&quot;file&quot; name=&quot;filefolder&quot; /&amp;gt;&amp;lt;br&amp;gt;
&amp;lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;submit&quot;&amp;gt; &amp;lt;/form&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #cc0000; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; margin: 0px; padding: 0px;&quot;&gt;#2. succ.jsp&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;pre class=&quot;brush:html;&quot; style=&quot;background-color: #efefef; border: 1px solid rgb(166, 176, 191); font-size: 14px; line-height: 14px; overflow: auto; padding: 10px;&quot;&gt;&amp;lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=ISO-8859-1&quot;
    pageEncoding=&quot;ISO-8859-1&quot;%&amp;gt;
&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=ISO-8859-1&quot;&amp;gt;
&amp;lt;title&amp;gt;Insert title here&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;b&amp;gt;The Files has been Uploaded into particular tables.&amp;lt;/b&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;b style=&quot;color: #cc0000; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; margin: 0px; padding: 0px;&quot;&gt;#3. DBConnection.java&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;pre class=&quot;brush:java;&quot; style=&quot;background-color: #efefef; border: 1px solid rgb(166, 176, 191); font-size: 14px; line-height: 14px; overflow: auto; padding: 10px;&quot;&gt;package com;

import java.sql.Connection;
import java.sql.DriverManager;

public class DBConnection {
static Connection con;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static Connection getConnection(){
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; con=null;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try{
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;----------I am in DBConnection----------&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Class.forName(&quot;com.mysql.jdbc.Driver&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; con=DriverManager.getConnection(&quot;jdbc:mysql://192.168.1.101:3306/test?user=test&amp;amp;password=test&quot; );
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;---------end of DBConnection----------&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }catch(Exception e){
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.getMessage();
&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 con;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
&lt;/pre&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #cc0000; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; margin: 0px; padding: 0px;&quot;&gt;#4. SaveFile.java&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;pre class=&quot;brush:java;&quot; style=&quot;background-color: #efefef; border: 1px solid rgb(166, 176, 191); font-size: 14px; line-height: 14px; overflow: auto; padding: 10px;&quot;&gt;package com;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class SaveFile extends HttpServlet {
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void init(ServletConfig config)throws ServletException{
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; super.init(config);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;The SaveFile iniated.^^^^^^^^^^^^^^^^^^^################&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void service(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException{
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try{
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String pathheader=request.getParameter(&quot;filehdr&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;The pathheader is : &quot;+pathheader);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String pathdetail=request.getParameter(&quot;filedtl&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;The pathdetail is : &quot;+pathdetail);
&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; String folderpath=request.getParameter(&quot;filefolder&quot;);&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; String filenamehdr=folderpath+pathheader.substring(pathheader.lastIndexOf(&#39;\\&#39;));
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;The file output path is : &quot;+filenamehdr);&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; String filenamedtl=folderpath+pathdetail.substring(pathdetail.lastIndexOf(&#39;\\&#39;));
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;The file output path is : &quot;+filenamedtl);
&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; FileInputStream fis=new FileInputStream(pathheader);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FileOutputStream fos=new FileOutputStream(filenamehdr);
&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; byte buf[]=new byte[11024];
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fis.read(buf);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fos.write(buf,0,buf.length);
&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; fis=new FileInputStream(pathdetail);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fos=new FileOutputStream(filenamedtl);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fis.read(buf);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fos.write(buf,0,buf.length);
&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(fis!=null)
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fis.close();
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(fos!=null)
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fos.close();
&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; System.out.println(&quot;------------------ Files are Saved in Folder-------------------&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; request.getRequestDispatcher(&quot;/uploaddata&quot;).forward(request, response);

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }catch(FileNotFoundException e){
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(e.getMessage());
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }catch(IOException e){
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(e.getMessage());
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }


}

&lt;/pre&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #cc0000; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;#5. UploadFile2DB.java&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;pre class=&quot;brush:java;&quot; style=&quot;background-color: #efefef; border: 1px solid rgb(166, 176, 191); font-size: 14px; line-height: 14px; overflow: auto; padding: 10px;&quot;&gt;package com;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.StringTokenizer;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class UploadFile2DB extends HttpServlet {
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void init(ServletConfig config) throws ServletException{
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; super.init(config);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;The UploadDataServlet2 iniated.&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }



&amp;nbsp;&amp;nbsp;&amp;nbsp; public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException {
&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; String filepathhdr=request.getParameter(&quot;filehdr&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String filepathdtl=request.getParameter(&quot;filedtl&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Connection con=DBConnection.getConnection();
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;connection=-----------&amp;gt;&quot;+con);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PreparedStatement pstmthdr=null;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PreparedStatement pstmtdtl=null;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int rowshdr=0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; BufferedReader brhdr=new BufferedReader(new FileReader(filepathhdr));
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; BufferedReader brdtl=new BufferedReader(new FileReader(filepathdtl));
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;reading the file&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String strLineHdr=&quot;&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String strLineDtl=&quot;&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String hdrstr=&quot;&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String dtlstr=&quot;&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; StringTokenizer sthdr=null;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; StringTokenizer stdtl=null;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String firstColumnData[]=new String[10];
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int lineNumberHdr=0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int lineNumberDtl=0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int line=1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try{
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pstmthdr=con.prepareStatement(&quot;insert into omts_onlinehdr values (?,?,?,?,?,?,?)&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;statement executed&quot;);

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; while((strLineHdr=brhdr.readLine())!=null){
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;HEADERLINE&quot;+strLineHdr);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int i=1;
&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(!(lineNumberHdr==0)){
&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; sthdr=new StringTokenizer(strLineHdr,&quot;,&quot;);
&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; while(sthdr.hasMoreTokens()){
&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; hdrstr=sthdr.nextToken();
&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; System.out.println(&quot;HeaderString: &quot;+hdrstr);
&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; pstmthdr.setString(i++,hdrstr);
&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; System.out.println(&quot;below insertion&quot;);
&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; rowshdr=pstmthdr.executeUpdate();
&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; System.out.println(rowshdr+&quot; rows updated.&quot;);
&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; lineNumberHdr++;
&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; System.out.println(&quot;not in detail&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pstmtdtl=con.prepareStatement(&quot;insert into omts_onlinedtl values (?,?,?,?,?,?,?)&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;ps executed&quot;);

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; while((strLineDtl=brdtl.readLine())!=null){
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(&quot;detailLINE&quot;+strLineDtl);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int i=1;
&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(!(lineNumberDtl==0)){
&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; stdtl=new StringTokenizer(strLineDtl,&quot;,&quot;);
&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; while(stdtl.hasMoreTokens()){
&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; dtlstr=stdtl.nextToken();
&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; System.out.println(&quot;detail: &quot;+dtlstr);
&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; pstmtdtl.setString(i++,dtlstr);
&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; System.out.println(&quot;below insertion&quot;);
&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; int rowsdtl=pstmtdtl.executeUpdate();
&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; System.out.println(rowsdtl+&quot; rows are updated.&quot;);
&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; lineNumberDtl++;
&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; //con.commit();
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; catch(Exception e){
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(e.getMessage());
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; finally
&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; try {
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; con.close();
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (SQLException e) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO Auto-generated catch block
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();
&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; response.sendRedirect(&quot;http://localhost:8080/UploadCSV/succ.jsp&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
&lt;/pre&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;Run your application using Tomcat webserver and it will displays index.jsp as welcome-file-list.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2lFriAMvWjIe42m_s5J1sBcN8mIPCI86tNiKJgtlWAOerXiL0JGPe0qZClsPDu_z_wqF2v0UlCs91Dne0PJCLamy4xMODcysUmHVsMUmpus5Ex3azVQsZove9csPZlHDtBp7hYe9TkK6f/s1600/Upload4.bmp&quot; imageanchor=&quot;1&quot; style=&quot;color: #0033ff; margin: 0px 1em; padding: 0px;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2lFriAMvWjIe42m_s5J1sBcN8mIPCI86tNiKJgtlWAOerXiL0JGPe0qZClsPDu_z_wqF2v0UlCs91Dne0PJCLamy4xMODcysUmHVsMUmpus5Ex3azVQsZove9csPZlHDtBp7hYe9TkK6f/s400/Upload4.bmp&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
By selecting CSV file&amp;nbsp; using browse button&amp;nbsp; of header part and detail part and set the path of the folder where you want to save the uploaded files and click on submit button.&lt;/div&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;After completion of accessing two files into folders and databases it will displays as succ.jsp file as &quot;successfully uploaded the two files&quot;.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr7hggMWBgLH6Kwhcij4ixlKVn4BDSbhjWzySArsOB1CjyVRJE74furBqdD5lYoYcuP5sEXYe-brjpkuh4kNbrMNqgkZEEmTIjrhFKeLwSTe03bGmVRo5YD0qUH0i_B_gTiM3YSLO2Zguk/s1600/Upload5.bmp&quot; imageanchor=&quot;1&quot; style=&quot;color: #0033ff; margin: 0px 1em; padding: 0px;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;106&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr7hggMWBgLH6Kwhcij4ixlKVn4BDSbhjWzySArsOB1CjyVRJE74furBqdD5lYoYcuP5sEXYe-brjpkuh4kNbrMNqgkZEEmTIjrhFKeLwSTe03bGmVRo5YD0qUH0i_B_gTiM3YSLO2Zguk/s400/Upload5.bmp&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
The Console will displays as the all the information what is going inside.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
Note: Use the&amp;nbsp;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;MySql&amp;nbsp;&lt;/b&gt;database or&amp;nbsp;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;Oracle&amp;nbsp;&lt;/b&gt;and give the driver name and url of the driver to connect Database in the&amp;nbsp;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;DBConncetion class.&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: medium; margin: 0px; padding: 0px;&quot;&gt;DOWNLOAD&lt;a href=&quot;http://www.ziddu.com/download/14570470/UploadCSV.rar.html&quot; style=&quot;color: #0033ff; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;SOURCE&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;For Reference on Files:&lt;/b&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/7044488684775751589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/upload-csv-file-into-mysql-database.html#comment-form' title='35 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/7044488684775751589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/7044488684775751589'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/upload-csv-file-into-mysql-database.html' title='Upload CSV file into MySql Database based on columns using Servlets and Java'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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/AVvXsEgjX-MT9l5cpxrWy6zTp71xZFNSz7_gHtI8f44_Upkdr_8DLSbI408xkfwJOljl0Xo7sN0N-1B3n55rwo6_ZC-gWO4hUwemOPDPLVn61hYIlG8FkATTYrsq8_eHYfcMBtLn5R_BgCpsY0KB/s72-c/csv_file_javabynataraj.png" height="72" width="72"/><thr:total>35</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-3895551064956261587</id><published>2012-07-20T02:18:00.005-07:00</published><updated>2012-07-20T02:18:52.676-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="free servlet tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="java servlet"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha java jobs"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet programming"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet tutorials"/><title type='text'>Difference between ServletContext and ServletConfig ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;What is the Difference between ServletConfig and ServletContext.?&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDgalOn5DpMqWTRddC_G9Rn9B9geN37yYCEtq9psVzbPJbZ3YPQFCe5uToJdWx9CTtdHXvFdLIpn1ynpYPPY-dskWHaXIedQ-K-8ho9_vFrKHxiOV1BugA5raNmrLjDz2Kfh_hUBN29hyphenhyphen3/s1600/web_app2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #0033ff; margin: 0px 1em; padding: 0px;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;197&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDgalOn5DpMqWTRddC_G9Rn9B9geN37yYCEtq9psVzbPJbZ3YPQFCe5uToJdWx9CTtdHXvFdLIpn1ynpYPPY-dskWHaXIedQ-K-8ho9_vFrKHxiOV1BugA5raNmrLjDz2Kfh_hUBN29hyphenhyphen3/s320/web_app2.jpg&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;ServletConfig:&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;public interface&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;ServletConfig&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;ServletConfig&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;encapsulates servlet configuration and gives access to the application (servlet context) object. Servlet initialization parameters appear in the servlet configuration file. Each servlet class may have several different servlet instances, one for each servlet parameters:&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;a href=&quot;&quot; name=&quot;more&quot; style=&quot;color: #0033ff; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-decoration: underline;&quot;&gt;&lt;/a&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;ol style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 1.6em; margin: 0px; padding: 12px 0px 12px 30px;&quot;&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;&lt;span class=&quot;postbody&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;One&amp;nbsp;ServletConfig&amp;nbsp;per servlet&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;&lt;span class=&quot;postbody&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;It is used to pass deploy-time info to servlet and configured in the deployment descriptor file.&lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;it is used to access&amp;nbsp;ServletContext&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;It is within the Servlet element in Deployment descriptor.&lt;/li&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;It is accessed by using getServletConfig().getInitParameter(&quot;myname&quot;);&lt;span class=&quot;postbody&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;&lt;span class=&quot;postbody&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;It is available only to the servlet in which init-param is configured.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span class=&quot;postbody&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;Example:&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgARetyKdR-VKRyLzwy-8mvaIvkEspuhDp2Rqd4XvVkNAym5E-Zk83JQOrMgJPKAKEvqLJqMnTe_y2EdNKRGbUVgdnsWtAOrgbGPR3zQ1Jy135hutlWwNjKAPhLc8W7KOHGGBe7aWuH10tU/s1600/ServletConfig.bmp&quot; imageanchor=&quot;1&quot; style=&quot;color: #0033ff; margin: 0px 1em; padding: 0px;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgARetyKdR-VKRyLzwy-8mvaIvkEspuhDp2Rqd4XvVkNAym5E-Zk83JQOrMgJPKAKEvqLJqMnTe_y2EdNKRGbUVgdnsWtAOrgbGPR3zQ1Jy135hutlWwNjKAPhLc8W7KOHGGBe7aWuH10tU/s400/ServletConfig.bmp&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span class=&quot;postbody&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;ServletContext:&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;public interface&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;ServletContext&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;ServletContext&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;s encapsulate applications. Applications are generalized virtual hosts; a URL prefix defines a distinct application. So /myapp and /yourapp could define different applications. As a degenerate case, each virtual host has its own ServletContext.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;ol style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 1.6em; margin: 0px; padding: 12px 0px 12px 30px;&quot;&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;&lt;span class=&quot;postbody&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;It returns the current context of a web application running in a particular JVM..&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;&lt;span class=&quot;postbody&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;If the web application is distributed,it is one per JVM.&lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;It is used to access the elements configured in deployment descriptor.&lt;/li&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;It is accessed by using getServletContext().getInitParameter(&quot;myname&quot;);&lt;span class=&quot;postbody&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;&lt;span class=&quot;postbody&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;It is available to any servlet or jsp that is part of web application.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span class=&quot;postbody&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span class=&quot;postbody&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;span class=&quot;postbody&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;/span&gt;Example:&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJykWAW-S0I3JrxEZvRCodTxBCWErI_iZ8Qz_ojhCZtpDUZCdMhgnao4PhClpLKTftLOp4xpYyicGN2FBioSSaIRLBVqL_tCPIv_tzVKcfvA21Y-_MMepSeHfi0Dp_rCugzFJVj_MrHppy/s1600/ServletContext.bmp&quot; style=&quot;color: #b21f24; margin: 0px 1em; padding: 0px;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;81&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJykWAW-S0I3JrxEZvRCodTxBCWErI_iZ8Qz_ojhCZtpDUZCdMhgnao4PhClpLKTftLOp4xpYyicGN2FBioSSaIRLBVqL_tCPIv_tzVKcfvA21Y-_MMepSeHfi0Dp_rCugzFJVj_MrHppy/s400/ServletContext.bmp&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/3895551064956261587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/difference-between-servletcontext-and.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/3895551064956261587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/3895551064956261587'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/difference-between-servletcontext-and.html' title='Difference between ServletContext and ServletConfig ?'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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/AVvXsEiDgalOn5DpMqWTRddC_G9Rn9B9geN37yYCEtq9psVzbPJbZ3YPQFCe5uToJdWx9CTtdHXvFdLIpn1ynpYPPY-dskWHaXIedQ-K-8ho9_vFrKHxiOV1BugA5raNmrLjDz2Kfh_hUBN29hyphenhyphen3/s72-c/web_app2.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-1600195097492303479</id><published>2012-07-20T02:13:00.001-07:00</published><updated>2012-07-20T02:13:43.087-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jdbc"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbc help"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbc tutorials"/><title type='text'>Introduction to JDBC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;JDBC stands for Java Database Connectivity allows developers to connect, query and update a database using the Structured Query Language. JDBC API standard provides Java developers to interact with different RDBMS and access table data through Java application without learning RDBMS details and using Database Specific JDBC Drivers.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: medium; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;2. &amp;nbsp;JDBC Architecture&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;JDBC makes the interaction with RDBMS simple and intuitive. When a Java application needs to access database:&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;•&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;open connection to database,&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;•&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;use JDBC driver to send SQL queries to database,&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;•&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;process the results that are returned, and&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;•&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;close the connection.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;JDBC&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;uses two architectures to communicate with database:&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;1)&lt;/b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The driver connects to database and executes SQL statements. Results are sent back from driver to driver manager and finally to the application.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;2)&lt;/b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The JDBC driver communicates with ODBC driver. ODBC driver executes SQL query and then results are sent back to JDBC driver to driver manager and then to application.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;center style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;1. Introduction to JDBC&lt;/center&gt;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
2. JDBC Architecture&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
3. Interaction of JDBC with Database&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
4. Introduction to Hibernate&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
5. Hibernate Architecture&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
6. Hibernate Communication with RDBMS&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
7. Hibernate vs. JDBC&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
7.1. Advantage of Hibernate over JDBC&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
7.2. Disadvantages of Hibernate&amp;nbsp;&lt;/div&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/1600195097492303479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/introduction-to-jdbc_20.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/1600195097492303479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/1600195097492303479'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/introduction-to-jdbc_20.html' title='Introduction to JDBC'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-5701860360960215998</id><published>2012-07-20T02:09:00.003-07:00</published><updated>2012-07-20T02:09:48.112-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java jobs"/><category scheme="http://www.blogger.com/atom/ns#" term="java tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbc help"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbc tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha students"/><title type='text'>JDBC Vs Hibernate</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; margin: 0px; padding: 0px;&quot;&gt;7.1&lt;span class=&quot;Apple-tab-span&quot; style=&quot;margin: 0px; padding: 0px; white-space: pre;&quot;&gt; &lt;/span&gt;Why is Hibernate better than JDBC&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;1) &amp;nbsp; Relational Persistence for JAVA&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;Working with both Object-Oriented software and Relational Database is complicated task with JDBC because there is mismatch between how data is represented in objects versus relational database. So with JDBC, developer has to write code to map an object model&#39;s data representation to a relational data model and its corresponding database schema. Hibernate is flexible and powerful ORM solution to map Java classes to database tables. Hibernate itself takes care of this mapping using XML files so developer does not need to write code for this.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;2) &amp;nbsp; Transparent Persistence&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The automatic mapping of Java objects with database tables and vice versa is called Transparent Persistence. Hibernate provides transparent persistence and developer does not need to write code explicitly to map database tables tuples to application objects during interaction with RDBMS. With JDBC this conversion is to be taken care of by the developer manually with lines of code.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;3) &amp;nbsp; Support for Query Language&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;JDBC supports only native Structured Query Language (SQL). Developer has to find out the efficient way to access database, i.e to select effective query from a number of queries to perform same task. Hibernate provides a powerful query language Hibernate Query Language (independent from type of database) that is expressed in a familiar SQL like syntax and includes full support for polymorphic queries. Hibernate also supports native SQL statements. It also selects an effective way to perform a database manipulation task for an application.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;4) &amp;nbsp; Database Dependent Code&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;Application using JDBC to handle persistent data (database tables) having database specific code in large amount. The code written to map table data to application objects and vice versa is actually to map table fields to object properties. As table changed or database changed then it’s essential to change object structure as well as to change code written to map table-to-object/object-to-table. Hibernate provides this mapping itself. The actual mapping between tables and application objects is done in XML files. If there is change in Database or in any table then the only need to change XML file properties.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;5) &amp;nbsp; Maintenance Cost&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;With JDBC, it is developer’s responsibility to handle JDBC result set and convert it to Java objects through code to use this persistent data in application. So with JDBC, mapping between Java objects and database tables is done manually. Hibernate reduces lines of code by maintaining object-table mapping itself and returns result to application in form of Java objects. It relieves programmer from manual handling of persistent data, hence reducing the development time and maintenance cost.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;6) &amp;nbsp; Optimize Performance&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;Caching is retention of data, usually in application to reduce disk access. Hibernate, with Transparent Persistence, cache is set to application work space. Relational tuples are moved to this cache as a result of query. It improves performance if client application reads same data many&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;times for same write. Automatic Transparent Persistence allows the developer to concentrate more on business logic rather than this application code. With JDBC, caching is maintained by hand-coding.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;7) &amp;nbsp; Automatic Versioning and Time Stamping&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;By database versioning one can be assured that the changes done by one person is not being roll backed by another one unintentionally. Hibernate enables developer to define version type field to application, due to this defined field Hibernate updates version field of database table every time relational tuple is updated in form of Java class object to that table. So if two users retrieve same tuple and then modify it and one user save this modified tuple to database, version is automatically updated for this tuple by Hibernate. When other user tries to save updated tuple to database then it does not allow to save it because this user does not has updated data. In JDBC there is no check that always every user has updated data. This check has to be added by the developer.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;8) &amp;nbsp; Open-Source, Zero-Cost Product License&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;Hibernate is an open source and free to use for both development and production deployments.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;9) &amp;nbsp; Enterprise-Class Reliability and Scalability&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;Hibernate scales well in any environment, no matter if use it in-house Intranet that serves hundreds of users or for mission-critical applications that serve hundreds of thousands. JDBC can not be scaled easily.&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/5701860360960215998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/jdbc-vs-hibernate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/5701860360960215998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/5701860360960215998'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/jdbc-vs-hibernate.html' title='JDBC Vs Hibernate'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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-6372457994650349888.post-8531468131188881859</id><published>2012-07-20T02:06:00.000-07:00</published><updated>2012-07-20T02:06:58.490-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jdbc"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbc tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha news"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha students"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha tutorials"/><title type='text'>Java Prepared Statements</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 style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ0CR_wwxz-0W0oMS-Q8v9E3U3Fstj7QZhn4UFXLRrSj0-PCcpLpkmAwjyuPOTl3Raz5IaYMmzcRIeyIvQSPLpX0_NrVydkJsDry6tJtzUwDf8oZsPPqwliSK1yttD_lefhJC3HsmiUb9R/s1600/jdbc.GIF&quot; style=&quot;clear: right; color: #0033ff; float: right; margin: 0px 0px 1em 1em; padding: 0px;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ0CR_wwxz-0W0oMS-Q8v9E3U3Fstj7QZhn4UFXLRrSj0-PCcpLpkmAwjyuPOTl3Raz5IaYMmzcRIeyIvQSPLpX0_NrVydkJsDry6tJtzUwDf8oZsPPqwliSK1yttD_lefhJC3HsmiUb9R/s1600/jdbc.GIF&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; /&gt;&lt;/a&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;Java JDBC Prepared statements&lt;/b&gt;&amp;nbsp;are pre-compiled SQL statements. Precompiled SQL is useful if the same SQL is to be executed repeatedly, for example, in a loop.&amp;nbsp;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;Prepared statements in java&lt;/b&gt;&amp;nbsp;only save you time if you expect to execute the same SQL over again. Every java sql prepared statement is compiled at some point. To use a java preparedstatements, you must first create a object by calling the Connection.prepareStatement() method. JDBC PreparedStatements are useful especially in situations where you can use a for loop or while loop to set a parameter to a succession of values. If you want to execute a Statement object many times, it normally reduces execution time to use a PreparedStatement object instead.&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
The syntax is straightforward: just insert question marks for any parameters that you&#39;ll be substituting before you send the SQL to the database. As with CallableStatements, you need to call close() to make sure database resources are freed as soon as possible. Below is a JDBC Program showing the use of jdbc prepared statements to insert data into tables using jdbc programming.&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
You need to supply values to be used in place of the question mark placeholders (if there are any) before you can execute a PreparedStatement object. You do this by calling one of the setXXX methods defined in the PreparedStatement class. There is a setXXX method for each primitive type declared in the Java programming language.&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;span class=&quot;style15&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;PreparedStatement pstmt&amp;nbsp;&lt;/span&gt;= con.prepareStatement(&quot;update Orders set pname = ? where Prod_Id = ?&quot;);&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;pstmt.setInt(2, 100);&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;pstmt.setString(1, &quot;Bob&quot;);&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;pstmt.executeUpdate();&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
An important feature of a PreparedStatement object is that, unlike a Statement object, it is given an SQL statement when it is created. This SQL statement is sent to the DBMS right away, where it is compiled. As a result, the PreparedStatement object contains not just an SQL statement, but an SQL statement that has been precompiled. This means that when the PreparedStatement is executed, the DBMS can just run the PreparedStatement SQL statement without having to compile it first.&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
Using Prepared Statements in jdbc, objects can be used for SQL statements with no parameters, you probably use them most often for SQL statements that take parameters. The advantage of using SQL statements that take parameters is that you can use the same statement and supply it with different values each time you execute it.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ0CR_wwxz-0W0oMS-Q8v9E3U3Fstj7QZhn4UFXLRrSj0-PCcpLpkmAwjyuPOTl3Raz5IaYMmzcRIeyIvQSPLpX0_NrVydkJsDry6tJtzUwDf8oZsPPqwliSK1yttD_lefhJC3HsmiUb9R/s1600/jdbc.GIF&quot; imageanchor=&quot;1&quot; style=&quot;color: #0033ff; margin: 0px 1em; padding: 0px;&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: justify;&quot;&gt;
&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;source&lt;/b&gt;:&amp;nbsp;http://www.jdbc-tutorial.com/&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/8531468131188881859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/java-prepared-statements.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/8531468131188881859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/8531468131188881859'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/java-prepared-statements.html' title='Java Prepared Statements'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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/AVvXsEjZ0CR_wwxz-0W0oMS-Q8v9E3U3Fstj7QZhn4UFXLRrSj0-PCcpLpkmAwjyuPOTl3Raz5IaYMmzcRIeyIvQSPLpX0_NrVydkJsDry6tJtzUwDf8oZsPPqwliSK1yttD_lefhJC3HsmiUb9R/s72-c/jdbc.GIF" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-3410336189746859037</id><published>2012-07-20T02:03:00.000-07:00</published><updated>2012-07-20T02:07:49.729-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java jobs"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbc tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="odiajobs"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha students"/><title type='text'>How many Types of Statements in JDBC ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSsEhRHfdPwUmR7GIVPN9-ux4wk8vyUQgGT46Jbsoxdo15S6FKMwN44t0jGJ3u6CS6pYJNlUqw-OmQ7LPwjXlNU34FkqMXd4WkcK-HFs9t9JOfBhN96ROVrFjcKqONI770_-3bEfEVVGkZ/s200/imagesddddddd.jpeg&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;In&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;JDBC&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;there are three types of&amp;nbsp;&lt;/span&gt;Statements&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;1).&lt;span style=&quot;color: #0033ff;&quot;&gt;Statement&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;2).&lt;span style=&quot;color: #0033ff;&quot;&gt;PreparedStatement&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;3).&lt;span style=&quot;color: #0033ff;&quot;&gt;CallableStatement&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;Once a connection is obtained we can interact with the database.These three are Interfaces.By using these three statements we can do the operations on Databases using the methods provided in Interfaces.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;Statement:&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;Use for general-purpose access to your database. Useful when you are using static SQL statements at runtime. The Statement interface cannot accept parameters.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;PreparedStatement&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;:&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;Use when you plan to use the SQL statements many times. The&amp;nbsp;&lt;/span&gt;PreparedStatement&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;interface accepts input parameters at runtime.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;CallableStatement&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;:&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;Use when you want to access database stored procedures. The&amp;nbsp;&lt;/span&gt;CallableStatement&amp;nbsp;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;interface can also accept runtime input parameters.&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/3410336189746859037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/how-many-types-of-statements-in-jdbc.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/3410336189746859037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/3410336189746859037'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/how-many-types-of-statements-in-jdbc.html' title='How many Types of Statements in JDBC ?'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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/AVvXsEiSsEhRHfdPwUmR7GIVPN9-ux4wk8vyUQgGT46Jbsoxdo15S6FKMwN44t0jGJ3u6CS6pYJNlUqw-OmQ7LPwjXlNU34FkqMXd4WkcK-HFs9t9JOfBhN96ROVrFjcKqONI770_-3bEfEVVGkZ/s72-c/imagesddddddd.jpeg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-767948826425487065</id><published>2012-07-20T02:00:00.004-07:00</published><updated>2012-07-20T02:00:52.563-07:00</updated><title type='text'>JDBC - Simple Statement</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY7PQzzcnvAJB1NrvnJQl3QsPqWNVcThRCAmRzVTq5457HDu39i5pxXscoC9unscDDka0kHmCmh7n93URd0ZuAcvZIu4H0bZJUG-azcjxjjRZd8JF_S1DzC5EjsNPCt_TB_r6Bi7EJVmCY/s200/JDBC.jpg&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Statement interface&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;lets you execute a simple SQL statement with no parameters. The SQL instructions are inserted into the Statement object when the Statement&lt;/span&gt;&lt;i style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;.executeXXX&amp;nbsp;&lt;/i&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;method is called.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Query Statement:&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;This code segment creates a Statement object and calls the Statement.executeQuery method to select text from the dba database. The results of the query are returned in a ResultSet object. How to retrieve results from a ResultSet object is explained in Result Sets below.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: #efefef; border: 1px solid rgb(166, 176, 191); font-size: 14px; line-height: 14px; overflow: auto; padding: 10px;&quot;&gt;Statement stmt = con.createStatement();
&amp;nbsp;ResultSet results = stmt.executeQuery(&quot;SELECT TEXT FROM dba &quot;);&lt;/pre&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Update Statement:&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;This code segment creates a Statement object and calls the Statement.executeUpdate method to add an email address to a table in the dba database.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;pre style=&quot;background-color: #efefef; border: 1px solid rgb(166, 176, 191); font-size: 14px; line-height: 14px; overflow: auto; padding: 10px;&quot;&gt;&amp;nbsp; String updateString =  &quot;INSERT INTO dba VALUES (some text)&quot;;
&amp;nbsp; int count = stmt.executeUpdate(updateString);&lt;/pre&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/767948826425487065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/jdbc-simple-statement.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/767948826425487065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/767948826425487065'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/jdbc-simple-statement.html' title='JDBC - Simple Statement'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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/AVvXsEhY7PQzzcnvAJB1NrvnJQl3QsPqWNVcThRCAmRzVTq5457HDu39i5pxXscoC9unscDDka0kHmCmh7n93URd0ZuAcvZIu4H0bZJUG-azcjxjjRZd8JF_S1DzC5EjsNPCt_TB_r6Bi7EJVmCY/s72-c/JDBC.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-4800372039282141221</id><published>2012-07-20T01:57:00.003-07:00</published><updated>2012-07-20T01:57:46.953-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jdbc"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbc tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="odiajobs"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha students"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha titorials"/><title type='text'>JDBC - CallableStatement</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgufx_3VjtZgRvfz6l7DqyTb-JLyhzsbASqd5BXAq1XJcsjnv3Pa-u-3ymudYThJg7tWTrbBw4M86aVUF-1KI2KAmX1LTGGlU2XrB_IVzUcfNcyTTBl03WSfJBesOb6fZR94_MbmtQDVo3q/s200/Jdbc+-+Callable+Statement.JPG&quot; /&gt;T&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;he CallableStatement interface allows the use of SQL statements to call stored procedures. Stored procedures are programs that have a database interface. These programs possess the following:&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;1) &amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp; They can have input and output parameters, or parameters that&amp;nbsp;&amp;nbsp;&amp;nbsp; are&amp;nbsp;&amp;nbsp; both input and output.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;2)&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;&amp;nbsp; They can have a return value.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;3)&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;&amp;nbsp; They have the ability to return multiple ResultSets.&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 1.6em; margin: 0px; padding: 12px 0px 12px 30px;&quot;&gt;&lt;/ul&gt;
&lt;ul style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 1.6em; margin: 0px; padding: 12px 0px 12px 30px;&quot;&gt;&lt;/ul&gt;
&lt;ul style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 1.6em; margin: 0px; padding: 12px 0px 12px 30px;&quot;&gt;&lt;/ul&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;Conceptually in JDBC, a stored procedure call is a single call to the database, but the program associated with the stored procedure may process hundreds of database requests. The stored procedure program may also perform a number of other programmatic tasks not typically done with SQL statements.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Creating CallableStatements&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The prepareCall method is used to create new CallableStatement objects. As with the prepareStatement method, the SQL statement must be supplied at the time that the CallableStatement object is created. At that time, the SQL statement is precompiled. For example, assuming a Connection object named conn already exists, the following creates a CallableStatement object and completes the preparation phase of getting the SQL statement ready for processing within the database:&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;pre style=&quot;background-color: #efefef; border: 1px solid rgb(166, 176, 191); font-size: 14px; line-height: 14px; overflow: auto; padding: 10px;&quot;&gt;PreparedStatement ps = conn.prepareStatement(&quot;? = CALL ADDEMPLOYEE(?, ?, ?&quot;);&lt;/pre&gt;
&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Handling parameters&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;As stated, CallableStatement objects may take three types of parameters:&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;u style=&quot;margin: 0px; padding: 0px;&quot;&gt;IN&lt;/u&gt;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IN parameters are handled in the same manner as PreparedStatements. The various set methods of the inherited PreparedStatement class are used to set the parameters.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;u style=&quot;margin: 0px; padding: 0px;&quot;&gt;OUT&lt;/u&gt;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUT parameters are handled with the registerOutParameter method. The most common form of registerOutParameter takes an index parameter as the first parameter and an SQL type as the second parameter. This tells the JDBC driver what to expect for data from the parameter when the statement is processed. There are two other variations on the registerOutParameter method that can be found in the java.sql package Javadoc.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;u style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;INOUT&lt;/b&gt;&lt;/u&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; INOUT parameters require that the work for both IN parameters and OUT parameters be done. For each INOUT parameter, you must call a set method and the registerOutParameter method before the statement can be processed. Failing to set or register any parameter results in an SQLException being thrown when the statement is processed.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;h3 id=&quot;tjvcscsp&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #b21f24; font-family: Georgia, Times, serif; font-size: 28px; font-weight: normal; line-height: 1.4em; margin: 0px 0px 10px; padding: 0px 0px 7px;&quot;&gt;
Using CallableStatement methods to call stored procedures&lt;/h3&gt;
&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=2423708031295238982&amp;amp;postID=7452393111128990373&quot; id=&quot;idx2336&quot; name=&quot;idx2336&quot; style=&quot;color: #0033ff; margin: 0px; padding: 0px;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=2423708031295238982&amp;amp;postID=7452393111128990373&quot; id=&quot;idx2337&quot; name=&quot;idx2337&quot; style=&quot;color: #0033ff; margin: 0px; padding: 0px;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;To call stored procedures, you invoke methods in the&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xph&quot; style=&quot;color: #282828; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;CallableStatement&lt;/tt&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;class. The basic steps are:&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;---&amp;gt;Invoke the&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xph&quot; style=&quot;color: #282828; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Connection.prepareCall&lt;/tt&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;method to create a&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xph&quot; style=&quot;color: #282828; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;CallableStatement&lt;/tt&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;object.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;---&amp;gt;Invoke the&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xph&quot; style=&quot;color: #282828; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;CallableStatement.setXXX&lt;/tt&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;methods to pass values to the input (IN) parameters.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;---&amp;gt;Invoke the&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xph&quot; style=&quot;color: #282828; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;CallableStatement.registerOutParameter&lt;/tt&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;method to indicate which parameters are output-only (OUT) parameters, or input and output (INOUT) parameters.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;---&amp;gt;Invoke one of the following methods to call the stored procedure:&lt;/span&gt;&lt;tt class=&quot;xph&quot; style=&quot;color: #282828; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/tt&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;tt class=&quot;xph&quot; style=&quot;color: #282828; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;---&amp;gt;CallableStatement.executeUpdate&lt;/tt&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;---&amp;gt;Invoke this method if the stored procedure does not return result sets.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;---&amp;gt;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;ol style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 1.6em; margin: 0px; padding: 12px 0px 12px 30px;&quot; type=&quot;1&quot;&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;
&lt;dl class=&quot;parml&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;dt class=&quot;bold&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;tt class=&quot;xph&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;---&amp;gt;CallableStatement.executeQuery&lt;/tt&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin: 0px; padding: 0px;&quot;&gt;Invoke this method if the stored procedure returns one result set.&lt;/dd&gt;
&lt;dt class=&quot;bold&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;tt class=&quot;xph&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;CallableStatement.execute&lt;/tt&gt;&lt;/dt&gt;
&lt;dd style=&quot;margin: 0px; padding: 0px;&quot;&gt;Invoke this method if the stored procedure returns multiple result sets.&lt;/dd&gt;&lt;/dl&gt;
&lt;/li&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;---&amp;gt;If the stored procedure returns result sets, retrieve the result sets. See&lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb.doc/ad/tjvjdmlt.htm&quot; style=&quot;color: #0033ff; margin: 0px; padding: 0px;&quot;&gt;Retrieve multiple result sets from a stored procedure in a JDBC application&lt;/a&gt;.&lt;/li&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;---&amp;gt;Invoke the&amp;nbsp;&lt;tt class=&quot;xph&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;CallableStatement.getXXX&lt;/tt&gt;&amp;nbsp;methods to retrieve values from the OUT parameters or INOUT parameters.&lt;/li&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;
&lt;li style=&quot;margin: 0px; padding: 0px 0px 8px;&quot;&gt;---&amp;gt;Invoke the&amp;nbsp;&lt;tt class=&quot;xph&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;CallableStatement.close&lt;/tt&gt;&amp;nbsp;method to close the&lt;tt class=&quot;xph&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;CallableStatement&lt;/tt&gt;&amp;nbsp;object when you have finished using that object.&lt;/li&gt;
&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/ol&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The following code illustrates calling a stored procedure that has one input parameter, four output parameters, and no returned&amp;nbsp;&lt;/span&gt;&lt;tt class=&quot;xph&quot; style=&quot;color: #282828; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;ResultSet&lt;/tt&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;s. The numbers to the right of selected statements correspond to the previously-described steps.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/4800372039282141221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/jdbc-callablestatement.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/4800372039282141221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/4800372039282141221'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/jdbc-callablestatement.html' title='JDBC - CallableStatement'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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/AVvXsEgufx_3VjtZgRvfz6l7DqyTb-JLyhzsbASqd5BXAq1XJcsjnv3Pa-u-3ymudYThJg7tWTrbBw4M86aVUF-1KI2KAmX1LTGGlU2XrB_IVzUcfNcyTTBl03WSfJBesOb6fZR94_MbmtQDVo3q/s72-c/Jdbc+-+Callable+Statement.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-1216407085016075743</id><published>2012-07-20T01:53:00.005-07:00</published><updated>2012-07-20T01:53:59.267-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java drivers"/><category scheme="http://www.blogger.com/atom/ns#" term="java jobs"/><category scheme="http://www.blogger.com/atom/ns#" term="java tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbc tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="odisha java student"/><title type='text'>Types of JDBC Drivers in JAVA</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;JDBC drivers&lt;/b&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; font-weight: 400; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;are divided into four types or levels. The&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;different types of jdbc drivers&lt;/b&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; font-weight: 400; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;are:&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Type 1:&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;JDBC-ODBC Bridge driver (Bridge)&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Type 2:&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;Native-API/partly Java driver (Native)&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Type 3:&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;AllJava/Net-protocol driver (Middleware)&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Type 4:&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;All Java/Native-protocol driver (Pure)&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;4 types of jdbc drivers&lt;/b&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;&amp;nbsp;are elaborated in detail as shown below:&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
Type 1 JDBC Driver&lt;/h2&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-decoration: underline;&quot;&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;JDBC-ODBC Bridge driver&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The Type 1 driver translates all JDBC calls into ODBC calls and sends them to the ODBC driver. ODBC is a generic API. The JDBC-ODBC Bridge driver is recommended only for experimental use or when no other alternative is available.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;&quot; height=&quot;343&quot; src=&quot;http://www.jdbc-tutorial.com/images/jdbc-type1-driver.JPG&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;273&quot; /&gt;&lt;/div&gt;
&lt;span class=&quot;style17&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Type 1: JDBC-ODBC Bridge&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;style18&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
Advantage&lt;/div&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The JDBC-ODBC Bridge allows access to almost any database, since the database’s ODBC drivers are already available.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;style18&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
Disadvantages&lt;/div&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;1. Since the Bridge driver is not written fully in Java, Type 1 drivers are not portable.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;2. A performance issue is seen as a JDBC call goes through the bridge to the ODBC driver, then to the database, and this applies even in the reverse process. They are the slowest of all driver types.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;3. The client system requires the ODBC Installation to use the driver.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;4. Not good for the Web.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;h2 style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
Type 2 JDBC Driver&lt;/h2&gt;
&lt;b style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;margin: 0px; padding: 0px; text-decoration: underline;&quot;&gt;Native-API/partly Java driver&lt;/span&gt;&lt;/b&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The distinctive characteristic of type 2 jdbc drivers are that Type 2 drivers convert JDBC calls into database-specific calls i.e. this driver is specific to a particular database. Some distinctive characteristic of type 2 jdbc drivers are shown below. Example: Oracle will have oracle native api.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;&quot; height=&quot;286&quot; src=&quot;http://www.jdbc-tutorial.com/images/jdbc-type2-driver.JPG&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;161&quot; /&gt;&lt;/div&gt;
&lt;span class=&quot;style17&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Type 2: Native api/ Partly Java Driver&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;style18&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
Advantage&lt;/div&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The distinctive characteristic of type 2 jdbc drivers are that they are typically offer better performance than the JDBC-ODBC Bridge as the layers of communication (tiers) are less than that of Type&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;1 and also it uses Native api which is Database specific.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;style18&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
Disadvantage&lt;/div&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;1. Native API must be installed in the Client System and hence type 2 drivers cannot be used for the Internet.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;2. Like Type 1 drivers, it’s not written in Java Language which forms a portability issue.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;3. If we change the Database we have to change the native api as it is specific to a database&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;4. Mostly obsolete now&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;5. Usually not thread safe.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;h3 style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #b21f24; font-family: Georgia, Times, serif; font-size: 28px; font-weight: normal; line-height: 1.4em; margin: 0px 0px 10px; padding: 0px 0px 7px;&quot;&gt;
&lt;span style=&quot;font-size: medium; margin: 0px; padding: 0px;&quot;&gt;Type 3 JDBC Driver&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-decoration: underline;&quot;&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;All Java/Net-protocol driver&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;Type 3 database requests are passed through the network to the middle-tier server. The middle-tier then translates the request to the database. If the middle-tier server can in turn use Type1, Type 2 or Type 4 drivers.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;&quot; height=&quot;286&quot; src=&quot;http://www.jdbc-tutorial.com/images/jdbc-type3-driver.JPG&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;245&quot; /&gt;&lt;/div&gt;
&lt;span class=&quot;style17&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Type 3: All Java/ Net-Protocol Driver&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;style18&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
Advantage&lt;/div&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;1. This driver is server-based, so there is no need for any vendor database library to be present on client machines.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;2. This driver is fully written in Java and hence Portable. It is suitable for the web.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;3. There are many opportunities to optimize portability, performance, and scalability.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;4. The net protocol can be designed to make the client JDBC driver very small and fast to load.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;5. The type 3 driver typically provides support for features such as caching (connections, query results, and so on), load balancing, and advanced&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;system administration such as logging and auditing.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;6. This driver is very flexible allows access to multiple databases using one driver.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;7. They are the most efficient amongst all driver types.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span class=&quot;style18&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Disadvantage&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;It requires another server application to install and maintain. Traversing the recordset may take longer, since the data comes through the backend server.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;h3 style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #b21f24; font-family: Georgia, Times, serif; font-size: 28px; font-weight: normal; line-height: 1.4em; margin: 0px 0px 10px; padding: 0px 0px 7px;&quot;&gt;
&lt;span style=&quot;font-size: medium; margin: 0px; padding: 0px;&quot;&gt;Type 4 JDBC Driver&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-decoration: underline;&quot;&gt;&lt;b style=&quot;margin: 0px; padding: 0px;&quot;&gt;Native-protocol/all-Java driver&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;The Type 4 uses java networking libraries to communicate directly with the database server.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;&quot; height=&quot;228&quot; src=&quot;http://www.jdbc-tutorial.com/images/jdbc-type4-driver.JPG&quot; style=&quot;border: 1px solid rgb(255, 255, 255); margin: 0px; padding: 5px;&quot; width=&quot;172&quot; /&gt;&lt;/div&gt;
&lt;span class=&quot;style17&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Type 4: Native-protocol/all-Java driver&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;div class=&quot;style18&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;
Advantage&lt;/div&gt;
&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;1. The major benefit of using a type 4 jdbc drivers are that they are completely written in Java to achieve platform independence and eliminate deployment administration issues. It is most suitable for the web.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;2. Number of translation layers is very less i.e. type 4 JDBC drivers don’t have to translate database requests to ODBC or a native connectivity interface or to pass the request on to another server, performance is typically quite good.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;3. You don’t need to install special software on the client or server. Further, these drivers can be downloaded dynamically.&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span class=&quot;style18&quot; style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot;&gt;Disadvantage&lt;/span&gt;&lt;br style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px; margin: 0px; padding: 0px;&quot; /&gt;&lt;span style=&quot;color: #282828; font-family: Verdana, Geneva, sans-serif; font-size: 14px; line-height: 23px;&quot;&gt;With type 4 drivers, the user needs a different driver for each database.&lt;/span&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/1216407085016075743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/types-of-jdbc-drivers-in-java_5786.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/1216407085016075743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/1216407085016075743'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/types-of-jdbc-drivers-in-java_5786.html' title='Types of JDBC Drivers in JAVA'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6372457994650349888.post-6795653096352129119</id><published>2012-07-19T10:25:00.001-07:00</published><updated>2012-07-19T23:43:52.490-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="corejava tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="hibernate tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="java students"/><category scheme="http://www.blogger.com/atom/ns#" term="jdbc tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="jsp tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="odia java students"/><category scheme="http://www.blogger.com/atom/ns#" term="odia students"/><category scheme="http://www.blogger.com/atom/ns#" term="orissa students"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="spring tutorials"/><category scheme="http://www.blogger.com/atom/ns#" term="struts tutorials"/><title type='text'>Java Students - Odisha Students - Orissa Students</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
This is the portal created by Java Students learned JAVA from various institutions like SATHYA TECHNOLOGIES, NARESH I TECHNOLOGIES, etc&lt;br /&gt;
&lt;br /&gt;
Here you will get tutorials, interview questions and downloads about the followings :&lt;br /&gt;
&lt;br /&gt;
CORE JAVA&lt;br /&gt;
JDBC&lt;br /&gt;
SERVLET&lt;br /&gt;
JSP&lt;br /&gt;
HIBERNATE&lt;br /&gt;
STRUTS&lt;br /&gt;
SPRING&lt;br /&gt;
J2EE&lt;br /&gt;
EJB&lt;br /&gt;
SERVER&lt;br /&gt;
And many more&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.java.odiajobs.com/feeds/6795653096352129119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.java.odiajobs.com/2012/07/java-students-odisha-students-orissa.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/6795653096352129119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6372457994650349888/posts/default/6795653096352129119'/><link rel='alternate' type='text/html' href='http://www.java.odiajobs.com/2012/07/java-students-odisha-students-orissa.html' title='Java Students - Odisha Students - Orissa Students'/><author><name>Prasant</name><uri>http://www.blogger.com/profile/08698467695078068682</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>1</thr:total></entry></feed>