<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>NIIT Indrapuri Bhopal</title><description></description><managingEditor>noreply@blogger.com (Dilip Bari)</managingEditor><pubDate>Sun, 30 Aug 2015 22:44:54 -0700</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">169</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://niitindrapuri.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><copyright>Dilip Bari</copyright><itunes:keywords>NIIT,Indrapuri,Struts,C,language,Java</itunes:keywords><itunes:subtitle>C,C++,JAVA,.Net,Oracle,</itunes:subtitle><itunes:category text="Education"><itunes:category text="Training"/></itunes:category><itunes:author>Dilip Bari</itunes:author><itunes:owner><itunes:email>noreply@blogger.com</itunes:email><itunes:name>Dilip Bari</itunes:name></itunes:owner><item><title>Caching:Varying the Output Cache By Parameter in ASP.NET</title><link>http://niitindrapuri.blogspot.com/2013/10/cachingvarying-output-cache-by.html</link><category>ASP.Net</category><category>Caching</category><pubDate>Tue, 22 Oct 2013 23:41:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-2452332020376829704</guid><description>&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;OutPutCacheByPrameter.aspx&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="background-color: #ffff00"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeFile=&amp;quot;OutPutCacheByPrameter.aspx.cs&amp;quot; Inherits=&amp;quot;OutPutCacheByPrameter&amp;quot; %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #800000"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: #ff0000"&gt;html&lt;/span&gt; &lt;span style="color: #ff0000"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;html&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;head&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Caching; Varying the Output Cache By Parameter&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;form&lt;/span&gt; &lt;span style="color: #ff0000"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;form1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:GridView&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;grdEmployee&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;AutoGenerateColumns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;False&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                &lt;span style="color: #ff0000"&gt;ShowHeader&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;False&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Columns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:HyperLinkField&lt;/span&gt; &lt;span style="color: #ff0000"&gt;DataTextField&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;EmpName&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;DataNavigateUrlFields&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;EmpId&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                &lt;span style="color: #ff0000"&gt;DataNavigateUrlFormatString&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;EmployeeDetails.aspx?EmpId={0}&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Columns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:GridView&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;form&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Code File:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Configuration;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Data;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Security;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Xml.Linq;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Data.SqlClient;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; OutPutCacheByPrameter : System.Web.UI.Page&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SqlConnection con;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SqlCommand cmd = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlCommand();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    DataSet ds = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DataSet();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SqlDataAdapter da;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        BindData();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; BindData()&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Appcon = ConfigurationManager.ConnectionStrings[&lt;span style="color: #006080"&gt;&amp;quot;ConnectionStr&amp;quot;&lt;/span&gt;].ConnectionString;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        con = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlConnection(Appcon);&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        cmd.CommandText = &lt;span style="color: #006080"&gt;&amp;quot;Select * from Employees&amp;quot;&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        da = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlDataAdapter(cmd);&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        cmd.Connection = con;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        con.Open();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        cmd.ExecuteNonQuery();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        da.Fill(ds);&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (ds.Tables[0].Rows.Count &amp;gt; 0)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            grdEmployee.DataSource = ds;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            grdEmployee.DataBind();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;web.config:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;connectionStrings&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;add name=&amp;quot;ConnectionStr&amp;quot; connectionString=&amp;quot;Data Source=&lt;span style="color: #ff0000"&gt;.&lt;/span&gt;;Initial Catalog=asp;User Id=sa;Password=niitbpl123&amp;quot;/&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;/connectionStrings&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Code Behind File:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Configuration;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Data;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Security;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Xml.Linq;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Data.SqlClient;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; OutPutCacheByPrameter : System.Web.UI.Page&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SqlConnection con;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SqlCommand cmd = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlCommand();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    DataSet ds = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DataSet();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SqlDataAdapter da;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        BindData();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; BindData()&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Appcon = ConfigurationManager.ConnectionStrings[&lt;span style="color: #006080"&gt;&amp;quot;ConnectionStr&amp;quot;&lt;/span&gt;].ConnectionString;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        con = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlConnection(Appcon);&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        cmd.CommandText = &lt;span style="color: #006080"&gt;&amp;quot;Select * from Employees&amp;quot;&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        da = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlDataAdapter(cmd);&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        cmd.Connection = con;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        con.Open();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        cmd.ExecuteNonQuery();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        da.Fill(ds);&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (ds.Tables[0].Rows.Count &amp;gt; 0)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            grdEmployee.DataSource = ds;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            grdEmployee.DataBind();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;EmployeeDetails.aspx&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="background-color: #ffff00"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeFile=&amp;quot;EmployeeDetails.aspx.cs&amp;quot; Inherits=&amp;quot;EmployeeDetails&amp;quot; %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="background-color: #ffff00"&gt;&amp;lt;%@ OutputCache Duration=&amp;quot;5&amp;quot; VaryByParam=&amp;quot;none&amp;quot; %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #800000"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: #ff0000"&gt;html&lt;/span&gt; &lt;span style="color: #ff0000"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;html&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;head&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;CACHING: Output Cache By Parameter: Employee Details&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;form&lt;/span&gt; &lt;span style="color: #ff0000"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;form1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Label&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;lblTime&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Label&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;br&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;br&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:DetailsView&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;dtlEmployee&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:DetailsView&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;form&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Code Behind File:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Configuration;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Data;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Security;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Xml.Linq;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Data.SqlClient;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; EmployeeDetails : System.Web.UI.Page&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SqlConnection con;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SqlCommand cmd = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlCommand();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    DataSet ds = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DataSet();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    SqlDataAdapter da;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        lblTime.Text = System.DateTime.Now.ToString();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        BindData();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; BindData()&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Appcon = ConfigurationManager.ConnectionStrings[&lt;span style="color: #006080"&gt;&amp;quot;ConnectionStr&amp;quot;&lt;/span&gt;].ConnectionString;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        con = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlConnection(Appcon);&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        cmd.CommandText = &lt;span style="color: #006080"&gt;&amp;quot;Select * from Employees where EmpId=&amp;quot;&lt;/span&gt; + Request.Params[0].ToString();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        da = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SqlDataAdapter(cmd);&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        cmd.Connection = con;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        con.Open();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        cmd.ExecuteNonQuery();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        da.Fill(ds);&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (ds.Tables[0].Rows.Count &amp;gt; 0)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            dtlEmployee.DataSource = ds;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;            dtlEmployee.DataBind();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Output:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-VR581eYTh-o/UmdvlbWhV8I/AAAAAAAADW8/EKLkvqufiMM/s1600-h/1a%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="1a" border="0" alt="1a" src="http://lh6.ggpht.com/-G2skm6bKnPc/UmdvmjJg_NI/AAAAAAAADXE/irXeu1DYKlg/1a_thumb.jpg?imgmax=800" width="244" height="182" /&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/-INTYUc-9gss/UmdvoyZo6rI/AAAAAAAADXM/AIH4QhW4zSo/s1600-h/1b%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="1b" border="0" alt="1b" src="http://lh5.ggpht.com/-QryeieUUfGw/UmdvqLNZ8GI/AAAAAAAADXU/UAvDgBqb3pk/1b_thumb.jpg?imgmax=800" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh6.ggpht.com/-G2skm6bKnPc/UmdvmjJg_NI/AAAAAAAADXE/irXeu1DYKlg/s72-c/1a_thumb.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>What is Caching in ASP.NET.</title><link>http://niitindrapuri.blogspot.com/2013/10/what-is-caching-in-aspnet.html</link><category>ASP.Net</category><category>Caching</category><pubDate>Tue, 22 Oct 2013 23:27:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-6105913543863701722</guid><description>&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;What is Caching?&lt;/font&gt;&lt;/strong&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;&lt;font size="3"&gt;Caching is a technique of persisting the data in memory for immediate access to requesting program calls. Many in the developer community consider caching as one of the features available to improve performance of Web applications.     &lt;br /&gt;&lt;strong&gt;Why Caching?&lt;/strong&gt;&lt;/font&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;&lt;font size="3"&gt;Consider a page that has list of Employee name, contact numbers and mail-Ids of existing employees of a company on an intranet accessible by all employees. This is very useful information that is available throughout the company and could also be one of the most accessed pages. The functionality of adding, updating or deleting is usually less intensive compared to more transaction-based systems like Purchase ordering, Voucher creation etc. Now in a normal scenario the process of querying database for each request is not cost-effective in terms of server resources, hence is lot better to cache or persist the data to avoid this costly loss of resources.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;The .NET Advantage&lt;/font&gt;&lt;/strong&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;&lt;font size="3"&gt;ASP.NET provides the flexibility in terms of caching at different levels.     &lt;br /&gt;&lt;strong&gt;1. Page Level Output Caching&lt;/strong&gt;&lt;/font&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;&lt;font size="3"&gt;This is at the page level and one of the easiest means for caching pages. This requires one to specify Duration of cache and Attribute of caching.     &lt;br /&gt;Syntax: &amp;lt;%@ OutputCache Duration=&amp;quot;60&amp;quot; VaryByParam=&amp;quot;none&amp;quot; %&amp;gt;      &lt;br /&gt;The above syntax specifies that the page be cached for duration of 60 seconds and the value &amp;quot;none&amp;quot; for VaryByParam* attribute makes sure that there is a single cached page available for this duration specified.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;2. Fragment Caching&lt;/font&gt;&lt;/strong&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;&lt;font size="3"&gt;Even though this definition refers to caching portion/s of page, it is actually caching a user control that can be used in a base web form page. In theory, if you have used include files in the traditional ASP model then this caching model is like caching these include files separately. In ASP.NET more often this is done through User Controls. Initially even though one feels a bit misleading, this is a significant technique that can be used especially when implementing &amp;quot;n&amp;quot; instances of the controls in various *.aspx pages. We can use the same syntax that we declared for the page level caching as shown above, but the power of fragment caching comes from the attribute &amp;quot;VaryByControl&amp;quot;. Using this attribute one can cache a user control based on the properties exposed.     &lt;br /&gt;Syntax: &amp;lt;%@ OutputCache Duration=&amp;quot;60&amp;quot; VaryByControl=&amp;quot;DepartmentId&amp;quot; %&amp;gt;      &lt;br /&gt;The above syntax when declared within an *.ascx file ensures that the control is cached for 60 seconds and the number of representations of cached control is dependant on the property &amp;quot;DepartmentId&amp;quot; declared in the control.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;3. Application Level Caching&lt;/font&gt;&lt;/strong&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;&lt;font size="3"&gt;With Page level Output caching one cannot cache objects between pages within an application. Fragment caching is great in that sense but has limitations by using user controls as means to do. We can use the Cache object programmatically to take advantage of caching objects and share the same between pages. Further the availability of different overloaded methods gives a greater flexibility for our Cache policy like Timespan, Absolute expiration etc. But one of the biggest takes is the CacheDependancy. This means that one can create a cache and associate with it a dependency that is either another cache key or a file.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;Program 1: VarByParam=”none” &lt;/font&gt;&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;lt;%@ Page Language=&lt;span style="color: #006080"&gt;&amp;quot;C#&amp;quot;&lt;/span&gt; AutoEventWireup=&lt;span style="color: #006080"&gt;&amp;quot;true&amp;quot;&lt;/span&gt;  CodeFile=&lt;span style="color: #006080"&gt;&amp;quot;Default.aspx.cs&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Inherits&lt;/span&gt;=&lt;span style="color: #006080"&gt;&amp;quot;_Default&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;lt;%@ OutputCache Duration=&lt;span style="color: #006080"&gt;&amp;quot;5&amp;quot;&lt;/span&gt; VaryByParam=&lt;span style="color: #006080"&gt;&amp;quot;none&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;lt;!DOCTYPE html &lt;span style="color: #0000ff"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: #006080"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;&lt;/span&gt; &lt;span style="color: #006080"&gt;&amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;lt;html xmlns=&lt;span style="color: #006080"&gt;&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;lt;head runat=&lt;span style="color: #006080"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &amp;lt;title&amp;gt;CACHING: Page Output Caching&amp;lt;/title&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;lt;/head&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;lt;body&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &amp;lt;form id=&lt;span style="color: #006080"&gt;&amp;quot;form1&amp;quot;&lt;/span&gt; runat=&lt;span style="color: #006080"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &amp;lt;div&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;       &amp;lt;asp:Label ID=&lt;span style="color: #006080"&gt;&amp;quot;lblTime&amp;quot;&lt;/span&gt; runat=&lt;span style="color: #006080"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &amp;lt;asp:TextBox ID=&lt;span style="color: #006080"&gt;&amp;quot;TextBox1&amp;quot;&lt;/span&gt; runat=&lt;span style="color: #006080"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &amp;lt;asp:Button ID=&lt;span style="color: #006080"&gt;&amp;quot;Button1&amp;quot;&lt;/span&gt; runat=&lt;span style="color: #006080"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; onclick=&lt;span style="color: #006080"&gt;&amp;quot;Button1_Click&amp;quot;&lt;/span&gt; Text=&lt;span style="color: #006080"&gt;&amp;quot;Button&amp;quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &amp;lt;/form&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;lt;/body&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;Code Behind file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Security;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Xml.Linq;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; _Default : System.Web.UI.Page &lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;       &lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Button1_Click(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        lblTime.Text = DateTime.Now.ToString();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-rTf-cN4ZX3o/UmdsCazWGYI/AAAAAAAADVY/C5UdNROQ9Ys/s1600-h/1%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="1" border="0" alt="1" src="http://lh3.ggpht.com/-J4rKlQiKnMo/UmdsDojxHEI/AAAAAAAADVg/YYHDZ2ZhfMc/1_thumb%25255B1%25255D.jpg?imgmax=800" width="244" height="197" /&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/-GAjZiBUGZvk/UmdsFTlqp1I/AAAAAAAADVo/YTbiqb3Ryn8/s1600-h/2%25255B3%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2" border="0" alt="2" src="http://lh4.ggpht.com/-YB1cJNR4Z28/UmdsG7jhQ1I/AAAAAAAADVw/SXkPgw7IvqE/2_thumb%25255B1%25255D.jpg?imgmax=800" width="244" height="203" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;Program 2: VarByParam=”TextBox1” &lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="background-color: #ffff00"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeFile=&amp;quot;Default2.aspx.cs&amp;quot; Inherits=&amp;quot;Default2&amp;quot; %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="background-color: #ffff00"&gt;&amp;lt;%@ OutputCache Duration=&amp;quot;8&amp;quot; VaryByParam=&amp;quot;TextBox1&amp;quot; %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #800000"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: #ff0000"&gt;html&lt;/span&gt; &lt;span style="color: #ff0000"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;html&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;head&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Untitled Page&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;form&lt;/span&gt; &lt;span style="color: #ff0000"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;form1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Label&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;lblTime&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Label&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:TextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TextBox1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:TextBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Button&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;onclick&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button1_Click&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;form&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;Code Behind file:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.Security;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Xml.Linq;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Default2 : System.Web.UI.Page&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Button1_Click(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;        lblTime.Text = DateTime.Now.ToString();&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;Output:&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;Enter the Name in textbox and click the button yon will see the time&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;a href="http://lh5.ggpht.com/-uvcfTcDkeqE/UmdsIGQpRUI/AAAAAAAADV4/KeIL0McsgrI/s1600-h/3%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="3" border="0" alt="3" src="http://lh5.ggpht.com/-wGvXCznklmQ/UmdsJHz9eAI/AAAAAAAADWA/m-51ckUAPj8/3_thumb.jpg?imgmax=800" width="244" height="157" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-swUGyMgMVks/UmdsLxFjkOI/AAAAAAAADWI/0uW_ww0gPEA/s1600-h/4%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="4" border="0" alt="4" src="http://lh5.ggpht.com/-_lmMwUffdhM/UmdsM7PSQYI/AAAAAAAADWQ/p4FQGTA2nZ8/4_thumb.jpg?imgmax=800" width="244" height="160" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-PR9X3f8KuUc/UmdsOTF7J5I/AAAAAAAADWY/MmAiUExPcX4/s1600-h/5%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="5" border="0" alt="5" src="http://lh6.ggpht.com/-mFpXsnBZMzA/UmdsQGR2w1I/AAAAAAAADWg/rAGAH26RWhM/5_thumb.jpg?imgmax=800" width="244" height="202" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="4"&gt;&lt;strong&gt;Note: Wile changing the name in textbox time will change&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-CLbaueFeKrQ/UmdsRFRc2UI/AAAAAAAADWo/qRR97Y0zh_Q/s1600-h/6%25255B2%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="6" border="0" alt="6" src="http://lh6.ggpht.com/-_FUqP8OQJts/UmdsSULV1fI/AAAAAAAADWw/plYQDvZKXBw/6_thumb.jpg?imgmax=800" width="244" height="179" /&gt;&lt;/a&gt;&lt;/p&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh3.ggpht.com/-J4rKlQiKnMo/UmdsDojxHEI/AAAAAAAADVg/YYHDZ2ZhfMc/s72-c/1_thumb%25255B1%25255D.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>While selecting combobox value display the data from database using Ajax and jsp</title><link>http://niitindrapuri.blogspot.com/2013/08/while-selecting-combobox-value-display.html</link><category>Ajax &amp; Json</category><category>Java Script</category><category>JSP</category><category>Netbeans</category><pubDate>Mon, 12 Aug 2013 02:32:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-376705563356729417</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;&lt;u&gt;First Create table in database&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;create table studentinfo     &lt;br /&gt;(      &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name varchar(20),      &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; branch varchar(20),      &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; year varchar(4),      &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; email varchar(20)      &lt;br /&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;     &lt;br /&gt;insert into studentinfo values('Satyam','CSE','2013','satyam@gmail.com')      &lt;br /&gt;insert into studentinfo values('Anand','CSE','2013','anand@gmail.com')&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;Now create home.jsp page&lt;/span&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%@page contentType="text/html" pageEncoding="UTF-8"%&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: maroon;"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: red;"&gt;HTML&lt;/span&gt; &lt;span style="color: red;"&gt;PUBLIC&lt;/span&gt; &lt;span style="color: blue;"&gt;"-//W3C//DTD HTML 4.01 Transitional//EN"&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;"http://www.w3.org/TR/html4/loose.dtd"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;html&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;head&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;title&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;Jsp Page&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;title&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;script&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; &lt;span style="color: blue;"&gt;function&lt;/span&gt; showuser(str)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt; &lt;span style="color: blue;"&gt;var&lt;/span&gt; xreq;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt;(str==&lt;span style="color: #006080;"&gt;""&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt; document.getElementById(&lt;span style="color: #006080;"&gt;"showtext"&lt;/span&gt;).innerHTML=&lt;span style="color: #006080;"&gt;"Plase Select Name"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt; &lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt;(window.XMLHttpRequest)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt; xreq=&lt;span style="color: blue;"&gt;new&lt;/span&gt; XMLHttpRequest();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt; &lt;span style="color: blue;"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt; xreq=&lt;span style="color: blue;"&gt;new&lt;/span&gt; ActiveXObject(&lt;span style="color: #006080;"&gt;"Microsoft.XMLHTTP"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt; xreq.onreadystatechange=&lt;span style="color: blue;"&gt;function&lt;/span&gt; ()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt; &lt;span style="color: blue;"&gt;if&lt;/span&gt;( (xreq.readyState==4) &amp;amp;&amp;amp; (xreq.status==200) )&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt; document.getElementById(&lt;span style="color: #006080;"&gt;"showtext"&lt;/span&gt;).innerHTML=xreq.responseText;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt; xreq.open(&lt;span style="color: #006080;"&gt;"get"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"getuser.jsp?q="&lt;/span&gt;+str,&lt;span style="color: #006080;"&gt;"true"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt; xreq.send();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt;  30:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;script&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;head&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;body&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;form&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;select&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;name&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="user"&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;onchange&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="showuser(this.value)"&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;value&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;=""&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;Select Student name....&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;value&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="Satyam"&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;Satyam&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;value&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="Anand"&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;Anand&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;value&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="Shruti"&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;Shruti&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;value&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="Diksha"&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;Diksha&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;value&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="Shweta"&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;Shweta&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;option&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;select&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;form&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;br&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;div&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;id&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="showtext"&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;The response will come here&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;div&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;body&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;html&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;span style="font-size: medium;"&gt;Now create one more jsp page&lt;/span&gt;&lt;/div&gt;&lt;u style="font-size: large;"&gt;getuser.jsp&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%@page contentType="text/html" pageEncoding="UTF-8"%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-style: none; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;DOCTYPE&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;HTML&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;PUBLIC&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;"-//W3C//DTD HTML 4.01 Transitional//EN"&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;"http://www.w3.org/TR/html4/loose.dtd"&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%@page import="java.text.SimpleDateFormat"%&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%@page import="java.util.*,java.sql.*,java.io.*" %&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%@page import="javax.servlet.*" %&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%@page import="javax.servlet.http.*" %&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;html&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;head&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;meta&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;http-equiv&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="Content-Type"&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;content&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="text/html; charset=UTF-8"&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;title&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;jsp Page&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;title&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;head&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;body&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; ! Connection con; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;span style="background-color: yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; ! Statement s; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;span style="background-color: yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; ! ResultSet rs; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;span style="background-color: yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt;  String name=request.getParameter(&lt;span style="color: #006080;"&gt;"q"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; &lt;span style="color: blue;"&gt;try&lt;/span&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt; Class.forName(&lt;span style="color: #006080;"&gt;"com.microsoft.sqlserver.jdbc.SQLServerDriver"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt; con=DriverManager.getConnection(&lt;span style="color: #006080;"&gt;"jdbc:sqlserver://localhost:1433;databaseName=j2ee"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"sa"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"niitbpl123"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt; s=con.createStatement();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt; rs=s.executeQuery(&lt;span style="color: #006080;"&gt;"select * from studentinfo where name='"&lt;/span&gt;+name+&lt;span style="color: #006080;"&gt;"'"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt; }&lt;span style="color: blue;"&gt;catch&lt;/span&gt;(Exception e){ e.printStackTrace(); }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;span style="background-color: yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;div&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;id&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;="dtl_table"&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;table&lt;/span&gt;&lt;span style="color: black; font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;border&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;='3'&lt;/span&gt;&lt;span style="color: black; font-size: 8pt; line-height: 12pt;"&gt; &lt;/span&gt;&lt;span style="color: red; font-size: 8pt; line-height: 12pt;"&gt;cellpadding&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;='5'&lt;/span&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: red;"&gt;cellspacing&lt;/span&gt;&lt;span style="color: blue;"&gt;='2'&lt;/span&gt; &lt;span style="color: red;"&gt;width&lt;/span&gt;&lt;span style="color: blue;"&gt;="400px"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt; &lt;span style="color: red;"&gt;bgcolor&lt;/span&gt;&lt;span style="color: blue;"&gt;="66FF00"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;th&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Name&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;th&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;th&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Branch&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;th&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;th&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Year&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;th&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;th&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Email id&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;th&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt;  &lt;span style="color: blue;"&gt;while&lt;/span&gt;(rs.next())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; { &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;span style="background-color: yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;td&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;span id="lnum1" style="color: #606060; font-size: 8pt; line-height: 12pt;"&gt;1:&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; = rs.getString(1)&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;td&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;td&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;span id="lnum1" style="color: #606060; font-size: 8pt; line-height: 12pt;"&gt;1:&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; = rs.getString(2)&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;td&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;td&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;span id="lnum1" style="color: #606060; font-size: 8pt; line-height: 12pt;"&gt;1:&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; = rs.getString(3)&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;td&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;td&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;span id="lnum1" style="color: #606060; font-size: 8pt; line-height: 12pt;"&gt;1:&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; = rs.getString(4)&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;td&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="background-color: yellow; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;%&lt;/span&gt;&lt;/div&gt;&lt;pre style="background-color: #f4f4f4; border-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt;  } &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;span style="background-color: yellow;"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;tr&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;table&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;div&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;body&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-size: 8pt; line-height: 12pt;"&gt;html&lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;u&gt;&lt;span style="font-size: medium;"&gt;Output:&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/-hCSBi-7visM/Ugirt7KTJmI/AAAAAAAADRA/1kx6F2iZnQU/s1600-h/1%25255B2%25255D.jpg"&gt;&lt;img alt="1" border="0" height="154" src="http://lh6.ggpht.com/--zcyDhelImA/Ugiru9YSJBI/AAAAAAAADRI/u5WBb0uwNWU/1_thumb.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="1" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-p7PeWOsX8aM/UgirvoYXM3I/AAAAAAAADRQ/1t2PZC6DP_Y/s1600-h/2%25255B2%25255D.jpg"&gt;&lt;img alt="2" border="0" height="154" src="http://lh3.ggpht.com/--N77D0j9O7s/UgirwqmEwRI/AAAAAAAADRY/is7GHsNhA-o/2_thumb.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="2" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-2tVXPpyiLdU/UgirxbjE0MI/AAAAAAAADRg/xxJEc2LuKEo/s1600-h/3%25255B2%25255D.jpg"&gt;&lt;img alt="3" border="0" height="154" src="http://lh4.ggpht.com/-3P0qRkKRSE4/UgiryeRGo9I/AAAAAAAADRo/yBzfluz3_nY/3_thumb.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="3" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-lbcW58IDjk4/UgirzIfMsMI/AAAAAAAADRw/1a3z6bEI_SM/s1600-h/4%25255B2%25255D.jpg"&gt;&lt;img alt="4" border="0" height="154" src="http://lh3.ggpht.com/-Ms2V0__Aehc/Ugirz_OPYKI/AAAAAAAADR4/1mbrQ1RpS7w/4_thumb.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="4" width="244" /&gt;&lt;/a&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh6.ggpht.com/--zcyDhelImA/Ugiru9YSJBI/AAAAAAAADRI/u5WBb0uwNWU/s72-c/1_thumb.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Check user name available or already exists in database while creating Registration form in jsp using AJAX like gmail</title><link>http://niitindrapuri.blogspot.com/2013/08/check-user-name-available-or-already.html</link><category>Ajax &amp; Json</category><category>Java Script</category><category>JSP</category><pubDate>Mon, 12 Aug 2013 02:10:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-9136553443073369494</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-size: medium;"&gt;First Create&amp;nbsp; login table in sql server &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;create table login      &lt;br /&gt;(       &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name varchar(20),       &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; password varchar(20)       &lt;br /&gt;)       &lt;br /&gt;insert into login values('dilip','niit')&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;Now Create jsp page:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;&lt;u&gt;ajaxcheck.jsp&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;%@page contentType=&lt;span style="color: #006080;"&gt;"text/html"&lt;/span&gt; pageEncoding=&lt;span style="color: #006080;"&gt;"UTF-8"&lt;/span&gt;%&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;!DOCTYPE HTML PUBLIC &lt;span style="color: #006080;"&gt;"-//W3C//DTD HTML 4.01 Transitional//EN"&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;   &lt;span style="color: #006080;"&gt;"http://www.w3.org/TR/html4/loose.dtd"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    &amp;lt;head&amp;gt;&amp;lt;title&amp;gt;welcome&amp;lt;/title&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    &amp;lt;script language=&lt;span style="color: #006080;"&gt;"javascript"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        reqObj=&lt;span style="color: blue;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        &lt;span style="color: blue;"&gt;function&lt;/span&gt; varify(){&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            document.getElementById(&lt;span style="color: #006080;"&gt;"res"&lt;/span&gt;).innerHTML=&lt;span style="color: #006080;"&gt;"Checking"&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            &lt;span style="color: blue;"&gt;if&lt;/span&gt;(window.XMLHttpRequest){&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                reqObj=&lt;span style="color: blue;"&gt;new&lt;/span&gt; XMLHttpRequest();&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            }&lt;span style="color: blue;"&gt;else&lt;/span&gt; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;                reqObj=&lt;span style="color: blue;"&gt;new&lt;/span&gt; ActiveXObject(&lt;span style="color: #006080;"&gt;"Microsoft.XMLHTTP"&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            reqObj.onreadystatechange=process;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            reqObj.open(&lt;span style="color: #006080;"&gt;"POST"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"usercheck.jsp?id="&lt;/span&gt;+document.getElementById(&lt;span style="color: #006080;"&gt;"username"&lt;/span&gt;).value,&lt;span style="color: blue;"&gt;true&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            reqObj.send(&lt;span style="color: blue;"&gt;null&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;  &lt;/span&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;function&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt; process(){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;if&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;(reqObj.readyState==4){&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;document.getElementById(&lt;/span&gt;&lt;span style="color: #006080; font-size: 8pt; line-height: 12pt;"&gt;"res"&lt;/span&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;).innerHTML=reqObj.responseText;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;            }&lt;/pre&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        &amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    &amp;lt;/head&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    &amp;lt;body&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        &amp;lt;h1&amp;gt;welcome to &lt;span style="color: blue;"&gt;this&lt;/span&gt; application&amp;lt;/h1&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    &amp;lt;form&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        User Name&amp;lt;input type=&lt;span style="color: #006080;"&gt;"text"&lt;/span&gt; name=&lt;span style="color: #006080;"&gt;"t1"&lt;/span&gt; id=&lt;span style="color: #006080;"&gt;"username"&lt;/span&gt; onblur=&lt;span style="color: #006080;"&gt;"varify();"&lt;/span&gt;&amp;gt;&amp;lt;span id=&lt;span style="color: #006080;"&gt;"res"&lt;/span&gt;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;br/&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        First Name&amp;lt;input type=&lt;span style="color: #006080;"&gt;"text"&lt;/span&gt; name=&lt;span style="color: #006080;"&gt;"t2"&lt;/span&gt; &amp;gt;&amp;lt;br/&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        Last Name&amp;lt;input type=&lt;span style="color: #006080;"&gt;"text"&lt;/span&gt; name=&lt;span style="color: #006080;"&gt;"t3"&lt;/span&gt;&amp;gt;&amp;lt;br/&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        Email&amp;lt;input type=&lt;span style="color: #006080;"&gt;"text"&lt;/span&gt; name=&lt;span style="color: #006080;"&gt;"t4"&lt;/span&gt;&amp;gt;&amp;lt;br/&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        Password&amp;lt;input type=&lt;span style="color: #006080;"&gt;"password"&lt;/span&gt; name=&lt;span style="color: #006080;"&gt;"t5"&lt;/span&gt;&amp;gt;&amp;lt;br/&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        &amp;lt;input type =&lt;span style="color: #006080;"&gt;"submit"&lt;/span&gt; value=&lt;span style="color: #006080;"&gt;"Press"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    &amp;lt;/form&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    &amp;lt;/body&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;&lt;u&gt;Now create usercheck.jsp&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;%@page contentType=&lt;span style="color: #006080;"&gt;"text/html"&lt;/span&gt; pageEncoding=&lt;span style="color: #006080;"&gt;"UTF-8"&lt;/span&gt;%&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;!DOCTYPE HTML PUBLIC &lt;span style="color: #006080;"&gt;"-//W3C//DTD HTML 4.01 Transitional//EN"&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;   &lt;span style="color: #006080;"&gt;"http://www.w3.org/TR/html4/loose.dtd"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;%@page &lt;span style="color: blue;"&gt;import&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"java.util.*,java.sql.*,java.io.*"&lt;/span&gt; %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;%@page &lt;span style="color: blue;"&gt;import&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"javax.servlet.*"&lt;/span&gt; %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;%! Connection con; %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;%! Statement s; %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;!--CRLF--&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;%! ResultSet rs; %&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;%&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;String user=request.getParameter(&lt;span style="color: #006080;"&gt;"id"&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;try&lt;/span&gt;{&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;Class.forName(&lt;span style="color: #006080;"&gt;"com.microsoft.sqlserver.jdbc.SQLServerDriver"&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;con=DriverManager.getConnection(&lt;span style="color: #006080;"&gt;"jdbc:sqlserver://localhost:1433;databaseName=j2ee"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"sa"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"niitbpl123"&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;s=con.createStatement();&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;rs=s.executeQuery(&lt;span style="color: #006080;"&gt;"select name from login where name='"&lt;/span&gt;+user+&lt;span style="color: #006080;"&gt;"'"&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt;(rs.next())&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        Thread.sleep(1000);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        &lt;span style="color: blue;"&gt;if&lt;/span&gt;(user.equals(rs.getString(1))&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;%&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        &amp;lt;font color=&lt;span style="color: #006080;"&gt;"red"&lt;/span&gt; &amp;gt;&amp;lt;strong&amp;gt;User already exists&amp;lt;/strong&amp;gt;&amp;lt;/font&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        &amp;lt;%&lt;/pre&gt;&lt;br /&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        }&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    }&lt;/pre&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span style="color: blue;"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    {&lt;/pre&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;        Thread.sleep(1000);&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    %&amp;gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&amp;lt;font color=&lt;span style="color: #006080;"&gt;"green"&lt;/span&gt; &amp;gt;&amp;lt;strong&amp;gt;User  name available&amp;lt;/strong&amp;gt;&amp;lt;/font&amp;gt;&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    &amp;lt;%&lt;/pre&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;    }&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt; }&lt;/pre&gt;&lt;span style="color: blue; font-size: 8pt; line-height: 12pt;"&gt;catch&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;(Exception e)&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;{&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;&amp;nbsp; &amp;nbsp; e.printStackTrace();&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: white; font-size: 8pt; line-height: 12pt;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 8pt; line-height: 12pt;"&gt;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;u&gt;&lt;span style="font-size: medium;"&gt;Output:&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-EtmZP2EM41o/UgimbCsMMqI/AAAAAAAADP4/K26RDuQNGbo/s1600-h/1%25255B2%25255D.jpg"&gt;&lt;img alt="1" border="0" height="154" src="http://lh3.ggpht.com/-x3UCG6FCaT4/UgimcO_i3FI/AAAAAAAADQA/rbG7EDAWzwk/1_thumb.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="1" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-n5ziHxyrZME/Ugimc9l13KI/AAAAAAAADQI/22Bb21pPag8/s1600-h/2%25255B2%25255D.jpg"&gt;&lt;img alt="2" border="0" height="154" src="http://lh6.ggpht.com/-e34zj1gV2TY/UgimdgOXWTI/AAAAAAAADQQ/3oNrbBwr97c/2_thumb.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="2" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-ouDsTsZfhnw/UgimeiciYBI/AAAAAAAADQY/bpT1b8ncBjk/s1600-h/3%25255B2%25255D.jpg"&gt;&lt;img alt="3" border="0" height="154" src="http://lh3.ggpht.com/-airJCj94G0Y/UgimfdxFxsI/AAAAAAAADQg/qUcdHjAZ-WU/3_thumb.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="3" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-QJox-Mn7jl0/UgimgJdZX-I/AAAAAAAADQo/LTmZpKM36m8/s1600-h/4%25255B2%25255D.jpg"&gt;&lt;img alt="4" border="0" height="154" src="http://lh4.ggpht.com/-ZFy9Il_wneI/UgimhPwjriI/AAAAAAAADQw/bIgksipPhf4/4_thumb.jpg?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="4" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:51ba931b-dd67-4033-8e1e-3b543fadc730" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ajax+%26+java+script" rel="tag"&gt;ajax &amp;amp; java script&lt;/a&gt;,&lt;a href="http://technorati.com/tags/jsp" rel="tag"&gt;jsp&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh3.ggpht.com/-x3UCG6FCaT4/UgimcO_i3FI/AAAAAAAADQA/rbG7EDAWzwk/s72-c/1_thumb.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>How to use JSON(JavaScript Object Notation) in NetBeans</title><link>http://niitindrapuri.blogspot.com/2013/08/how-to-use-jsonjavascript-object.html</link><category>Ajax &amp; Json</category><category>JSP</category><pubDate>Mon, 12 Aug 2013 01:17:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-9086388490745722958</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;div&gt;&lt;pre class="csharpcode"&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;&lt;u&gt;JSON:&lt;/u&gt;&lt;/strong&gt; JavaScript Object Notation.&lt;br /&gt;&lt;br /&gt;JSON is syntax &lt;span class="kwrd"&gt;for&lt;/span&gt; storing and exchanging text information. Much like XML.&lt;br /&gt;&lt;br /&gt;JSON is smaller than XML, and faster and easier to parse.&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-size: medium;"&gt;First Create simple jsp page in netbeans:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;strong style="font-size: large;"&gt;&lt;u&gt;index.jsp&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="asp"&gt;&amp;lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"&lt;br /&gt;    pageEncoding="ISO-8859-1"%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;PUBLIC&lt;/span&gt; &lt;span class="kwrd"&gt;"-//W3C//DTD HTML 4.01 Transitional//EN"&lt;/span&gt; &lt;span class="kwrd"&gt;"http://www.w3.org/TR/html4/loose.dtd"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;http-equiv&lt;/span&gt;&lt;span class="kwrd"&gt;="Content-Type"&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;="text/html; charset=ISO-8859-1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;AJAX calls to Servlet using JQuery and JSON&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;="http://code.jquery.com/jquery-latest.min.js"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;pre class="alt"&gt;&lt;span class="lnum" id="lnum1"&gt;   1:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="lnum" id="lnum2"&gt;   2:&lt;/span&gt; &amp;lt;script&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="lnum" id="lnum3"&gt;   3:&lt;/span&gt;     $(document).ready(&lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="lnum" id="lnum4"&gt;   4:&lt;/span&gt;         $(&lt;span class="str"&gt;'#country'&lt;/span&gt;).change(&lt;span class="kwrd"&gt;function&lt;/span&gt;(&lt;span class="kwrd"&gt;event&lt;/span&gt;) {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="lnum" id="lnum5"&gt;   5:&lt;/span&gt;         &lt;span class="kwrd"&gt;var&lt;/span&gt; $country=$(&lt;span class="str"&gt;"select#country"&lt;/span&gt;).val();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="lnum" id="lnum6"&gt;   6:&lt;/span&gt;            $.get(&lt;span class="str"&gt;'ActionServlet'&lt;/span&gt;,{countryname:$country},&lt;span class="kwrd"&gt;function&lt;/span&gt;(responseJson) {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="lnum" id="lnum7"&gt;   7:&lt;/span&gt;             &lt;span class="kwrd"&gt;var&lt;/span&gt; $select = $(&lt;span class="str"&gt;'#states'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="lnum" id="lnum8"&gt;   8:&lt;/span&gt;                $select.find(&lt;span class="str"&gt;'option'&lt;/span&gt;).remove();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="lnum" id="lnum9"&gt;   9:&lt;/span&gt;                $.each(responseJson, &lt;span class="kwrd"&gt;function&lt;/span&gt;(key, value) {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="lnum" id="lnum10"&gt;  10:&lt;/span&gt;                    $(&lt;span class="str"&gt;'&amp;lt;option&amp;gt;'&lt;/span&gt;).val(key).text(value).appendTo($select);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="lnum" id="lnum11"&gt;  11:&lt;/span&gt;                     });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="lnum" id="lnum12"&gt;  12:&lt;/span&gt;             });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="lnum" id="lnum13"&gt;  13:&lt;/span&gt;         });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="lnum" id="lnum14"&gt;  14:&lt;/span&gt;     });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h1&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;AJAX calls to Servlet using JQuery and JSON&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h1&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Select Country: &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;select&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="country"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Select Country&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="India"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;India&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="US"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;US&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;select&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;Enter:  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;select&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="states"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Select State&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;option&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;select&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;&lt;u&gt;ActionServlet.java&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; ajaxdemo;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; com.google.gson.Gson;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.util.*;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ActionServlet &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;"text/html;charset=UTF-8"&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;   String country=request.getParameter(&lt;span class="str"&gt;"countryname"&lt;/span&gt;);&lt;br /&gt;  Map&amp;lt;String, String&amp;gt; ind = &lt;span class="kwrd"&gt;new&lt;/span&gt; LinkedHashMap&amp;lt;String, String&amp;gt;();&lt;br /&gt;     ind.put(&lt;span class="str"&gt;"1"&lt;/span&gt;, &lt;span class="str"&gt;"New delhi"&lt;/span&gt;);&lt;br /&gt;     ind.put(&lt;span class="str"&gt;"2"&lt;/span&gt;, &lt;span class="str"&gt;"Tamil Nadu"&lt;/span&gt;);&lt;br /&gt;     ind.put(&lt;span class="str"&gt;"3"&lt;/span&gt;, &lt;span class="str"&gt;"Kerala"&lt;/span&gt;);&lt;br /&gt;     ind.put(&lt;span class="str"&gt;"4"&lt;/span&gt;, &lt;span class="str"&gt;"Andhra Pradesh"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;     Map&amp;lt;String, String&amp;gt; us = &lt;span class="kwrd"&gt;new&lt;/span&gt; LinkedHashMap&amp;lt;String, String&amp;gt;();&lt;br /&gt;     us.put(&lt;span class="str"&gt;"1"&lt;/span&gt;, &lt;span class="str"&gt;"Washington"&lt;/span&gt;);&lt;br /&gt;     us.put(&lt;span class="str"&gt;"2"&lt;/span&gt;, &lt;span class="str"&gt;"California"&lt;/span&gt;);&lt;br /&gt;     us.put(&lt;span class="str"&gt;"3"&lt;/span&gt;, &lt;span class="str"&gt;"Florida"&lt;/span&gt;);&lt;br /&gt;     us.put(&lt;span class="str"&gt;"4"&lt;/span&gt;, &lt;span class="str"&gt;"New York"&lt;/span&gt;);&lt;br /&gt;     String json = null ;&lt;br /&gt;     &lt;span class="kwrd"&gt;if&lt;/span&gt;(country.equals(&lt;span class="str"&gt;"India"&lt;/span&gt;)){&lt;br /&gt;      json= &lt;span class="kwrd"&gt;new&lt;/span&gt; Gson().toJson(ind);&lt;br /&gt;     }&lt;br /&gt;     &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt;(country.equals(&lt;span class="str"&gt;"US"&lt;/span&gt;)){&lt;br /&gt;      json=&lt;span class="kwrd"&gt;new&lt;/span&gt; Gson().toJson(us);&lt;br /&gt;     }&lt;br /&gt;     response.setContentType(&lt;span class="str"&gt;"application/json"&lt;/span&gt;);&lt;br /&gt;     response.setCharacterEncoding(&lt;span class="str"&gt;"UTF-8"&lt;/span&gt;);&lt;br /&gt;     response.getWriter().write(json);&lt;br /&gt;&lt;br /&gt;        } &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;Download JSON Jar file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: medium;"&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://lh6.ggpht.com/-Itr7qoNBh9o/UgidM56W6QI/AAAAAAAADOw/f8SemQfABBM/s1600-h/1%25255B2%25255D.jpg"&gt;&lt;img alt="1" border="0" height="136" src="http://lh5.ggpht.com/-HfemxnrVYsc/UgidOC5sRxI/AAAAAAAADO4/I_0ipA1GcZQ/1_thumb.jpg?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="1" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/-1-lXlyIzFWk/UgidO7bOGeI/AAAAAAAADPA/DFJoE98fWPg/s1600-h/2%25255B2%25255D.jpg"&gt;&lt;img alt="2" border="0" height="154" src="http://lh3.ggpht.com/-eon3vsrVGuQ/UgidP8lHxII/AAAAAAAADPI/VhU4A2xb-Gg/2_thumb.jpg?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="2" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-5sN2LTcViSc/UgidRDKgOqI/AAAAAAAADPQ/nybwZ_A0Y5A/s1600-h/3%25255B2%25255D.jpg"&gt;&lt;img alt="3" border="0" height="154" src="http://lh3.ggpht.com/-XZwbG_3Uo6c/UgidRwGntnI/AAAAAAAADPY/F9zSpJg5uHA/3_thumb.jpg?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="3" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/-OBUf0okrdXc/UgidSh_SyTI/AAAAAAAADPg/WOJkhPX6Ef8/s1600-h/4%25255B2%25255D.jpg"&gt;&lt;img alt="4" border="0" height="154" src="http://lh4.ggpht.com/-iX4E1Sh82CM/UgidTs2VGXI/AAAAAAAADPo/kZ9g85zVp7Q/4_thumb.jpg?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="4" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b44a3590-a02e-4caa-9b05-f64b3592ac00" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/AJAX+%26+JSON" rel="tag"&gt;AJAX &amp;amp; JSON&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh5.ggpht.com/-HfemxnrVYsc/UgidOC5sRxI/AAAAAAAADO4/I_0ipA1GcZQ/s72-c/1_thumb.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Managing Session using Servlet session API</title><link>http://niitindrapuri.blogspot.com/2013/07/managing-session-using-servlet-session.html</link><category>Netbeans</category><category>Servlet</category><pubDate>Wed, 10 Jul 2013 23:49:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-7929503384331365329</guid><description>&lt;p&gt;&lt;font size="3"&gt;You can use the classes and interfaces defined in the Servlet Session API to create and manage user sessions. Various interfaces provided by Servlet Session API to create and manage user session are, javax.servlet.http.HttpSession,     &lt;br /&gt;javax.servlet.http.HttpSessionListener, and      &lt;br /&gt;javax.servlet.http.HttpSessionBindingListener.      &lt;br /&gt;The javax.servlet.http.HttpSession interface provides methods for tracking the      &lt;br /&gt;session of a user. You can create an object of HttpSession interface to store session information as name/value pairs. You can later retrieve this information to manage user sessions.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;httpservlet.html&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div&gt;   &lt;pre class="csharpcode" id="codeSnippet"&gt;&amp;lt;!--&lt;br /&gt;To change &lt;span class="kwrd"&gt;this&lt;/span&gt; template, choose Tools | Templates&lt;br /&gt;and open the template in the editor.&lt;br /&gt;--&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE HTML PUBLIC &lt;span class="str"&gt;&amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;  &amp;lt;head&amp;gt;&lt;br /&gt;    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;    &amp;lt;meta http-equiv=&lt;span class="str"&gt;&amp;quot;Content-Type&amp;quot;&lt;/span&gt; content=&lt;span class="str"&gt;&amp;quot;text/html; charset=UTF-8&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;  &amp;lt;/head&amp;gt;&lt;br /&gt;  &amp;lt;body&amp;gt;&lt;br /&gt;    &amp;lt;form action=&lt;span class="str"&gt;&amp;quot;httpServlet&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;Name:&amp;lt;input type=&lt;span class="str"&gt;&amp;quot;text&amp;quot;&lt;/span&gt; name=&lt;span class="str"&gt;&amp;quot;userName&amp;quot;&lt;/span&gt;/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;&amp;lt;input type=&lt;span class="str"&gt;&amp;quot;submit&amp;quot;&lt;/span&gt; value=&lt;span class="str"&gt;&amp;quot;go&amp;quot;&lt;/span&gt;/&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;  &amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;httpServlet.java&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpSession;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; httpServlet &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Processes requests for both HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;        String n=request.getParameter(&lt;span class="str"&gt;&amp;quot;userName&amp;quot;&lt;/span&gt;);&lt;br /&gt;        out.println(&lt;span class="str"&gt;&amp;quot;Dear &amp;quot;&lt;/span&gt;+ n +&lt;span class="str"&gt;&amp;quot;Your user name has been set as an attribute to the session&amp;quot;&lt;/span&gt;);&lt;br /&gt;        HttpSession session=request.getSession();&lt;br /&gt;        session.setAttribute(&lt;span class="str"&gt;&amp;quot;uname&amp;quot;&lt;/span&gt;,n);&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;&amp;lt;a href='httpServlet1'&amp;gt;visit&amp;lt;/a&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;        } &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// &amp;lt;editor-fold defaultstate=&amp;quot;collapsed&amp;quot; desc=&amp;quot;HttpServlet methods. Click on the + sign on the left to edit the code.&amp;quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doGet(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Returns a short description of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @return a String containing servlet description&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; String getServletInfo() {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;Short description&amp;quot;&lt;/span&gt;;&lt;br /&gt;    }&lt;span class="rem"&gt;// &amp;lt;/editor-fold&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;font size="3"&gt;&lt;strong&gt;httpServlet1.java&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpSession;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; httpServlet1 &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Processes requests for both HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;             HttpSession session=request.getSession(false);&lt;br /&gt;        String n=(String)session.getAttribute(&lt;span class="str"&gt;&amp;quot;uname&amp;quot;&lt;/span&gt;);&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;Welcome &amp;quot;&lt;/span&gt;+n);&lt;br /&gt;&lt;br /&gt;        } &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// &amp;lt;editor-fold defaultstate=&amp;quot;collapsed&amp;quot; desc=&amp;quot;HttpServlet methods. Click on the + sign on the left to edit the code.&amp;quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doGet(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Returns a short description of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @return a String containing servlet description&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; String getServletInfo() {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;Short description&amp;quot;&lt;/span&gt;;&lt;br /&gt;    }&lt;span class="rem"&gt;// &amp;lt;/editor-fold&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Output&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh6.ggpht.com/-xVfDxDmbpVU/Ud5VeqeVeqI/AAAAAAAADMQ/Ls-WcEitAD0/s1600-h/1%25255B2%25255D.jpg"&gt;&lt;img title="1" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="173" alt="1" src="http://lh5.ggpht.com/-phG52ESwJQo/Ud5VfpPQ3YI/AAAAAAAADMY/flYI8hOqfM8/1_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh5.ggpht.com/-jbcfLxGrR_w/Ud5VgmLs8YI/AAAAAAAADMg/Z3ATCEtnRV0/s1600-h/2%25255B2%25255D.jpg"&gt;&lt;img title="2" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="132" alt="2" src="http://lh6.ggpht.com/-CmLFzOx4RHU/Ud5Vhg2x7RI/AAAAAAAADMo/_XrG_7e_I8U/2_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh6.ggpht.com/-Llw9zmUjg0U/Ud5ViWpaSfI/AAAAAAAADMw/Mg-jphCI3_Q/s1600-h/3%25255B2%25255D.jpg"&gt;&lt;img title="3" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="156" alt="3" src="http://lh6.ggpht.com/-Y2cvksp9hDY/Ud5VjCT_zVI/AAAAAAAADM4/hshdoqNqApI/3_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh5.ggpht.com/-phG52ESwJQo/Ud5VfpPQ3YI/AAAAAAAADMY/flYI8hOqfM8/s72-c/1_thumb.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Managing Session using Cookies</title><link>http://niitindrapuri.blogspot.com/2013/07/managing-session-using-cookies.html</link><category>Netbeans</category><category>Servlet</category><pubDate>Wed, 10 Jul 2013 23:35:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-5070279673751390952</guid><description>&lt;p&gt;&lt;font size="3"&gt;Cookies are small text files that are stored by an application server in the client     &lt;br /&gt;browser to keep track of all the users. A cookie has values in the form of name/value      &lt;br /&gt;pairs. For example, a cookie can have a name, user with the value, Michael. They are      &lt;br /&gt;created by the server and are sent to the client with the HTTP response headers. The      &lt;br /&gt;client saves the cookies in the local hard disk and sends them along with the HTTP      &lt;br /&gt;request headers to the server. A Web browser is expected to support 20 cookies per      &lt;br /&gt;host and the size of each cookie can be a maximum of 4 bytes each. Various      &lt;br /&gt;characteristics of cookies are:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;Coockie.html&lt;/font&gt;&lt;/p&gt;  &lt;div&gt;   &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;&amp;lt;!--&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;HTML&lt;/span&gt; &lt;span class="attr"&gt;PUBLIC&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;http-equiv&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Content-Type&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/html; charset=UTF-8&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;action&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;cookieServlet&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;method&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;post&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;Name:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;userName&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;password:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;password&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;userPass&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;go&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;font size="3"&gt;&lt;strong&gt;cookieServlet.java&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.Cookie;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; cookieServlet &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Processes requests for both HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;           String n=request.getParameter(&lt;span class="str"&gt;&amp;quot;userName&amp;quot;&lt;/span&gt;);&lt;br /&gt;           String p=request.getParameter(&lt;span class="str"&gt;&amp;quot;userPass&amp;quot;&lt;/span&gt;);&lt;br /&gt;    out.println(&lt;span class="str"&gt;&amp;quot;Welcome &amp;quot;&lt;/span&gt;+n);&lt;br /&gt;&lt;br /&gt;    Cookie ck=&lt;span class="kwrd"&gt;new&lt;/span&gt; Cookie(&lt;span class="str"&gt;&amp;quot;uname&amp;quot;&lt;/span&gt;,n);&lt;span class="rem"&gt;//creating cookie object&lt;/span&gt;&lt;br /&gt;    ck.setMaxAge(120);&lt;br /&gt;    response.addCookie(ck);&lt;span class="rem"&gt;//adding cookie in the response&lt;/span&gt;&lt;br /&gt;Cookie ck1=&lt;span class="kwrd"&gt;new&lt;/span&gt; Cookie(&lt;span class="str"&gt;&amp;quot;upass&amp;quot;&lt;/span&gt;,p);&lt;span class="rem"&gt;//creating cookie object&lt;/span&gt;&lt;br /&gt;    ck1.setMaxAge(120);&lt;br /&gt;    response.addCookie(ck1);&lt;br /&gt;    &lt;span class="rem"&gt;//creating submit button&lt;/span&gt;&lt;br /&gt;    out.print(&lt;span class="str"&gt;&amp;quot;Cookie containing user name and password  is stored in your browser.&amp;quot;&lt;/span&gt;);&lt;br /&gt;    out.print(&lt;span class="str"&gt;&amp;quot;&amp;lt;form action='cookieServlet1' method='post'&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;    out.print(&lt;span class="str"&gt;&amp;quot;&amp;lt;input type='submit' value='go'&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;    out.print(&lt;span class="str"&gt;&amp;quot;&amp;lt;/form&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;        } &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// &amp;lt;editor-fold defaultstate=&amp;quot;collapsed&amp;quot; desc=&amp;quot;HttpServlet methods. Click on the + sign on the left to edit the code.&amp;quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doGet(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Returns a short description of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @return a String containing servlet description&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; String getServletInfo() {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;Short description&amp;quot;&lt;/span&gt;;&lt;br /&gt;    }&lt;span class="rem"&gt;// &amp;lt;/editor-fold&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;cookieServlet1.java&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.Cookie;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; cookieServlet1 &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Processes requests for both HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;            String username=null;&lt;br /&gt;            String userpass=null;&lt;br /&gt;&lt;br /&gt;            Cookie ck[]=request.getCookies();&lt;br /&gt;    &lt;span class="rem"&gt;//out.print(&amp;quot;Hello &amp;quot;+ck[0].getValue());&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (ck!=null)&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;int&lt;/span&gt; i=0; i&amp;lt;ck.length; i++)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span class="rem"&gt;/* Retrieve username from the cookie. */&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;if&lt;/span&gt; (ck[i].getName().equals(&lt;span class="str"&gt;&amp;quot;uname&amp;quot;&lt;/span&gt;))&lt;br /&gt;                    {&lt;br /&gt;                        username = ck[i].getValue();&lt;br /&gt;                    out.println(&lt;span class="str"&gt;&amp;quot;User Name : &amp;quot;&lt;/span&gt;+username);&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;                     &lt;span class="kwrd"&gt;if&lt;/span&gt; (ck[i].getName().equals(&lt;span class="str"&gt;&amp;quot;upass&amp;quot;&lt;/span&gt;))&lt;br /&gt;                    {&lt;br /&gt;                        userpass = ck[i].getValue();&lt;br /&gt;                    out.println(&lt;span class="str"&gt;&amp;quot; Password : &amp;quot;&lt;/span&gt;+userpass);&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;            out.println(&lt;span class="str"&gt;&amp;quot;No cookies found&amp;quot;&lt;/span&gt;);&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;    }&lt;span class="kwrd"&gt;catch&lt;/span&gt;(Exception e)&lt;br /&gt;    {&lt;br /&gt;        out.println(&lt;span class="str"&gt;&amp;quot;Error&amp;quot;&lt;/span&gt;+e.toString());&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        &lt;span class="kwrd"&gt;finally&lt;/span&gt; {&lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;     &lt;br /&gt;        }&lt;br /&gt;    &lt;span class="rem"&gt;// &amp;lt;editor-fold defaultstate=&amp;quot;collapsed&amp;quot; desc=&amp;quot;HttpServlet methods. Click on the + sign on the left to edit the code.&amp;quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doGet(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Returns a short description of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @return a String containing servlet description&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; String getServletInfo() {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;Short description&amp;quot;&lt;/span&gt;;&lt;br /&gt;    }&lt;span class="rem"&gt;// &amp;lt;/editor-fold&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Output&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh4.ggpht.com/-AnVkkY_xWZQ/Ud5SJPLJ_HI/AAAAAAAADLY/nh9fDiIs3ik/s1600-h/1%25255B2%25255D.jpg"&gt;&lt;img title="1" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="186" alt="1" src="http://lh5.ggpht.com/-VxsRvNmSPIk/Ud5SJxtHmcI/AAAAAAAADLg/6kL2wtwv6Uw/1_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh6.ggpht.com/-7EKsNmYeAeg/Ud5SKsr1sSI/AAAAAAAADLo/9iO0NCOAhwM/s1600-h/2%25255B2%25255D.jpg"&gt;&lt;img title="2" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="225" alt="2" src="http://lh5.ggpht.com/-djGI2K12F0Q/Ud5SLbHZRiI/AAAAAAAADLw/PZN4IozAXbw/2_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh5.ggpht.com/-2JQzARLQ7EQ/Ud5SMMMuc6I/AAAAAAAADL4/025pYocjFj0/s1600-h/3%25255B2%25255D.jpg"&gt;&lt;img title="3" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="171" alt="3" src="http://lh3.ggpht.com/-r81GJ7DI-X8/Ud5SM46dRlI/AAAAAAAADMA/AXURA5nCHzc/3_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh5.ggpht.com/-VxsRvNmSPIk/Ud5SJxtHmcI/AAAAAAAADLg/6kL2wtwv6Uw/s72-c/1_thumb.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Managing Session using URL rewriting</title><link>http://niitindrapuri.blogspot.com/2013/07/managing-session-using-url-rewriting.html</link><category>Netbeans</category><category>Servlet</category><pubDate>Wed, 10 Jul 2013 23:24:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-7591320111439733921</guid><description>&lt;p&gt;&lt;font size="3"&gt;URL rewriting is a session management technique that manages user session by      &lt;br /&gt;modifying a URL. Usually, this technique is used when information that is to be       &lt;br /&gt;transferred is not very critical because the URL can be intercepted easily during       &lt;br /&gt;transfer. For example, in an online shopping portal, a servlet can modify a URL to       &lt;br /&gt;include user information, such as a username. The servlet can then display the URL.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;When the user clicks the URL hyperlink. The information is sent to another servlet that      &lt;br /&gt;retrieves the user information and displays a welcome message. You can use the       &lt;br /&gt;following code to create the servlet, RewriteServletURL that modifies and displays a       &lt;br /&gt;URL.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;urlRewriting&lt;font size="3"&gt;.html&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;div&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;&amp;lt;!--&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;HTML&lt;/span&gt; &lt;span class="attr"&gt;PUBLIC&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;http-equiv&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Content-Type&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/html; charset=UTF-8&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;action&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;urlServlet&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;method&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;post&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;Name:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;userName&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;go&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;urlServlet.java&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; urlServlet &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Processes requests for both HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;             String n=request.getParameter(&lt;span class="str"&gt;&amp;quot;userName&amp;quot;&lt;/span&gt;);&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;Welcome &amp;quot;&lt;/span&gt;+n);&lt;br /&gt;&lt;br /&gt;        &lt;span class="rem"&gt;//appending the username in the query string&lt;/span&gt;&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;&amp;lt;a href='urlServlet1?uname=&amp;quot;&lt;/span&gt;+n+&lt;span class="str"&gt;&amp;quot;'&amp;gt;visit&amp;lt;/a&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        } &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// &amp;lt;editor-fold defaultstate=&amp;quot;collapsed&amp;quot; desc=&amp;quot;HttpServlet methods. Click on the + sign on the left to edit the code.&amp;quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doGet(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Returns a short description of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @return a String containing servlet description&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; String getServletInfo() {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;Short description&amp;quot;&lt;/span&gt;;&lt;br /&gt;    }&lt;span class="rem"&gt;// &amp;lt;/editor-fold&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;urlServlet1.java&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; urlServlet1 &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Processes requests for both HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;             &lt;span class="rem"&gt;//getting value from the query string&lt;/span&gt;&lt;br /&gt;        String n=request.getParameter(&lt;span class="str"&gt;&amp;quot;uname&amp;quot;&lt;/span&gt;);&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;Hello &amp;quot;&lt;/span&gt;+n);&lt;br /&gt;        } &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// &amp;lt;editor-fold defaultstate=&amp;quot;collapsed&amp;quot; desc=&amp;quot;HttpServlet methods. Click on the + sign on the left to edit the code.&amp;quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doGet(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Returns a short description of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @return a String containing servlet description&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; String getServletInfo() {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;Short description&amp;quot;&lt;/span&gt;;&lt;br /&gt;    }&lt;span class="rem"&gt;// &amp;lt;/editor-fold&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Output&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh3.ggpht.com/-4IN3zIJr_dQ/Ud5PdvACs5I/AAAAAAAADKE/GdWpSXaAzoM/s1600-h/1%25255B2%25255D.jpg"&gt;&lt;img title="1" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="158" alt="1" src="http://lh6.ggpht.com/-p8-3hxoicbg/Ud5PefMGP2I/AAAAAAAADKM/bNCCPKXfXRA/1_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/-h7pR-1Cq1cg/Ud5PfJ6pkvI/AAAAAAAADKU/vAritm7drDM/s1600-h/2%25255B2%25255D.jpg"&gt;&lt;img title="2" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="165" alt="2" src="http://lh4.ggpht.com/-l9_BGVmdZZU/Ud5Pf8ZmvOI/AAAAAAAADKc/kuLmYU3U8cY/2_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh4.ggpht.com/-7KTpntSavF8/Ud5PgnrPlkI/AAAAAAAADKk/7flWkJwA4Hw/s1600-h/3%25255B2%25255D.jpg"&gt;&lt;img title="3" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="174" alt="3" src="http://lh3.ggpht.com/-In6Dkq0_jIY/Ud5PhSILOqI/AAAAAAAADKs/l9JVGEzSi-k/3_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh6.ggpht.com/-p8-3hxoicbg/Ud5PefMGP2I/AAAAAAAADKM/bNCCPKXfXRA/s72-c/1_thumb.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Managing Session using Hidden form field</title><link>http://niitindrapuri.blogspot.com/2013/07/managing-session-using-hidden-form-field.html</link><category>Netbeans</category><category>Servlet</category><pubDate>Wed, 10 Jul 2013 23:04:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-3179855047099169584</guid><description>&lt;p&gt;&lt;font size="3"&gt;You can use hidden form fields to maintain the session information of a user while the     &lt;br /&gt;user interacts with the Web application. A hidden form field is embedded in an HTML      &lt;br /&gt;page and is not visible when viewed in a browser. The following code snippet shows a      &lt;br /&gt;hidden form field in an HTML page:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;Programs:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;HiddenForm.html&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div&gt;   &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;&amp;lt;!--&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;HTML&lt;/span&gt; &lt;span class="attr"&gt;PUBLIC&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;http-equiv&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Content-Type&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/html; charset=UTF-8&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;action&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;FirstServlet1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;method&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;post&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;Name:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;uname&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;go&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;FirstServlet1.java&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; FirstServlet1 &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Processes requests for both HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;           String n=request.getParameter(&lt;span class="str"&gt;&amp;quot;uname&amp;quot;&lt;/span&gt;);&lt;br /&gt;        &lt;span class="rem"&gt;//out.print(&amp;quot;Welcome &amp;quot;+n);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span class="rem"&gt;//creating form that have invisible textfield&lt;/span&gt;&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;&amp;lt;form method='post' action='SecondServlet'&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;&amp;lt;input type='hidden' name='uname' value='&amp;quot;&lt;/span&gt;+n+&lt;span class="str"&gt;&amp;quot;'&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;&amp;lt;input type='submit' value='go'&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;&amp;lt;/form&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;        out.close();&lt;br /&gt;        }&lt;br /&gt;        &lt;span class="kwrd"&gt;catch&lt;/span&gt;(Exception e)&lt;br /&gt;        {&lt;br /&gt;            System.out.println(e);&lt;br /&gt;        }&lt;br /&gt;         &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// &amp;lt;editor-fold defaultstate=&amp;quot;collapsed&amp;quot; desc=&amp;quot;HttpServlet methods. Click on the + sign on the left to edit the code.&amp;quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doGet(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Returns a short description of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @return a String containing servlet description&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; String getServletInfo() {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;Short description&amp;quot;&lt;/span&gt;;&lt;br /&gt;    }&lt;span class="rem"&gt;// &amp;lt;/editor-fold&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;SecondServlet.java&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="rem"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * To change this template, choose Tools | Templates&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * and open the template in the editor.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SecondServlet &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Processes requests for both HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;          String n=request.getParameter(&lt;span class="str"&gt;&amp;quot;uname&amp;quot;&lt;/span&gt;);&lt;br /&gt;        out.print(&lt;span class="str"&gt;&amp;quot;Hello &amp;quot;&lt;/span&gt;+n);&lt;br /&gt;            &lt;br /&gt;        } &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// &amp;lt;editor-fold defaultstate=&amp;quot;collapsed&amp;quot; desc=&amp;quot;HttpServlet methods. Click on the + sign on the left to edit the code.&amp;quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doGet(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        processRequest(request, response);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Returns a short description of the servlet.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @return a String containing servlet description&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    @Override&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; String getServletInfo() {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;&amp;quot;Short description&amp;quot;&lt;/span&gt;;&lt;br /&gt;    }&lt;span class="rem"&gt;// &amp;lt;/editor-fold&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;Output&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh5.ggpht.com/-iKQ1VwjwqmI/Ud5K05wPHhI/AAAAAAAADJM/bxBEPDoOPj4/s1600-h/1%25255B2%25255D.jpg"&gt;&lt;img title="1" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="173" alt="1" src="http://lh3.ggpht.com/-qe9hgsAOz7A/Ud5K1ynNh5I/AAAAAAAADJU/UIVpMuaQeIY/1_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-kFbL3waFIDA/Ud5K2rJqiSI/AAAAAAAADJc/1K5uOopDbf8/s1600-h/2%25255B2%25255D.jpg"&gt;&lt;img title="2" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="194" alt="2" src="http://lh3.ggpht.com/-veHKQVGG4aI/Ud5K3R87i9I/AAAAAAAADJk/DIPYSX0nsP0/2_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-x3yutefFw1U/Ud5K4Q22H0I/AAAAAAAADJs/_tUHYFFQYpk/s1600-h/3%25255B2%25255D.jpg"&gt;&lt;img title="3" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="160" alt="3" src="http://lh6.ggpht.com/-hVpwTv0Z8ng/Ud5K5OK_SeI/AAAAAAAADJ0/g2j12ilNnlk/3_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh3.ggpht.com/-qe9hgsAOz7A/Ud5K1ynNh5I/AAAAAAAADJU/UIVpMuaQeIY/s72-c/1_thumb.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Login form in servlet with Attribute &amp; RequestDispatcher</title><link>http://niitindrapuri.blogspot.com/2013/07/login-form-in-servlet-with-attribute.html</link><category>JSP</category><category>Netbeans</category><category>Servlet</category><pubDate>Fri, 5 Jul 2013 05:56:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-3095861560081664174</guid><description>&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;login.html&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div&gt;   &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;http-equiv&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Content-Type&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/html; charset=UTF-8&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;method&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;post&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;action&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;login&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        User Name:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;name&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        Password:&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;password&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;pass&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;login&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;u&gt;login.java&lt;/u&gt;&lt;/font&gt;&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.RequestDispatcher;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; login &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;           String name = request.getParameter(&lt;span class="str"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;);&lt;br /&gt;        String pass = request.getParameter(&lt;span class="str"&gt;&amp;quot;pass&amp;quot;&lt;/span&gt;);&lt;br /&gt;        request.setAttribute(&lt;span class="str"&gt;&amp;quot;user&amp;quot;&lt;/span&gt;,name );&lt;br /&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt;(Validate1.checkUser(name, pass))&lt;br /&gt;        {&lt;br /&gt;            RequestDispatcher rs = request.getRequestDispatcher(&lt;span class="str"&gt;&amp;quot;Welcome1&amp;quot;&lt;/span&gt;);&lt;br /&gt;            rs.forward(request, response);&lt;br /&gt;        }&lt;br /&gt;        &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;        {&lt;br /&gt;           out.println(&lt;span class="str"&gt;&amp;quot;Username or Password incorrect&amp;quot;&lt;/span&gt;);&lt;br /&gt;           RequestDispatcher rs = request.getRequestDispatcher(&lt;span class="str"&gt;&amp;quot;login.html&amp;quot;&lt;/span&gt;);&lt;br /&gt;           rs.include(request, response);&lt;br /&gt;        }&lt;br /&gt;        } &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;u&gt;Welcome1.java&lt;/u&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Welcome1 &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;span class="rem"&gt;/** &lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * Processes requests for both HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param request servlet request&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @param response servlet response&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     * @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;     */&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;    &lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        String n=(String)request.getAttribute(&lt;span class="str"&gt;&amp;quot;user&amp;quot;&lt;/span&gt;);&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;           &lt;br /&gt;        out.println(&lt;span class="str"&gt;&amp;quot;Welcome user:&amp;quot;&lt;/span&gt;+n);&lt;br /&gt;        } &lt;span class="kwrd"&gt;finally&lt;/span&gt; { &lt;br /&gt;            out.close();&lt;br /&gt;        }&lt;br /&gt;    } &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;u&gt;Validate1.java&lt;/u&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; Code;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.sql.*;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Validate1 {&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;boolean&lt;/span&gt; checkUser(String uname,String pass)&lt;br /&gt;     {&lt;br /&gt;      &lt;span class="kwrd"&gt;boolean&lt;/span&gt; st =false;&lt;br /&gt;      &lt;span class="kwrd"&gt;try&lt;/span&gt;{&lt;br /&gt;                &lt;br /&gt;         Class.forName(&lt;span class="str"&gt;&amp;quot;sun.jdbc.odbc.JdbcOdbcDriver&amp;quot;&lt;/span&gt;);&lt;br /&gt;          Connection con=DriverManager.getConnection(&lt;span class="str"&gt;&amp;quot;jdbc:odbc:mydb&amp;quot;&lt;/span&gt;,&lt;span class="str"&gt;&amp;quot;sa&amp;quot;&lt;/span&gt;,&lt;span class="str"&gt;&amp;quot;niitbpl123&amp;quot;&lt;/span&gt;);&lt;br /&gt;         PreparedStatement ps =con.prepareStatement(&lt;span class="str"&gt;&amp;quot;select * from student where name=? and pass=?&amp;quot;&lt;/span&gt;);&lt;br /&gt;         ps.setString(1, uname);&lt;br /&gt;         ps.setString(2, pass);&lt;br /&gt;         ResultSet rs =ps.executeQuery();&lt;br /&gt;         st = rs.next();&lt;br /&gt;&lt;br /&gt;      }&lt;span class="kwrd"&gt;catch&lt;/span&gt;(Exception e)&lt;br /&gt;      {&lt;br /&gt;          e.printStackTrace();&lt;br /&gt;      }&lt;br /&gt;         &lt;span class="kwrd"&gt;return&lt;/span&gt; st;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="3"&gt;Output&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;If user is and password are correct then output will be&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;a href="http://lh3.ggpht.com/-q_8U5GFjlyk/Uda79poy_SI/AAAAAAAADIE/EedjOzqHFxk/s1600-h/1%25255B2%25255D.jpg"&gt;&lt;img title="1" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="142" alt="1" src="http://lh4.ggpht.com/-5ZMQMZzcGQ0/Uda7-4YS6tI/AAAAAAAADIM/2_-q3eS7SX0/1_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-2aGlBKmKUgo/Uda7_T1adDI/AAAAAAAADIU/VwVPdDTjn94/s1600-h/2%25255B2%25255D.jpg"&gt;&lt;img title="2" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="160" alt="2" src="http://lh6.ggpht.com/-x28rrqaagMI/Uda8AFPjyaI/AAAAAAAADIc/xg2_79qeng8/2_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;If user is and password are incorrect then output will be&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-oWY9fb1fBn8/Uda8A2dk0UI/AAAAAAAADIk/znJmZDnfNsE/s1600-h/3%25255B2%25255D.jpg"&gt;&lt;img title="3" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="176" alt="3" src="http://lh3.ggpht.com/-tebujn3ULs4/UdbCfZETcNI/AAAAAAAADI0/i-aXYeY5Fv0/3_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh4.ggpht.com/-5ZMQMZzcGQ0/Uda7-4YS6tI/AAAAAAAADIM/2_-q3eS7SX0/s72-c/1_thumb.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Addition of Two Number using servlet and jsp</title><link>http://niitindrapuri.blogspot.com/2013/07/addition-of-two-number-using-servlet.html</link><category>java</category><category>Netbeans</category><category>Servlet</category><pubDate>Fri, 5 Jul 2013 05:09:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-2018755403446122067</guid><description>&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;index.jsp&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="asp"&gt;&amp;lt;%@page contentType=&amp;quot;text/html&amp;quot; pageEncoding=&amp;quot;UTF-8&amp;quot;%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;!&lt;/span&gt;&lt;span class="html"&gt;DOCTYPE&lt;/span&gt; &lt;span class="attr"&gt;HTML&lt;/span&gt; &lt;span class="attr"&gt;PUBLIC&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot;&lt;/span&gt;&lt;br /&gt;   &lt;span class="kwrd"&gt;&amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;meta&lt;/span&gt; &lt;span class="attr"&gt;http-equiv&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Content-Type&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/html; charset=UTF-8&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;JSP Page&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt; &lt;span class="attr"&gt;bgcolor&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;yellow&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;center&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h1&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Addition of Two Number&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h1&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;center&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt; &lt;span class="attr"&gt;action&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;&lt;font size="2"&gt;additionservlet&lt;/font&gt;&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;method&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;post&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt; &lt;span class="attr"&gt;border&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;align&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;center&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;First Number&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;txtnum1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Second Number&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;txtnum2&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Add&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;btnadd&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;form&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;additionservlet.java&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;  &lt;pre class="csharpcode" id="codeSnippet"&gt;&lt;span class="kwrd"&gt;package&lt;/span&gt; pck;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span class="kwrd"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; * @author Dilip&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; &lt;font size="3"&gt;additionservlet&lt;/font&gt; &lt;span class="kwrd"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;   &lt;br /&gt;    &lt;br /&gt;    &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; processRequest(HttpServletRequest req, HttpServletResponse response)&lt;span class="kwrd"&gt;throws&lt;/span&gt; ServletException, IOException &lt;br /&gt;    {&lt;br /&gt;        response.setContentType(&lt;span class="str"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        &lt;span class="kwrd"&gt;int&lt;/span&gt; x,y,res;&lt;br /&gt;        x=Integer.parseInt( req.getParameter(&lt;span class="str"&gt;&amp;quot;txtnum1&amp;quot;&lt;/span&gt;));&lt;br /&gt;        y=Integer.parseInt(req.getParameter(&lt;span class="str"&gt;&amp;quot;txtnum2&amp;quot;&lt;/span&gt;));&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;try&lt;/span&gt; {&lt;br /&gt;            res=x+y;&lt;br /&gt;            out.println(&lt;span class="str"&gt;&amp;quot;&amp;lt;html&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;            out.println(&lt;span class="str"&gt;&amp;quot;&amp;lt;head&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;            out.println(&lt;span class="str"&gt;&amp;quot;&amp;lt;title&amp;gt;Servlet NewServlet&amp;lt;/title&amp;gt;&amp;quot;&lt;/span&gt;);  &lt;br /&gt;            out.println(&lt;span class="str"&gt;&amp;quot;&amp;lt;/head&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;            out.println(&lt;span class="str"&gt;&amp;quot;&amp;lt;body&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;            out.println(&lt;span class="str"&gt;&amp;quot;&amp;lt;h1&amp;gt;Addition= &amp;quot;&lt;/span&gt; + res + &lt;span class="str"&gt;&amp;quot;&amp;lt;/h1&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;            out.println(&lt;span class="str"&gt;&amp;quot;&amp;lt;/body&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;            out.println(&lt;span class="str"&gt;&amp;quot;&amp;lt;/html&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;        &lt;br /&gt;           } &lt;br /&gt;       &lt;span class="kwrd"&gt;finally&lt;/span&gt; &lt;br /&gt;           { &lt;br /&gt;              out.close();&lt;br /&gt;           }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;font size="3"&gt;&lt;strong&gt;&lt;u&gt;Output:&lt;/u&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;font size="3"&gt;&lt;a href="http://lh3.ggpht.com/-_Tc7Sx1oP5I/Uda3ZTCDUBI/AAAAAAAADHc/_cFxBFk8r1c/s1600-h/1%25255B5%25255D.jpg"&gt;&lt;img title="1" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="144" alt="1" src="http://lh5.ggpht.com/-VafY-IkH_QA/Uda3akdk36I/AAAAAAAADHk/xFm8HOXKmaM/1_thumb%25255B1%25255D.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/--a9__aUDGpM/Uda3fOE3ylI/AAAAAAAADHs/aHJaYPhDGOY/s1600-h/2%25255B2%25255D.jpg"&gt;&lt;img title="2" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="130" alt="2" src="http://lh4.ggpht.com/-KrQ-dZbppGc/Uda3fl-v7GI/AAAAAAAADH0/j_SwXdDDGiw/2_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh5.ggpht.com/-VafY-IkH_QA/Uda3akdk36I/AAAAAAAADHk/xFm8HOXKmaM/s72-c/1_thumb%25255B1%25255D.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Best Education wordpress themes for educational institutes</title><link>http://niitindrapuri.blogspot.com/2013/05/best-education-wordpress-themes-for.html</link><category>Blogger</category><category>Themes</category><category>Wordpress</category><pubDate>Wed, 29 May 2013 01:45:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-7715224666210146951</guid><description>&lt;h6&gt;&lt;font face="Tahoma" size="5"&gt;Education Academy&lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-a7C53kdv2uQ/UaXACWgs-VI/AAAAAAAAC24/Tpr_eXnQrao/s1600-h/1%25255B4%25255D.jpg"&gt;&lt;img title="1" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="333" alt="1" src="http://lh5.ggpht.com/-af9xw6Y80is/UaXADOxjo6I/AAAAAAAAC3A/4v0RsnTXFMk/1_thumb%25255B2%25255D.jpg?imgmax=800" width="496" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://templatic.com/demos/?theme=education"&gt;&lt;font face="Tahoma" size="4"&gt;Demo&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma" size="4"&gt; / &lt;/font&gt;&lt;a href="http://templatic.com/portfolio-themes/education-academy-premium-wordpress-portfolio-theme/"&gt;&lt;font face="Tahoma" size="4"&gt;Info &amp;amp; Downloa&lt;font size="5"&gt;d&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h6&gt;&lt;font face="Tahoma" size="5"&gt;Grand College&lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-tEwp18YdQC4/UaXAEKdmNqI/AAAAAAAAC3I/oD5UGWPnq3A/s1600-h/2%25255B5%25255D.jpg"&gt;&lt;img title="2" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="346" alt="2" src="http://lh6.ggpht.com/-mjI28lnp7tg/UaXAFG_wIZI/AAAAAAAAC3Q/od7L4vI8mcQ/2_thumb%25255B3%25255D.jpg?imgmax=800" width="507" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://themes.goodlayers.com/?theme=grandcollege"&gt;&lt;font face="Tahoma" size="4"&gt;Demo&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma" size="4"&gt; / &lt;/font&gt;&lt;a href="http://themeforest.net/item/grand-college-wordpress-theme-for-education/1865598?ref=simrandeep"&gt;&lt;font face="Tahoma" size="4"&gt;Info &amp;amp; Download&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h6&gt;&lt;font face="Tahoma" size="5"&gt;Education&lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-ue8SJHY2IR4/UaXAGKwsK_I/AAAAAAAAC3Y/rXwI69xTpXQ/s1600-h/3%25255B5%25255D.jpg"&gt;&lt;img title="3" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="326" alt="3" src="http://lh6.ggpht.com/-K_d4z2sqe1c/UaXAHEMQMqI/AAAAAAAAC3g/OEnl5pAUkaA/3_thumb%25255B3%25255D.jpg?imgmax=800" width="507" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://demo.studiopress.com/education/"&gt;&lt;font face="Tahoma" size="4"&gt;Demo&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma" size="4"&gt; / &lt;/font&gt;&lt;a href="http://www.studiopress.com/themes/education"&gt;&lt;font face="Tahoma" size="4"&gt;Info &amp;amp; Download&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h6&gt;&lt;font face="Tahoma" size="5"&gt;EduPress&lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-ZFo41_o1upw/UaXAH_fUFbI/AAAAAAAAC3o/moIGPby2S9k/s1600-h/4%25255B5%25255D.jpg"&gt;&lt;img title="4" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="339" alt="4" src="http://lh3.ggpht.com/-2eaGLfFSALs/UaXAI56mcBI/AAAAAAAAC3w/e2Ue6Edm-V0/4_thumb%25255B3%25255D.jpg?imgmax=800" width="515" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://demo.wpzoom.com/?theme=edupress"&gt;&lt;font face="Tahoma" size="4"&gt;Demo&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma" size="4"&gt; / &lt;/font&gt;&lt;a href="http://www.wpzoom.com/themes/edupress/"&gt;&lt;font face="Tahoma" size="4"&gt;Info &amp;amp; Download&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h6&gt;&lt;font face="Tahoma" size="5"&gt;Academica&lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-zLbqfvPfLRI/UaXAJ5nqypI/AAAAAAAAC34/G4NH1KuU-E8/s1600-h/5%25255B5%25255D.jpg"&gt;&lt;img title="5" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="341" alt="5" src="http://lh3.ggpht.com/-YamKDL2usPk/UaXALKZRVyI/AAAAAAAAC4A/Al8Pk-oLMBM/5_thumb%25255B3%25255D.jpg?imgmax=800" width="522" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://demo.wpzoom.com/academica/"&gt;&lt;font face="Tahoma" size="4"&gt;Demo&lt;/font&gt;&lt;/a&gt;&lt;font face="Tahoma" size="4"&gt; / &lt;/font&gt;&lt;a href="http://www.wpzoom.com/themes/academica/"&gt;&lt;font face="Tahoma" size="4"&gt;Info &amp;amp; Download&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh5.ggpht.com/-af9xw6Y80is/UaXADOxjo6I/AAAAAAAAC3A/4v0RsnTXFMk/s72-c/1_thumb%25255B2%25255D.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>How to configure JNDI step by step in NetBeans..</title><link>http://niitindrapuri.blogspot.com/2013/04/how-to-configure-jndi-step-by-step-in.html</link><category>java</category><category>Java 1.6</category><category>JNDI</category><category>JSP</category><category>Netbeans</category><category>Servlet</category><pubDate>Wed, 3 Apr 2013 01:11:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-8522848239806782336</guid><description>&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;table cellspacing="0" cellpadding="2" width="400" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;       &lt;td valign="top" width="200"&gt;&lt;strong&gt;&lt;font size="4"&gt;Software &lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;strong&gt;&lt;font size="4"&gt;Version Required&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;       &lt;td valign="top" width="200"&gt;NetBeans IDE&lt;/td&gt;        &lt;td valign="top" width="200"&gt;Java bundle, 6.8 or 6.9 &lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;       &lt;td valign="top" width="200"&gt;Java Development Kit (JDK) &lt;/td&gt;        &lt;td valign="top" width="200"&gt;version 6,7&lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;       &lt;td valign="top" width="200"&gt;GlassFish server &lt;/td&gt;        &lt;td valign="top" width="200"&gt;v3 or Open Source Edition 3.0.1 &lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;       &lt;td valign="top" width="200"&gt;SQL Server&amp;#160; &lt;/td&gt;        &lt;td valign="top" width="200"&gt;2005&lt;/td&gt;     &lt;/tr&gt;&lt;tr&gt;       &lt;td valign="top" width="200"&gt;Type 4 Driver for SQL Server 2005 &lt;/td&gt;        &lt;td valign="top" width="200"&gt;sqljdbc &lt;/td&gt;     &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;SQL Server 2005 Type 4 driver&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;•First Download the SQL Server 2005 Type 4 driver.&lt;/p&gt;&lt;p&gt;•Set the classpath&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-iq3ype71bDE/UVvgjBgNasI/AAAAAAAACcE/-bH-cy0mI14/s1600-h/DriverPath%25255B7%25255D.jpg"&gt;&lt;img title="DriverPath" style="border-top-width: 0px; padding-right: 0px; display: block; padding-left: 0px; border-left-width: 0px; float: none; background-image: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; padding-top: 0px; border-right-width: 0px" height="244" alt="DriverPath" src="http://lh3.ggpht.com/-Ggllc3VIWbE/UVvgkL6DPXI/AAAAAAAACcM/37x-OlNHuc0/DriverPath_thumb%25255B5%25255D.jpg?imgmax=800" width="210" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;strong&gt;&lt;font size="3"&gt;Database Create a database and table in SQL Server 2005&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-2pw5gmd4g6s/UVvgm6g_SiI/AAAAAAAACcU/CJA5U3qbFhM/s1600-h/Login%252520Table%25255B7%25255D.jpg"&gt;&lt;img title="Login Table" style="border-top-width: 0px; padding-right: 0px; display: block; padding-left: 0px; border-left-width: 0px; float: none; background-image: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; padding-top: 0px; border-right-width: 0px" height="177" alt="Login Table" src="http://lh4.ggpht.com/-6sVUj0O4xpM/UVvgo_ddFtI/AAAAAAAACcc/7RCbxnZfVRw/Login%252520Table_thumb%25255B5%25255D.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;font size="3"&gt;&lt;strong&gt;Create a new web Application&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;a href="http://lh5.ggpht.com/-ni_FCtyIhrY/UVvgsrDneyI/AAAAAAAACck/ky6VuqJpV40/s1600-h/1%25255B5%25255D.jpg"&gt;&lt;img title="1" style="border-top-width: 0px; padding-right: 0px; display: block; padding-left: 0px; border-left-width: 0px; float: none; background-image: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; padding-top: 0px; border-right-width: 0px" height="184" alt="1" src="http://lh4.ggpht.com/-6-IGYu-YESI/UVvgtbBzE2I/AAAAAAAACcs/qMr3i_CiKV4/1_thumb%25255B3%25255D.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;a href="http://lh4.ggpht.com/-nTwNAbuBFxI/UVvgwywFxnI/AAAAAAAACc0/_Ki2u6gj8hw/s1600-h/2%25255B6%25255D.jpg"&gt;&lt;img title="2" style="border-top-width: 0px; padding-right: 0px; display: block; padding-left: 0px; border-left-width: 0px; float: none; background-image: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; padding-top: 0px; border-right-width: 0px" height="184" alt="2" src="http://lh6.ggpht.com/-12EkAWuO-1E/UVvgx8gH9XI/AAAAAAAACc8/xb4e3A8LCj4/2_thumb%25255B4%25255D.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;   &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-HU-yJoxZkvQ/UVvg1NrZM7I/AAAAAAAACdE/-a7IX7NFaWM/s1600-h/3%25255B5%25255D.jpg"&gt;&lt;img title="3" style="border-top-width: 0px; padding-right: 0px; display: block; padding-left: 0px; border-left-width: 0px; float: none; background-image: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; padding-top: 0px; border-right-width: 0px" height="184" alt="3" src="http://lh4.ggpht.com/-ZWVmQtRg6U8/UVvg2cnflhI/AAAAAAAACdM/S9dUIgYFKBs/3_thumb%25255B1%25255D.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-ElAZBqnCPDM/UVvg5kD4V1I/AAAAAAAACdU/seV0hPWxqjQ/s1600-h/4%25255B5%25255D.jpg"&gt;&lt;img title="4" style="border-top-width: 0px; padding-right: 0px; display: block; padding-left: 0px; border-left-width: 0px; float: none; background-image: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; padding-top: 0px; border-right-width: 0px" height="184" alt="4" src="http://lh3.ggpht.com/-htCgjgU0nbQ/UVvg62g0MWI/AAAAAAAACdc/kptWNYV1LuQ/4_thumb%25255B1%25255D.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-eH_ipBomVNw/UVvg-bFxjlI/AAAAAAAACdk/_gzgPOsp4Nk/s1600-h/5%25255B5%25255D.jpg"&gt;&lt;img title="5" style="border-top-width: 0px; padding-right: 0px; display: block; padding-left: 0px; border-left-width: 0px; float: none; background-image: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; padding-top: 0px; border-right-width: 0px" height="184" alt="5" src="http://lh5.ggpht.com/-H0ceNFwI-eg/UVvg_u5zYgI/AAAAAAAACds/T3rVnU_nB2g/5_thumb%25255B1%25255D.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-2NZEajK-67Q/UVvhDrN9R6I/AAAAAAAACd0/5F2M55gQUsw/s1600-h/6%25255B5%25255D.jpg"&gt;&lt;img title="6" style="border-top-width: 0px; padding-right: 0px; display: block; padding-left: 0px; border-left-width: 0px; float: none; background-image: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; padding-top: 0px; border-right-width: 0px" height="184" alt="6" src="http://lh5.ggpht.com/-Xg-MUCtWuCw/UVvhE13irTI/AAAAAAAACd8/wzD_iG8ZbWI/6_thumb%25255B1%25255D.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;font size="3"&gt;index.jsp code&lt;/font&gt;&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;pre id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&amp;lt;%-- &lt;br /&gt;Document   : index&lt;br /&gt;Created on : Nov 21, 2012, 3:42:17 PM&lt;br /&gt;Author     : NIIT&lt;br /&gt;--%&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@page contentType=&lt;span style="color: #006080"&gt;&amp;quot;text/html&amp;quot;&lt;/span&gt; pageEncoding=&lt;span style="color: #006080"&gt;&amp;quot;UTF-8&amp;quot;&lt;/span&gt;%&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv=&lt;span style="color: #006080"&gt;&amp;quot;Content-Type&amp;quot;&lt;/span&gt; content=&lt;span style="color: #006080"&gt;&amp;quot;text/html; charset=UTF-8&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;JNDI DEMO&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body bgcolor=&lt;span style="color: #006080"&gt;&amp;quot;pink&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;Login Management System&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;form action=&lt;span style="color: #006080"&gt;&amp;quot;NewServlet&amp;quot;&lt;/span&gt; method=&lt;span style="color: #006080"&gt;&amp;quot;post&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;table align=&lt;span style="color: #006080"&gt;&amp;quot;center&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;User Name &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;input type=&lt;span style="color: #006080"&gt;&amp;quot;text&amp;quot;&lt;/span&gt; name=&lt;span style="color: #006080"&gt;&amp;quot;txtuser&amp;quot;&lt;/span&gt; &amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;Password &amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;input type=&lt;span style="color: #006080"&gt;&amp;quot;password&amp;quot;&lt;/span&gt; name=&lt;span style="color: #006080"&gt;&amp;quot;txtpass&amp;quot;&lt;/span&gt; &amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;input type=&lt;span style="color: #006080"&gt;&amp;quot;submit&amp;quot;&lt;/span&gt; value=&lt;span style="color: #006080"&gt;&amp;quot;Login&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;font size="3"&gt;&lt;strong&gt;Configuration of JNDI&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-P0gOfFkx_fU/UVvhIuCxLoI/AAAAAAAACeE/DbP5oYnIpgs/s1600-h/7%25255B2%25255D.jpg"&gt;&lt;img title="7" style="border-top-width: 0px; padding-right: 0px; display: block; padding-left: 0px; border-left-width: 0px; float: none; background-image: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; padding-top: 0px; border-right-width: 0px" height="184" alt="7" src="http://lh6.ggpht.com/-StPflRNAUrU/UVvhKp_wTbI/AAAAAAAACeM/dW5hFhYQeBY/7_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-14Qe8wHYuKI/UVvhOFI0GmI/AAAAAAAACeU/m-xCYok28H4/s1600-h/8%25255B2%25255D.jpg"&gt;&lt;img title="8" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="8" src="http://lh6.ggpht.com/-8-JnJA6WNWE/UVvhPbvFAyI/AAAAAAAACec/bCKIgEYTCIA/8_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-5Yhv91c99GE/UVvhS3uIAdI/AAAAAAAACek/PPoKRe8BEgY/s1600-h/9%25255B2%25255D.jpg"&gt;&lt;img title="9" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="9" src="http://lh4.ggpht.com/-5AMkMexgl68/UVvhUMgEDpI/AAAAAAAACes/H9OZ257wB6w/9_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-u60cj8Oezes/UVvhXrEZXQI/AAAAAAAACe0/815KKEWlZLQ/s1600-h/10%25255B2%25255D.jpg"&gt;&lt;img title="10" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="10" src="http://lh5.ggpht.com/-mK6r2sEkdBg/UVvhY9GK4aI/AAAAAAAACe8/qQeY5GT85Kg/10_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-Yabq93KBjfs/UVvhb3c-Y8I/AAAAAAAACfE/fr3wFI44B40/s1600-h/11%25255B2%25255D.jpg"&gt;&lt;img title="11" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="11" src="http://lh5.ggpht.com/-TCcq-ZtgcC8/UVvhdGa5zFI/AAAAAAAACfM/4R0YUTv5xn8/11_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-0QHDKSf8ySY/UVvhgrr5JPI/AAAAAAAACfU/WoB__7ND5Dg/s1600-h/12%25255B2%25255D.jpg"&gt;&lt;img title="12" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="12" src="http://lh3.ggpht.com/-XiWndRwZMvA/UVvhhmLRfBI/AAAAAAAACfc/kZ9ZAUoosSM/12_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-jVj2CyC7iTk/UVvhlB273LI/AAAAAAAACfk/aRUdk4Z28_0/s1600-h/13%25255B2%25255D.jpg"&gt;&lt;img title="13" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="13" src="http://lh5.ggpht.com/-2PxfXjCr7rU/UVvhmShIrUI/AAAAAAAACfs/U2y8okuIN6M/13_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-VvWh5PKIV9E/UVvhpzGmGAI/AAAAAAAACf0/LY4x6COacOs/s1600-h/14%25255B2%25255D.jpg"&gt;&lt;img title="14" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="14" src="http://lh3.ggpht.com/-iysP7y4r8i4/UVvhq5HsFeI/AAAAAAAACf8/fyy6SMaKsJ0/14_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-UeiCxkFmrzg/UVvhvQwN7MI/AAAAAAAACgE/phfGxoCQORs/s1600-h/15%25255B2%25255D.jpg"&gt;&lt;img title="15" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="15" src="http://lh3.ggpht.com/-zerJf3cUv7I/UVvhwm1xfSI/AAAAAAAACgM/wZCcmZf9JBo/15_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-o4O9Ng_Ec8E/UVvh0r66INI/AAAAAAAACgU/cw2K7CyGG6I/s1600-h/16%25255B2%25255D.jpg"&gt;&lt;img title="16" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="16" src="http://lh3.ggpht.com/-E9D6DCk-CPk/UVvh14_8T1I/AAAAAAAACgc/ynccT9KjfJU/16_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-l5SU3Sz4iJY/UVvh6E0DieI/AAAAAAAACgk/u5dfbTelyRY/s1600-h/17%25255B2%25255D.jpg"&gt;&lt;img title="17" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="17" src="http://lh6.ggpht.com/-fbMHUpawYyU/UVvh7ZDBgiI/AAAAAAAACgs/PrVu2Xr5V5o/17_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-Rh-VzVyoAbs/UVvh_eJuOhI/AAAAAAAACg0/uc3WHPuBP9c/s1600-h/18%25255B2%25255D.jpg"&gt;&lt;img title="18" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="18" src="http://lh3.ggpht.com/-UC_LJI5-LkI/UVviAkh5zzI/AAAAAAAACg8/H_PuOdk8HFw/18_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-C3Ej36lO-DI/UVviES2pIEI/AAAAAAAAChE/c0C51gZLJDQ/s1600-h/19%25255B2%25255D.jpg"&gt;&lt;img title="19" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="19" src="http://lh4.ggpht.com/-vbNGylgGFIo/UVviFqiafDI/AAAAAAAAChM/V6VJ4HWUiLg/19_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-iEh4hu7VK00/UVviIys_5xI/AAAAAAAAChU/Nifs6vP2PZ8/s1600-h/20%25255B2%25255D.jpg"&gt;&lt;img title="20" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="20" src="http://lh6.ggpht.com/-mi9kTLU5cec/UVviKEYO54I/AAAAAAAAChc/o1Uv2ubI5XU/20_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-lsYZM9bH7hs/UVviNq8YbiI/AAAAAAAAChk/wE7_F5vL4bM/s1600-h/21%25255B2%25255D.jpg"&gt;&lt;img title="21" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="21" src="http://lh3.ggpht.com/-Vpuhx2OVEvY/UVviOnLZGWI/AAAAAAAAChs/Ge0ExuXkisI/21_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-ZN4QUUEZIWg/UVviSdFUTTI/AAAAAAAACh0/31cykp6srpc/s1600-h/22%25255B2%25255D.jpg"&gt;&lt;img title="22" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="22" src="http://lh6.ggpht.com/-jFD1AZTV5Pw/UVviT9HDuGI/AAAAAAAACh8/eQSvOB0WB-w/22_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-KM_QjnUkR-E/UVviXPyF9fI/AAAAAAAACiE/AYPG9bv7H2U/s1600-h/23%25255B2%25255D.jpg"&gt;&lt;img title="23" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="23" src="http://lh5.ggpht.com/-Uq7stb3oKuU/UVviYpYbXxI/AAAAAAAACiM/jc2odo_S9Xc/23_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-vpr5tbkimCo/UVvic25btjI/AAAAAAAACiU/syd-Vi0O4w4/s1600-h/24%25255B2%25255D.jpg"&gt;&lt;img title="24" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="24" src="http://lh4.ggpht.com/-O71UX_xX978/UVvid-7BUVI/AAAAAAAACic/zyYGPZLi8l0/24_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-SojC_YnyAXA/UVvig7BbwmI/AAAAAAAACik/NAawbwaDAK0/s1600-h/25%25255B2%25255D.jpg"&gt;&lt;img title="25" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="25" src="http://lh3.ggpht.com/-EUlxIiDo55M/UVviiJOT9CI/AAAAAAAACis/mat0UHZG15M/25_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-VBv2pGpwrvM/UVvillDUdVI/AAAAAAAACi0/5aZJ_5pEdxk/s1600-h/26%25255B2%25255D.jpg"&gt;&lt;img title="26" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="26" src="http://lh6.ggpht.com/-2PyqE-3jeZQ/UVvimi7UKFI/AAAAAAAACi8/WWSO3dBs84A/26_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-puUwSIiBICs/UVvip6-nTkI/AAAAAAAACjE/l_tsS1GMJhE/s1600-h/27%25255B2%25255D.jpg"&gt;&lt;img title="27" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="27" src="http://lh6.ggpht.com/-0PwyLummcBY/UVviq4ubp9I/AAAAAAAACjM/FqY7Zijyvxs/27_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-QahQ7CzZJY0/UVvivDXKDFI/AAAAAAAACjU/3FwNci0Y_CU/s1600-h/28%25255B2%25255D.jpg"&gt;&lt;img title="28" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="28" src="http://lh6.ggpht.com/-_0VTTscRo0s/UVviwRtFgXI/AAAAAAAACjc/3Jjkbi05aTo/28_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Now Check your Connection Poll is working or not?&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-D3W1n4BufbA/UVvizJ1GoqI/AAAAAAAACjk/T4u5XW7gCu0/s1600-h/Ser1%25255B2%25255D.jpg"&gt;&lt;img title="Ser1" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="Ser1" src="http://lh3.ggpht.com/-fKpwqUNEwBk/UVvi0YbmvaI/AAAAAAAACjs/XMprEpPH8zE/Ser1_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-ebGCe9ZiGDA/UVvi3Ck6vDI/AAAAAAAACj0/buWQCgarf6Y/s1600-h/ser2%25255B2%25255D.jpg"&gt;&lt;img title="ser2" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="ser2" src="http://lh3.ggpht.com/-Ii6A1SC5QEM/UVvi4CB7plI/AAAAAAAACj8/e1siG8M8ysY/ser2_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Oh9HVsUuzn0/UVvi7HF8NcI/AAAAAAAACkE/qXWaWyxmcbE/s1600-h/ser3%25255B2%25255D.jpg"&gt;&lt;img title="ser3" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="ser3" src="http://lh6.ggpht.com/-h-VnwBNrwcA/UVvi8qeUaMI/AAAAAAAACkM/d3Dd1zUfhpc/ser3_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-9mDZCyTzw58/UVvjAcOf4wI/AAAAAAAACkU/lCOnOMaM_rw/s1600-h/ser4%25255B2%25255D.jpg"&gt;&lt;img title="ser4" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="ser4" src="http://lh6.ggpht.com/-7Y6dxKnUozI/UVvjBB1Oe3I/AAAAAAAACkc/cdsi_GbFD1Q/ser4_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-nS2B3erytWE/UVvjEgqAaVI/AAAAAAAACkk/hfCZlfdI0HM/s1600-h/ser5%25255B2%25255D.jpg"&gt;&lt;img title="ser5" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="ser5" src="http://lh5.ggpht.com/-7gW8Cc1A1ZE/UVvjF9TqGXI/AAAAAAAACks/4t1D7Bbve8k/ser5_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-2WRn7cJc0mg/UVvjJpwlLeI/AAAAAAAACk0/pSbToReNl2U/s1600-h/ser6%25255B2%25255D.jpg"&gt;&lt;img title="ser6" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="ser6" src="http://lh5.ggpht.com/-GjRABIXE0SU/UVvjKgJTlMI/AAAAAAAACk8/y4UMiqg2tWQ/ser6_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-24Cs0TWToh0/UVvjOQZV19I/AAAAAAAAClE/ay0TuGIRIX4/s1600-h/ser7%25255B2%25255D.jpg"&gt;&lt;img title="ser7" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="ser7" src="http://lh3.ggpht.com/-r4iq1gRMm_M/UVvjPjBVzHI/AAAAAAAAClM/hGtPURR2VwE/ser7_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Create a Servlet&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-lziqxxEcxtw/UVvjTpeSsWI/AAAAAAAAClU/0udQ6E6UnJg/s1600-h/ser8%25255B2%25255D.jpg"&gt;&lt;img title="ser8" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="ser8" src="http://lh4.ggpht.com/-TnbKejYQTYI/UVvjU1txtHI/AAAAAAAAClc/kVZLpW1201o/ser8_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-3yB-p6Tvnes/UVvjZGbOm4I/AAAAAAAAClk/VLBhg7xRldE/s1600-h/servlet1%25255B2%25255D.jpg"&gt;&lt;img title="servlet1" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet1" src="http://lh6.ggpht.com/-WzxC_5R_4ms/UVvjaKlCWCI/AAAAAAAACls/uaqb2xP_3mM/servlet1_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-FeN0Ac2vAXY/UVvjd7tUFxI/AAAAAAAACl0/qfmoHqOll7g/s1600-h/servlet2%25255B2%25255D.jpg"&gt;&lt;img title="servlet2" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet2" src="http://lh3.ggpht.com/-yOLEiA7Yzao/UVvjfLov2cI/AAAAAAAACl8/xEkJzN3S898/servlet2_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-UNzi68Qt_no/UVvji0LqroI/AAAAAAAACmE/4EYVrZ_H4cc/s1600-h/servlet3%25255B2%25255D.jpg"&gt;&lt;img title="servlet3" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet3" src="http://lh5.ggpht.com/-ARtU3emJccE/UVvjj5me_zI/AAAAAAAACmM/c8QfPR5JEAI/servlet3_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-MxZ9MjByga4/UVvjonET7LI/AAAAAAAACmU/j3JDbqOpK9A/s1600-h/servlet4%25255B2%25255D.jpg"&gt;&lt;img title="servlet4" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet4" src="http://lh5.ggpht.com/-hM-yAO__Fx8/UVvjp_QWj_I/AAAAAAAACmc/7_aJn5VWucc/servlet4_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Servlet Code&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;pre id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.io.IOException;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.io.PrintWriter;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.sql.Connection;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.sql.ResultSet;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.sql.SQLException;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; java.sql.Statement;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; javax.naming.InitialContext;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; javax.naming.NamingException;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; javax.servlet.ServletException;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; javax.servlet.annotation.WebServlet;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; javax.servlet.http.HttpServlet;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletRequest;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;import&lt;/span&gt; javax.sql.DataSource;&lt;br /&gt;@WebServlet(name = &lt;span style="color: #006080"&gt;&amp;quot;NewServlet1&amp;quot;&lt;/span&gt;, urlPatterns = {&lt;span style="color: #006080"&gt;&amp;quot;/NewServlet1&amp;quot;&lt;/span&gt;})&lt;br /&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; NewServlet1 &lt;span style="color: #0000ff"&gt;extends&lt;/span&gt; HttpServlet {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connection con;&lt;br /&gt;ResultSet rs;&lt;br /&gt;Statement st;&lt;br /&gt;InitialContext ctx;&lt;br /&gt;DataSource ds;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;&lt;span style="color: #0000ff"&gt;throws&lt;/span&gt; ServletException, IOException {&lt;br /&gt;response.setContentType(&lt;span style="color: #006080"&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt;);&lt;br /&gt;PrintWriter out = response.getWriter();&lt;br /&gt;&lt;span style="color: #0000ff"&gt;try&lt;/span&gt; {&lt;br /&gt;&lt;br /&gt;String uname,pass;&lt;br /&gt;uname=request.getParameter(&lt;span style="color: #006080"&gt;&amp;quot;txtuser&amp;quot;&lt;/span&gt;);&lt;br /&gt;pass=request.getParameter(&lt;span style="color: #006080"&gt;&amp;quot;txtpass&amp;quot;&lt;/span&gt;);&lt;br /&gt;String qry=&lt;span style="color: #006080"&gt;&amp;quot;select * from Login&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;ctx = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; InitialContext();&lt;br /&gt;ds = (DataSource)ctx.lookup(&lt;span style="color: #006080"&gt;&amp;quot;jdbc/myDatasource&amp;quot;&lt;/span&gt;);&lt;br /&gt;con=ds.getConnection();&lt;br /&gt;st = con.createStatement();&lt;br /&gt;rs = st.executeQuery(qry);&lt;br /&gt;rs.next();&lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(uname.equals(rs.getString(1)) &amp;amp;&amp;amp; pass.equals(rs.getString(2)))&lt;br /&gt;{&lt;br /&gt;out.println(&lt;span style="color: #006080"&gt;&amp;quot;Your User Name and Password is correct&amp;lt;br&amp;gt;&amp;quot;&lt;/span&gt;);&lt;br /&gt;out.println(&lt;span style="color: #006080"&gt;&amp;quot;Welcome Mr. &amp;quot;&lt;/span&gt;+ uname);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;out.print(&lt;span style="color: #006080"&gt;&amp;quot;Invalid User Name &amp;amp; Password&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt;(SQLException ex)&lt;br /&gt;{&lt;br /&gt;out.println(ex.getMessage());&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: #0000ff"&gt;catch&lt;/span&gt;(NamingException nx)&lt;br /&gt;{&lt;br /&gt;out.println(nx.getMessage());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-TZepqX5yPrM/UVvjt9b8EII/AAAAAAAACmk/a0Vbe7H7ke4/s1600-h/servlet5%25255B2%25255D.jpg"&gt;&lt;img title="servlet5" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet5" src="http://lh3.ggpht.com/--6uCCPgWoNY/UVvju3LsNnI/AAAAAAAACms/1CR_ILXwZ1Q/servlet5_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-xY3yGi7Yo9E/UVvjyYLvkwI/AAAAAAAACm0/aLJHnxeL840/s1600-h/servlet6%25255B2%25255D.jpg"&gt;&lt;img title="servlet6" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet6" src="http://lh3.ggpht.com/-gN6q6SspP2o/UVvjzg2dIjI/AAAAAAAACm8/_DhNOW5TRL4/servlet6_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-3HWc_7KDezw/UVvj3XMqcQI/AAAAAAAACnE/SciTsSY7BiU/s1600-h/servlet7%25255B2%25255D.jpg"&gt;&lt;img title="servlet7" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet7" src="http://lh5.ggpht.com/-IyF7s_HwpD4/UVvj458WaMI/AAAAAAAACnM/9T24Y3Dg5kA/servlet7_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-5eZqd40zwnw/UVvj8ri6uYI/AAAAAAAACnU/58I-qzII0Dc/s1600-h/servlet8%25255B2%25255D.jpg"&gt;&lt;img title="servlet8" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet8" src="http://lh6.ggpht.com/-k5olw9n-QnI/UVvj9yHTFsI/AAAAAAAACnc/rBWkWVlhvHU/servlet8_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/-Id80PwB7DG8/UVvkAbBut5I/AAAAAAAACnk/uto7VhneW_E/s1600-h/servlet9%25255B2%25255D.jpg"&gt;&lt;img title="servlet9" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet9" src="http://lh4.ggpht.com/-PkhM76Gjl8M/UVvkBfnviFI/AAAAAAAACns/lmPCnfkqa4A/servlet9_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/-LHhqaml7u6g/UVvkDLOOF_I/AAAAAAAACn0/MK8XzmLtRdI/s1600-h/servlet10%25255B2%25255D.jpg"&gt;&lt;img title="servlet10" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet10" src="http://lh6.ggpht.com/-l9zGCPReqUg/UVvkET2VJVI/AAAAAAAACn8/EML6QpgL_9M/servlet10_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/-egrI9XEai9E/UVvkGkSX5nI/AAAAAAAACoE/xqA_L_nzOfA/s1600-h/servlet11%25255B2%25255D.jpg"&gt;&lt;img title="servlet11" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet11" src="http://lh5.ggpht.com/-bsr3s0DDBxc/UVvkHh_TK1I/AAAAAAAACoM/vN0NUnSpdb8/servlet11_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/-3O2IfCTAYl0/UVvkJlJPtKI/AAAAAAAACoU/h_moQqsTFdg/s1600-h/servlet12%25255B2%25255D.jpg"&gt;&lt;img title="servlet12" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet12" src="http://lh6.ggpht.com/-ALMPpSdSMAQ/UVvkKvOQH5I/AAAAAAAACoc/Sc2eoniXfL8/servlet12_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/-tazHLPMHeo4/UVvkMTL0oLI/AAAAAAAACok/HZVQiDC39LM/s1600-h/servlet13%25255B2%25255D.jpg"&gt;&lt;img title="servlet13" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="184" alt="servlet13" src="http://lh4.ggpht.com/-Mx6blT1DIUE/UVvkNFFgbPI/AAAAAAAACos/-mdl0-nfCjc/servlet13_thumb.jpg?imgmax=800" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh3.ggpht.com/-Ggllc3VIWbE/UVvgkL6DPXI/AAAAAAAACcM/37x-OlNHuc0/s72-c/DriverPath_thumb%25255B5%25255D.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>printf() inside printf ()in C Language.</title><link>http://niitindrapuri.blogspot.com/2013/03/printf-inside-printf-in-c-language.html</link><category>C Language</category><pubDate>Thu, 21 Mar 2013 23:25:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-1471447471076445615</guid><description>&lt;div id="codeSnippetWrapper"&gt;&lt;pre id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; height: 174px; background-color: #f4f4f4; text-align: left; border-bottom-style: none"&gt;&lt;font size="4"&gt;#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; main()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; num=1342;&lt;br /&gt;clrscr();&lt;br /&gt;printf(&lt;span style="color: #006080"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,printf(&lt;span style="color: #006080"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,printf(&lt;span style="color: #006080"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,num)));&lt;br /&gt;getch();&lt;br /&gt;}&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;font size="4"&gt;Output :&lt;br /&gt;&lt;br /&gt;134241&lt;br /&gt;How ?&lt;br /&gt;&lt;br /&gt;Firstly Inner printf &lt;span class="kwrd"&gt;is&lt;/span&gt; executed which results &lt;span class="kwrd"&gt;in&lt;/span&gt; printing 1324 &lt;br /&gt;This Printf Returns total number of Digits i.e  4 and second inner printf will looks like&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,printf(&lt;span class="str"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,4));&lt;br /&gt;It prints 4 and Returns the total number of digits i.e 1 (4 &lt;span class="kwrd"&gt;is&lt;/span&gt; single digit number )&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,1);&lt;br /&gt;It prints simply 1 and output will looks like 132441&lt;br /&gt;Rule :&lt;br /&gt;&lt;br /&gt;Inner printf returns Length of &lt;span class="kwrd"&gt;string&lt;/span&gt; printed on screen to the outer printf&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt; .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;   .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }&lt;/style&gt;  </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Make Your Own Header File in C &amp; C++?</title><link>http://niitindrapuri.blogspot.com/2013/03/make-your-own-header-file-in-c-c.html</link><category>C Language</category><category>C Plus Plus Programs</category><category>C++ Project</category><pubDate>Thu, 21 Mar 2013 23:09:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-7275492737936736483</guid><description>&lt;div class="csharpcode-wrapper" id="codeSnippetWrapper"&gt;&lt;pre class="csharpcode" id="codeSnippet"&gt;Make Your Own Header File ?&lt;br /&gt;&lt;br /&gt;Step1 : Type &lt;span class="kwrd"&gt;this&lt;/span&gt; Code &lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; Multiplication(&lt;span class="kwrd"&gt;int&lt;/span&gt; a,&lt;span class="kwrd"&gt;int&lt;/span&gt; b)&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;return&lt;/span&gt;(a*b);&lt;br /&gt;}&lt;br /&gt;In &lt;span class="kwrd"&gt;this&lt;/span&gt; Code write only &lt;span class="preproc"&gt;function&lt;/span&gt; definition as you write in General C Program&lt;br /&gt;&lt;br /&gt;Step 2 : Save Code&lt;br /&gt;&lt;br /&gt;Save Above Code with [.h ] Extension .&lt;br /&gt;Let name of our header file be myhead [Multhead.h ]&lt;br /&gt;Compile Code &lt;span class="kwrd"&gt;if&lt;/span&gt; required.&lt;br /&gt;&lt;br /&gt;Step 3 : Write Main Program&lt;br /&gt;&lt;br /&gt;#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include&lt;span class="str"&gt;&amp;quot;Multhead.h&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; main()&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; number1=10,number2=10,number3;&lt;br /&gt;number3 = Multiplication(number1,number2);&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;Addition of Two numbers : %d&amp;quot;&lt;/span&gt;,number3);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Include Our New Header File .&lt;br /&gt;Instead of writing &amp;lt; Multhead.h&amp;gt; use &lt;span class="kwrd"&gt;this&lt;/span&gt; terminology “Multhead.h”&lt;br /&gt;All the Functions defined in the Multhead.h header file are now ready &lt;span class="kwrd"&gt;for&lt;/span&gt; use .&lt;br /&gt;Directly  call &lt;span class="preproc"&gt;function&lt;/span&gt; Multiplication(); [ Provide proper parameter and take care of &lt;span class="kwrd"&gt;return&lt;/span&gt; type ]&lt;br /&gt;&lt;br /&gt;Note&lt;br /&gt;&lt;br /&gt;While running your program precaution to be taken : Both files [ Multhead.h and sample.c ] should be in same folder.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:566dab9a-2af4-4a06-a9ee-1a3cf213ac26" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Hedder+file+in+C+%26+C%2b%2b" rel="tag"&gt;Hedder file in C &amp;amp; C++&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://niitindrapuri.blogspot.in/p/c-language-programs.html" target="_blank"&gt;C Language Programs&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://niitindrapuri.blogspot.in/search/?q=C%2B%2B" target="_blank"&gt;C++ Programs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;font size="5"&gt;&lt;/font&gt;  </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Program Displays Colourful Characters in Text Mode and Initialises speaker &amp; Plays Sound of Random Frequencies.</title><link>http://niitindrapuri.blogspot.com/2013/03/program-displays-colourful-characters.html</link><category>C Language</category><pubDate>Thu, 21 Mar 2013 22:59:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-8174246927565214132</guid><description>&lt;div id="codeSnippetWrapper"&gt;&lt;pre class="csharpcode" id="codeSnippet"&gt;#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include&amp;lt;dos.h&amp;gt;&lt;br /&gt;#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;#include&amp;lt;stdlib.h&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; main()&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; count=100;&lt;br /&gt;clrscr();&lt;br /&gt;&lt;span class="kwrd"&gt;while&lt;/span&gt;(count--)&lt;br /&gt;{&lt;br /&gt;sound(10*random(100));&lt;br /&gt;delay(75);&lt;br /&gt;nosound();&lt;br /&gt;textattr(random(16)+&lt;span class="str"&gt;'a'&lt;/span&gt;+BLINK);&lt;br /&gt;cprintf(&lt;span class="str"&gt;&amp;quot;*&amp;quot;&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fbd34617-71e2-4762-bbe8-a5eebbb75453" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Sound+in+C+Language" rel="tag"&gt;Sound in C Language&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Program will accept Year,Month and Date from the user and will display the day of the month.</title><link>http://niitindrapuri.blogspot.com/2013/03/program-will-accept-yearmonth-and-date.html</link><category>C Language</category><pubDate>Wed, 20 Mar 2013 13:06:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-304248001582923601</guid><description>&lt;div id="codeSnippetWrapper"&gt;&lt;pre class="csharpcode" id="codeSnippet"&gt;#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;#include&amp;lt;math.h&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; isdatevalid(&lt;span class="kwrd"&gt;int&lt;/span&gt; month, &lt;span class="kwrd"&gt;int&lt;/span&gt; day, &lt;span class="kwrd"&gt;int&lt;/span&gt; year)&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (day &amp;lt;= 0) &lt;span class="kwrd"&gt;return&lt;/span&gt; 0 ;&lt;br /&gt;&lt;span class="kwrd"&gt;switch&lt;/span&gt;( month )&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 1:&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 3:&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 5:&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 7:&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 8:&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 10:&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 12: &lt;span class="kwrd"&gt;if&lt;/span&gt; (day &amp;gt; 31) &lt;span class="kwrd"&gt;return&lt;/span&gt; 0 ; &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; 1 ;&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 4:&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 6:&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 9:&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 11: &lt;span class="kwrd"&gt;if&lt;/span&gt; (day &amp;gt; 30) &lt;span class="kwrd"&gt;return&lt;/span&gt; 0 ; &lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; 1 ;&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 2:&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; ( day &amp;gt; 29 ) &lt;span class="kwrd"&gt;return&lt;/span&gt; 0 ;&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; ( day &amp;lt; 29 ) &lt;span class="kwrd"&gt;return&lt;/span&gt; 1 ;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;return&lt;/span&gt; 0 ;&lt;br /&gt;}&lt;br /&gt;&lt;span class="kwrd"&gt;return&lt;/span&gt; 0 ;&lt;br /&gt;}&lt;br /&gt;&lt;span class="rem"&gt;//------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; fm(&lt;span class="kwrd"&gt;int&lt;/span&gt; date, &lt;span class="kwrd"&gt;int&lt;/span&gt; month,&lt;span class="kwrd"&gt;int&lt;/span&gt; year)&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; fmonth,leap;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;//leap function 1 for leap &amp;amp; 0 for non-leap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt;((year%100==0) &amp;amp;&amp;amp; (year%400!=0))&lt;br /&gt;leap=0;&lt;br /&gt;&lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt;(year%4==0)&lt;br /&gt;leap=1;&lt;br /&gt;&lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;leap=0;&lt;br /&gt;&lt;br /&gt;fmonth=3+(2-leap)*((month+2)/(2*month))+(5*month+month/9)/2;&lt;br /&gt;&lt;span class="rem"&gt;//f(m) formula&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;fmonth = fmonth % 7; &lt;span class="rem"&gt;//bring it in range of 0 to 6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;return&lt;/span&gt; fmonth;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;//----------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; day_of_week(&lt;span class="kwrd"&gt;int&lt;/span&gt; date, &lt;span class="kwrd"&gt;int&lt;/span&gt; month, &lt;span class="kwrd"&gt;int&lt;/span&gt; year)&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; dow; &lt;span class="rem"&gt;//day of week&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; YY = year % 100;&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; century = year / 100;&lt;br /&gt;&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;nDate: %d/%d/%dnn&amp;quot;&lt;/span&gt;,date,month,year);&lt;br /&gt;&lt;br /&gt;dow = 1.25 *  YY + fm(date,month,year) + date - 2*( century % 4);&lt;br /&gt;&lt;span class="rem"&gt;//function of weekday for Gregorian&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;dow = dow % 7; &lt;span class="rem"&gt;//remainder on division by 7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;switch&lt;/span&gt; (dow)&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 0:&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;weekday = Saturday&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 1:&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;weekday = Sunday&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 2:&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;weekday = Monday&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 3:&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;weekday = Tuesday&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 4:&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;weekday = Wednesday&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 5:&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;weekday = Thursday&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;case&lt;/span&gt; 6:&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;weekday = Friday&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;default&lt;/span&gt;:&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;Incorrect data&amp;quot;&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;span class="kwrd"&gt;return&lt;/span&gt; 0;&lt;br /&gt;}&lt;br /&gt;&lt;span class="rem"&gt;//------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; main()&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; date,month,year;&lt;br /&gt;clrscr();&lt;br /&gt;&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;Enter the year &amp;quot;&lt;/span&gt;);&lt;br /&gt;scanf(&lt;span class="str"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,&amp;amp;year);&lt;br /&gt;&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;Enter the month &amp;quot;&lt;/span&gt;);&lt;br /&gt;scanf(&lt;span class="str"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,&amp;amp;month);&lt;br /&gt;&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;Enter the date &amp;quot;&lt;/span&gt;);&lt;br /&gt;scanf(&lt;span class="str"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,&amp;amp;date);&lt;br /&gt;&lt;br /&gt;day_of_week(date,month,year);&lt;br /&gt;&lt;br /&gt;getch();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Output :&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;pre class="csharpcode" id="codeSnippet"&gt;Enter the year 2012&lt;br /&gt;Enter the month 02&lt;br /&gt;Enter the date 29&lt;br /&gt;&lt;br /&gt;Date: 29/2/2012&lt;br /&gt;&lt;br /&gt;weekday = Wednesday&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Write a C program that reads the customer number and power consumed and prints the amount to be paid by the customer.</title><link>http://niitindrapuri.blogspot.com/2013/03/write-c-program-that-reads-customer.html</link><category>c</category><category>C Language</category><pubDate>Wed, 20 Mar 2013 13:00:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-2202651675852596735</guid><description>&lt;p&gt;&lt;font size="5"&gt;An electric power distribution company charges its domestic consumers as follows.&lt;/font&gt;&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;pre class="csharpcode" id="codeSnippet"&gt;Consumption   Rate of&lt;br /&gt;Units        Charge&lt;br /&gt;------------------------------------------------------&lt;br /&gt;0-200       Rs.0.50 per unit&lt;br /&gt;201-400     Rs.100 plus Rs.0.65 per unit excess 200&lt;br /&gt;401-600     Rs.230 plus Rs.0.80 per unit excess of 400.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;pre class="csharpcode" id="codeSnippet"&gt;#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; main()&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; n, p;&lt;br /&gt;&lt;span class="kwrd"&gt;float&lt;/span&gt; amount;&lt;br /&gt;clrscr();&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;Enter the customer number: &amp;quot;&lt;/span&gt;);&lt;br /&gt;scanf(&lt;span class="str"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,&amp;amp;n);&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;Enter the power consumed: &amp;quot;&lt;/span&gt;);&lt;br /&gt;scanf(&lt;span class="str"&gt;&amp;quot;%d&amp;quot;&lt;/span&gt;,&amp;amp;p);&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt;(p&amp;gt;=0 &amp;amp;&amp;amp; p&amp;lt;=200)&lt;br /&gt;amount=p*0.50;&lt;br /&gt;&lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt;(p&amp;gt;200 &amp;amp;&amp;amp; p&amp;lt;400)&lt;br /&gt;amount = 100+((p-200) * 0.65);&lt;br /&gt;&lt;span class="kwrd"&gt;else&lt;/span&gt; &lt;span class="kwrd"&gt;if&lt;/span&gt;(p&amp;gt;400 &amp;amp;&amp;amp; p&amp;lt;=600)&lt;br /&gt;amount = 230 + ((p-400) * 0.80);&lt;br /&gt;printf(&lt;span class="str"&gt;&amp;quot;Amount to be paid by customer no. %d is Rs.:%5.2f.&amp;quot;&lt;/span&gt;,n,amount);&lt;br /&gt;&lt;br /&gt;getch();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Output : &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;pre class="csharpcode" id="codeSnippet"&gt;Enter the customer number: 1&lt;br /&gt;Enter the power consumed: 100&lt;br /&gt;Amount to be paid by customer no. 1 is Rs.:50.00.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Running Clock in C++ with Graphics</title><link>http://niitindrapuri.blogspot.com/2013/03/running-clock-in-c-with-graphics.html</link><category>C Plus Plus Programs</category><category>C++ Project</category><pubDate>Tue, 19 Mar 2013 13:53:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-6763680849881169456</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;pre class="csharpcode"&gt;&lt;span style="font-size: medium;"&gt;#include&amp;lt;conio.h&amp;gt;&lt;br /&gt;#include&amp;lt;graphics.h&amp;gt;&lt;br /&gt;#include&amp;lt;math.h&amp;gt;&lt;br /&gt;#include&amp;lt;dos.h&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="preproc"&gt;#define&lt;/span&gt; WBC 5&lt;br /&gt;&lt;span class="rem"&gt;//^watchbackcolor&lt;/span&gt;&lt;br /&gt;&lt;span class="preproc"&gt;#define&lt;/span&gt; X 200&lt;br /&gt;&lt;span class="preproc"&gt;#define&lt;/span&gt; Y 200&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; dial(&lt;span class="kwrd"&gt;int&lt;/span&gt; x, &lt;span class="kwrd"&gt;int&lt;/span&gt; y);&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; sechand(&lt;span class="kwrd"&gt;int&lt;/span&gt; timeminute);&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; minhand(&lt;span class="kwrd"&gt;int&lt;/span&gt; t)&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; x1,y1;&lt;br /&gt;setlinestyle(0,0,3);&lt;br /&gt;&lt;br /&gt;x1= X+ (80 * cos(t*0.1047));&lt;br /&gt;y1= Y+ (80 * sin(t*0.1047));&lt;br /&gt;&lt;br /&gt;setcolor(BLACK);&lt;br /&gt;line( X, Y, x1, y1);&lt;br /&gt;&lt;br /&gt;setcolor(WBC+1);&lt;br /&gt;line( X, Y, X+ 80 * cos((t-1)*0.1047),Y+ 80 * sin((t-1)*0.1047));&lt;br /&gt;circle(X,Y,4);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; sechand(&lt;span class="kwrd"&gt;int&lt;/span&gt; t)&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; x1,y1;&lt;br /&gt;setlinestyle(0,0,3);&lt;br /&gt;&lt;br /&gt;x1= X+(100 * cos(t*0.1047));&lt;br /&gt;y1= Y+(100 * sin(t*0.1047));&lt;br /&gt;&lt;br /&gt;setcolor(RED);&lt;br /&gt;line(X, Y, x1, y1);&lt;br /&gt;&lt;br /&gt;setcolor(WBC+1);&lt;br /&gt;line(X, Y, X+ 100 * cos((t-1)*0.1047),Y+ 100 * sin((t-1)*0.1047));&lt;br /&gt;&lt;br /&gt;circle(X,Y,4);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; dial(&lt;span class="kwrd"&gt;int&lt;/span&gt; x,&lt;span class="kwrd"&gt;int&lt;/span&gt; y)&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; size=200;&lt;br /&gt;&lt;br /&gt;setfillstyle(1,WBC);&lt;br /&gt;fillellipse(x,y,size,size);&lt;br /&gt;&lt;br /&gt;setfillstyle(1,WBC+1);&lt;br /&gt;fillellipse(x,y,size-20,size-20);&lt;br /&gt;&lt;br /&gt;outtextxy(x,y-(size-40),&lt;span class="str"&gt;"12"&lt;/span&gt;);&lt;br /&gt;outtextxy(x,y+(size-40),&lt;span class="str"&gt;"6"&lt;/span&gt;);&lt;br /&gt;outtextxy(x+(size-40),y,&lt;span class="str"&gt;"3"&lt;/span&gt;);&lt;br /&gt;outtextxy(x-(size-40),y,&lt;span class="str"&gt;"9"&lt;/span&gt;);&lt;br /&gt;outtextxy(x+size/3,y-2*size/3,&lt;span class="str"&gt;"1"&lt;/span&gt;);&lt;br /&gt;outtextxy(x+2*size/3,y-size/3,&lt;span class="str"&gt;"2"&lt;/span&gt;);&lt;br /&gt;outtextxy(x+2*size/3,y+size/3,&lt;span class="str"&gt;"4"&lt;/span&gt;);&lt;br /&gt;outtextxy(x+size/3,y+2*size/3,&lt;span class="str"&gt;"5"&lt;/span&gt;);&lt;br /&gt;outtextxy(x-size/3,y+2*size/3,&lt;span class="str"&gt;"7"&lt;/span&gt;);&lt;br /&gt;outtextxy(x-2*size/3,y+size/3,&lt;span class="str"&gt;"8"&lt;/span&gt;);&lt;br /&gt;outtextxy(x-size/3,y-2*size/3,&lt;span class="str"&gt;"11"&lt;/span&gt;);&lt;br /&gt;outtextxy(x-2*size/3,y-size/3,&lt;span class="str"&gt;"10"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;circle(x,y,4);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; main()&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;int&lt;/span&gt; gd=DETECT, gm,i,j, flag=1;&lt;br /&gt;initgraph(&amp;amp;gd,&amp;amp;gm,&lt;span class="str"&gt;"C:\\turboc3\\bgi"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;dial(200,200);&lt;br /&gt;&lt;span class="kwrd"&gt;do&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;minhand(i);&lt;br /&gt;&lt;span class="kwrd"&gt;for&lt;/span&gt;(j=0;j&amp;lt;60;j++)&lt;br /&gt;{&lt;br /&gt;sechand(j);&lt;br /&gt;delay(1000&lt;br /&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt;(kbhit()) {&lt;br /&gt;flag =0;&lt;br /&gt;&lt;span class="kwrd"&gt;break&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;i++;&lt;br /&gt;}&lt;span class="kwrd"&gt;while&lt;/span&gt;(flag);&lt;br /&gt;closegraph();&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Output:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-wDsfbviY2v4/UUn6DP2yGBI/AAAAAAAACac/aBUpDDv7DnQ/s1600/clock.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://4.bp.blogspot.com/-wDsfbviY2v4/UUn6DP2yGBI/AAAAAAAACac/aBUpDDv7DnQ/s400/clock.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt; .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://4.bp.blogspot.com/-wDsfbviY2v4/UUn6DP2yGBI/AAAAAAAACac/aBUpDDv7DnQ/s72-c/clock.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Installation Steps For Installing TurboC compiler</title><link>http://niitindrapuri.blogspot.com/2013/02/installation-steps-for-installing.html</link><category>Download</category><pubDate>Wed, 27 Feb 2013 07:18:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-4944917096215144615</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;This guide will explain how to install the TurboC compiler onto the C: drive but you can choose any drive and location that you wish.&lt;br /&gt;Following are the steps to install the TurboC compiler:&lt;br /&gt;1. Copy the truboC.exe file onto the C: drive of your computer.&lt;br /&gt;2. Double-click the truboC.exe file. The Open File – Security Warning dialog box appears, as shown in the following figure.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-XmWmy_4Flvw/US4Y1aslfeI/AAAAAAAACOo/a3YrTfLYBt8/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="306" src="http://3.bp.blogspot.com/-XmWmy_4Flvw/US4Y1aslfeI/AAAAAAAACOo/a3YrTfLYBt8/s400/1.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;3. Click the Run button in the Open File – Security Warning dialog box. The WinZip Self-Extractor – turboC.exe dialog box appears, as shown in the following figure.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-zq1t_nUpRZw/US4c4ErbDFI/AAAAAAAACO8/I90-ssydVDQ/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="241" src="http://3.bp.blogspot.com/-zq1t_nUpRZw/US4c4ErbDFI/AAAAAAAACO8/I90-ssydVDQ/s400/2.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;4. Click the Unzip button. All the files get unzipped and stored in the C:\tctemp folder. If you want, you can change the name and location of the folder.&lt;br /&gt;5. Double-click the C:\tctemp folder. This displays the contents of the folder.&lt;br /&gt;6. Double-click the INSTALL.EXE file. The following window is displayed.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-yJVS7FHx80k/US4dft10nuI/AAAAAAAACPE/G_RSI3UTZM4/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="207" src="http://2.bp.blogspot.com/-yJVS7FHx80k/US4dft10nuI/AAAAAAAACPE/G_RSI3UTZM4/s400/3.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;7. Press the ENTER key. The following widow is displayed.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-74ZtyFBPv5M/US4eadxXjrI/AAAAAAAACPM/IC_HPHos_Rs/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="206" src="http://1.bp.blogspot.com/-74ZtyFBPv5M/US4eadxXjrI/AAAAAAAACPM/IC_HPHos_Rs/s400/4.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;8. Type C as the source drive in the Enter the SOURCE drive to use box.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;9. Press the ENTER key. The following widow is displayed.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-8wO-Oczxgsc/US4fxgkN4kI/AAAAAAAACPY/rnZRE-8-_gQ/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="207" src="http://3.bp.blogspot.com/-8wO-Oczxgsc/US4fxgkN4kI/AAAAAAAACPY/rnZRE-8-_gQ/s400/5.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;10. Press the ENTER key. The following widow is displayed.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-K0XLxTO9Kow/US4gO-z3uTI/AAAAAAAACPg/9z3wjks99cI/s1600/6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="207" src="http://4.bp.blogspot.com/-K0XLxTO9Kow/US4gO-z3uTI/AAAAAAAACPg/9z3wjks99cI/s400/6.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;11. Press the ENTER key with the default option selected. The following widow is displayed.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-r5ubUBrto0Q/US4hsA2KBPI/AAAAAAAACPw/UCV7Uait9Dc/s1600/7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="207" src="http://1.bp.blogspot.com/-r5ubUBrto0Q/US4hsA2KBPI/AAAAAAAACPw/UCV7Uait9Dc/s400/7.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both;"&gt;12. Select the Start Installation option from the options provided in the TurboC Installer window.&lt;/div&gt;&lt;div class="separator" style="clear: both;"&gt;13. Press the ENTER key. The following widow is displayed.&lt;/div&gt;&lt;div class="separator" style="clear: both;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-seuW-VZBDho/US4iEAZ6I_I/AAAAAAAACP4/sBaTINqHpO4/s1600/8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="207" src="http://3.bp.blogspot.com/-seuW-VZBDho/US4iEAZ6I_I/AAAAAAAACP4/sBaTINqHpO4/s400/8.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;14. Press the ENTER key. This completes the installation of the TurboC compiler.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.ziddu.com/download/21694173/turboC.exe.html" target="_blank"&gt;&lt;img border="0" height="102" src="http://2.bp.blogspot.com/-xitUfajyYrw/US4jamludLI/AAAAAAAACQA/QFkp0bE44Qo/s320/Download.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://3.bp.blogspot.com/-XmWmy_4Flvw/US4Y1aslfeI/AAAAAAAACOo/a3YrTfLYBt8/s72-c/1.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Android Programming Tutorials, 3rd Edition</title><link>http://niitindrapuri.blogspot.com/2013/02/android-programming-tutorials-3rd.html</link><category>Android</category><category>Download</category><pubDate>Tue, 26 Feb 2013 13:07:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-4279630745400614419</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-J09AR9tW9pU/US0iO2OEQ4I/AAAAAAAACNw/OknALc5-V3A/s1600/android.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-J09AR9tW9pU/US0iO2OEQ4I/AAAAAAAACNw/OknALc5-V3A/s320/android.JPG" width="284" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;There are two major steps for getting started with Android:&lt;br /&gt;1. Y ou need to install the Android SDK and developer tools&lt;br /&gt;2. Y ou should build a test project to confirm that those tools are&lt;br /&gt;properly installed and configured&lt;br /&gt;If you have already done some form of "hello, world" project with the&lt;br /&gt;development tools on your development machine, you can skip this&lt;br /&gt;tutorial.&lt;br /&gt;If you have not yet installed the Android SDK and related tools, there is an&lt;br /&gt;appendix that covers this process. Once you have the Android SDK, it is&lt;br /&gt;time to make your first Android project. The good news is that this requires&lt;br /&gt;zero lines of code – Android's tools create a "Hello, world!" application for&lt;br /&gt;you as part of creating a new project. All you need to do is build it, install it,&lt;br /&gt;and see it come up on your emulator or device. That is what this tutorial is&lt;br /&gt;for.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://downloads.ziddu.com/downloadfile/21688255/Android_Programming_Tutorials_3rd_Edition.rar.html" target="_blank"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-xpRYxTiY-NE/US0jV9wN3KI/AAAAAAAACN4/SagU0-qe6bQ/s1600/Download.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://4.bp.blogspot.com/-J09AR9tW9pU/US0iO2OEQ4I/AAAAAAAACNw/OknALc5-V3A/s72-c/android.JPG" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>CUSTOMER ENGAGEMENT Highlights-North (NIIT)</title><link>http://niitindrapuri.blogspot.com/2012/11/customer-engagement-highlights-north.html</link><pubDate>Wed, 21 Nov 2012 07:19:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-7559680506712050699</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-oyMaM9TBBUI/UKzvg7kBUkI/AAAAAAAACD0/AdqnIzq03C8/s1600/1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="475" src="http://3.bp.blogspot.com/-oyMaM9TBBUI/UKzvg7kBUkI/AAAAAAAACD0/AdqnIzq03C8/s640/1.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-mNRe8E9nVOg/UKzvj79sM9I/AAAAAAAACD8/L9AlQxrtZVE/s1600/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="478" src="http://1.bp.blogspot.com/-mNRe8E9nVOg/UKzvj79sM9I/AAAAAAAACD8/L9AlQxrtZVE/s640/2.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3DDXZBxlARU/UKzvmDKdcTI/AAAAAAAACEE/pVwJ-yP96X0/s1600/3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="478" src="http://1.bp.blogspot.com/-3DDXZBxlARU/UKzvmDKdcTI/AAAAAAAACEE/pVwJ-yP96X0/s640/3.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-kiv2BSkdREE/UKzwmVuDjsI/AAAAAAAACEM/Xl3xju5Dz-g/s1600/IMG_0984.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/-kiv2BSkdREE/UKzwmVuDjsI/AAAAAAAACEM/Xl3xju5Dz-g/s640/IMG_0984.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://3.bp.blogspot.com/-oyMaM9TBBUI/UKzvg7kBUkI/AAAAAAAACD0/AdqnIzq03C8/s72-c/1.JPG" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Arithmetic Example in JSP using NetBeans</title><link>http://niitindrapuri.blogspot.com/2012/03/arithmetic-example-in-jsp-using.html</link><category>JSP</category><pubDate>Tue, 20 Mar 2012 12:40:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-9110654205424601488</guid><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Create Arithmetic.jsp&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre style="border-bottom: #000000 1px solid; border-left: #000000 1px solid; padding-bottom: 5px; background-color: #ffffff; min-height: 40px; padding-left: 5px; width: 670px; padding-right: 5px; overflow: auto; border-top: #000000 1px solid; border-right: #000000 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;%&lt;span style="color: #008000"&gt;-- &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    Document   : Arithmetic&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    Created &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=on&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;on&lt;/a&gt; : Mar 21, 2012, 1:03:10 AM&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    Author     : dell_pc&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #008000"&gt;--%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;%@page contentType="&lt;span style="color: #8b0000"&gt;text/html&lt;/span&gt;" pageEncoding="&lt;span style="color: #8b0000"&gt;UTF-8&lt;/span&gt;"%&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;!DOCTYPE HTML &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=PUBLIC&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;PUBLIC&lt;/a&gt; "&lt;span style="color: #8b0000"&gt;-//W3C//DTD HTML 4.01 Transitional//EN&lt;/span&gt;"&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;   "&lt;span style="color: #8b0000"&gt;http://www.w3.org/TR/html4/loose.dtd&lt;/span&gt;"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;head&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        &amp;lt;meta http-equiv="&lt;span style="color: #8b0000"&gt;Content-Type&lt;/span&gt;" content="&lt;span style="color: #8b0000"&gt;text/html; charset=UTF-8&lt;/span&gt;"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        &amp;lt;title&amp;gt;Arithmetic Example&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;/head&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;     &amp;lt;h1&amp;gt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Some&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;Some&lt;/a&gt; Arithmetic Example &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=in&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;in&lt;/a&gt; JSP&amp;lt;/h1&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;body&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        a = 13;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        b = 3;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        &amp;lt;%&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=int&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;int&lt;/a&gt; a = 15;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=int&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;int&lt;/a&gt; b = 7;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=int&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;int&lt;/a&gt; result1 = a + b;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        out.println("&lt;span style="color: #8b0000"&gt;&amp;lt;br/&amp;gt; Additon of a and b = &lt;/span&gt;" + result1);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        out.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=print&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;print&lt;/a&gt;("&lt;span style="color: #8b0000"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=int&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;int&lt;/a&gt; result2 = a - b;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        out.println("&lt;span style="color: #8b0000"&gt;&amp;lt;br/&amp;gt; Substraction of a anb b = &lt;/span&gt;" + result2);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        out.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=print&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;print&lt;/a&gt;("&lt;span style="color: #8b0000"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=float&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;float&lt;/a&gt; result3 = a / b;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        out.println("&lt;span style="color: #8b0000"&gt; &amp;lt;br/&amp;gt;Division of a anb b = &lt;/span&gt;" + result3);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        out.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=print&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;print&lt;/a&gt;("&lt;span style="color: #8b0000"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=int&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;int&lt;/a&gt; result4 = a * b;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        out.println("&lt;span style="color: #8b0000"&gt;&amp;lt;br/&amp;gt; Mulitplication of a anb b = &lt;/span&gt;" + result4);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        out.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=print&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;print&lt;/a&gt;("&lt;span style="color: #8b0000"&gt;&amp;lt;br/&amp;gt;&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=for&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;for&lt;/a&gt; (&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=int&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;int&lt;/a&gt; i = 0; i &amp;lt;= 13; i++) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=if&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;if&lt;/a&gt; ((i % 2) == 0) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                            out.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=print&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;print&lt;/a&gt;("&lt;span style="color: #8b0000"&gt; Even number of a : &lt;/span&gt;" + i);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                            out.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=print&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;print&lt;/a&gt;("&lt;span style="color: #8b0000"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    out.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=print&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;print&lt;/a&gt;("&lt;span style="color: #8b0000"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=for&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;for&lt;/a&gt; (&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=int&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;int&lt;/a&gt; i = 0; i &amp;lt;= 13; i++) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=if&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;if&lt;/a&gt; ((i % 2) != 0) {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                            out.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=print&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;print&lt;/a&gt;("&lt;span style="color: #8b0000"&gt; Odd number of a :&lt;/span&gt;" + i);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                            out.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=print&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;print&lt;/a&gt;("&lt;span style="color: #8b0000"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;                    }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        %&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;/body&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Output:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-bMQ3j7N9A_s/T2jdJP7PRpI/AAAAAAAAB50/2gWABp1f4wQ/s1600-h/Arithmetic%25255B5%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Arithmetic" border="0" alt="Arithmetic" src="http://lh5.ggpht.com/-b6iNDbX46eg/T2jdOhjefDI/AAAAAAAAB58/2QgzuulT_WU/Arithmetic_thumb%25255B3%25255D.jpg?imgmax=800" width="548" height="432"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:8531fff7-1e7e-4953-81ac-2ed2ee41e2e1" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/jsp" rel="tag"&gt;jsp&lt;/a&gt;,&lt;a href="http://technorati.com/tags/NetBeans" rel="tag"&gt;NetBeans&lt;/a&gt;&lt;/div&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh5.ggpht.com/-b6iNDbX46eg/T2jdOhjefDI/AAAAAAAAB58/2QgzuulT_WU/s72-c/Arithmetic_thumb%25255B3%25255D.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Login Demo in jsp with NetBeans &amp; SQL Server</title><link>http://niitindrapuri.blogspot.com/2012/03/login-demo-in-jsp-with-netbeans-sql.html</link><category>JSP</category><pubDate>Tue, 20 Mar 2012 12:29:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-5681386335379602470</guid><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Open SQL Server –&amp;gt;Create Data Base-&amp;gt;Create Table-&amp;gt;Insert Value&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Create Data Base&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre style="border-bottom: #000000 1px solid; border-left: #000000 1px solid; padding-bottom: 5px; background-color: #ffffff; min-height: 40px; padding-left: 5px; width: 670px; padding-right: 5px; overflow: auto; border-top: #000000 1px solid; border-right: #000000 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=create&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;create&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=database&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;database&lt;/a&gt; JavaTest ( &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Select&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;Select&lt;/a&gt; line &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=and&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;and&lt;/a&gt; press F5)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=use&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;use&lt;/a&gt; JavaTest ( &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Select&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;Select&lt;/a&gt; line &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=and&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;and&lt;/a&gt; press F5)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Create&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;Create&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;table&lt;/a&gt; Login&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;(&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;       username &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=varchar&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;varchar&lt;/a&gt;(20),&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;       userpass &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=varchar&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;varchar&lt;/a&gt;(20)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=insert&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;insert&lt;/a&gt; &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=into&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;into&lt;/a&gt; Login &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=values&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;values&lt;/a&gt;('&lt;span style="color: #8b0000"&gt;niit&lt;/span&gt;','&lt;span style="color: #8b0000"&gt;password&lt;/span&gt;')&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=select&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;select&lt;/a&gt; * &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=from&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;from&lt;/a&gt; Login&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;username             userpass             &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #008000"&gt;-------------------- -------------------- &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;niit                 password&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;(1 row(s) affected)&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Create DSN Name for your database follow the my previous blog post &lt;/font&gt;&lt;a title="How to Create DSN" href="http://niitindrapuri.blogspot.in/2012/02/jdbc-demo-login-using-netbeans-and-sql.html" rel="JDBC Demo With Netbeans" target="_blank"&gt;&lt;font size="3"&gt;http://niitindrapuri.blogspot.in/2012/02/jdbc-demo-login-using-netbeans-and-sql.html&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Open Netbeans&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;Add &lt;strong&gt;Login.jsp&lt;/strong&gt; Page&lt;/font&gt;&lt;/p&gt;&lt;pre style="border-bottom: #000000 1px solid; border-left: #000000 1px solid; padding-bottom: 5px; background-color: #ffffff; min-height: 40px; padding-left: 5px; width: 670px; padding-right: 5px; overflow: auto; border-top: #000000 1px solid; border-right: #000000 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;%&lt;span style="color: #008000"&gt;-- &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    Document   : Login&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    Created &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=on&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;on&lt;/a&gt; : Mar 21, 2012, 12:15:05 AM&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    Author     : dell_pc&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #008000"&gt;--%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;%@page contentType="&lt;span style="color: #8b0000"&gt;text/html&lt;/span&gt;" pageEncoding="&lt;span style="color: #8b0000"&gt;UTF-8&lt;/span&gt;" import="&lt;span style="color: #8b0000"&gt;java.sql.*&lt;/span&gt;" &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=language&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;language&lt;/a&gt;="&lt;span style="color: #8b0000"&gt;java&lt;/span&gt;"%&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;!DOCTYPE HTML &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=PUBLIC&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;PUBLIC&lt;/a&gt; "&lt;span style="color: #8b0000"&gt;-//W3C//DTD HTML 4.01 Transitional//EN&lt;/span&gt;"&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;   "&lt;span style="color: #8b0000"&gt;http://www.w3.org/TR/html4/loose.dtd&lt;/span&gt;"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;body bgcolor="&lt;span style="color: #8b0000"&gt;pink&lt;/span&gt;"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;form name="&lt;span style="color: #8b0000"&gt;f1&lt;/span&gt;" &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=action&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;action&lt;/a&gt;="&lt;span style="color: #8b0000"&gt;&lt;/span&gt;" method="&lt;span style="color: #8b0000"&gt;post&lt;/span&gt;"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;table&lt;/a&gt; align="&lt;span style="color: #8b0000"&gt;center&lt;/span&gt;"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;td&amp;gt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=User&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;User&lt;/a&gt; Name&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=input&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;input&lt;/a&gt; type="&lt;span style="color: #8b0000"&gt;text&lt;/span&gt;" name="&lt;span style="color: #8b0000"&gt;name&lt;/span&gt;" &amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;td&amp;gt;Password&amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;td&amp;gt;&amp;lt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=input&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;input&lt;/a&gt; type="&lt;span style="color: #8b0000"&gt;password&lt;/span&gt;"  name="&lt;span style="color: #8b0000"&gt;pass&lt;/span&gt;"&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;td&amp;gt;&amp;lt;&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=input&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;input&lt;/a&gt; type="&lt;span style="color: #8b0000"&gt;submit&lt;/span&gt;" name="&lt;span style="color: #8b0000"&gt;btnsubmit&lt;/span&gt;" &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=value&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;value&lt;/a&gt;="&lt;span style="color: #8b0000"&gt;LogIn&lt;/span&gt;"&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;/&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=table&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;table&lt;/a&gt;&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;%&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;String &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=user&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;user&lt;/a&gt;=request.getParameter("&lt;span style="color: #8b0000"&gt;name&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;String pass=request.getParameter("&lt;span style="color: #8b0000"&gt;pass&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;     try{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;     Class.forName("&lt;span style="color: #8b0000"&gt;sun.jdbc.odbc.JdbcOdbcDriver&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;     &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Connection&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;Connection&lt;/a&gt; con=DriverManager.getConnection("&lt;span style="color: #8b0000"&gt;jdbc:odbc:javadsn&lt;/span&gt;", "&lt;span style="color: #8b0000"&gt;sa&lt;/span&gt;", "&lt;span style="color: #8b0000"&gt;niitbpld95&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;     Statement st=con.createStatement();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;     ResultSet rs=st.executeQuery("&lt;span style="color: #8b0000"&gt;select * from login&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;     &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=while&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;while&lt;/a&gt;(rs.&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=next&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;next&lt;/a&gt;())&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;         {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;         String username=rs.getString(1);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;         String password=rs.getString(2);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;         &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=if&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;if&lt;/a&gt;(&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=user&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;user&lt;/a&gt;.equals(username) &amp;amp;&amp;amp; pass.equals(password))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;             {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;             %&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;             &amp;lt;jsp:forward page="&lt;span style="color: #8b0000"&gt;LoginSuccess.jsp&lt;/span&gt;" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;         &amp;lt;%}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;         &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=else&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;else&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;         out.println("&lt;span style="color: #8b0000"&gt;Login Failed,Please try Againe&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;         %&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;         &amp;lt;%&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;     }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;}catch(&lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=Exception&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;Exception&lt;/a&gt; e1)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;{}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;%&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;LoginSuccess.jsp&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;pre style="border-bottom: #000000 1px solid; border-left: #000000 1px solid; padding-bottom: 5px; background-color: #ffffff; min-height: 40px; padding-left: 5px; width: 670px; padding-right: 5px; overflow: auto; border-top: #000000 1px solid; border-right: #000000 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;%&lt;span style="color: #008000"&gt;-- &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    Document   : LoginSuccess&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    Created &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=on&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;on&lt;/a&gt; : Mar 21, 2012, 12:20:49 AM&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    Author     : dell_pc&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #008000"&gt;--%&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;%@page contentType="&lt;span style="color: #8b0000"&gt;text/html&lt;/span&gt;" pageEncoding="&lt;span style="color: #8b0000"&gt;UTF-8&lt;/span&gt;"%&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;!DOCTYPE HTML &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=PUBLIC&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;PUBLIC&lt;/a&gt; "&lt;span style="color: #8b0000"&gt;-//W3C//DTD HTML 4.01 Transitional//EN&lt;/span&gt;"&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;   "&lt;span style="color: #8b0000"&gt;http://www.w3.org/TR/html4/loose.dtd&lt;/span&gt;"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;head&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        &amp;lt;meta http-equiv="&lt;span style="color: #8b0000"&gt;Content-Type&lt;/span&gt;" content="&lt;span style="color: #8b0000"&gt;text/html; charset=UTF-8&lt;/span&gt;"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        &amp;lt;title&amp;gt;JSP Page&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;/head&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;body&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        &amp;lt;h1&amp;gt;U sucessfuly Entered&amp;lt;/h1&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;        &amp;lt;h2&amp;gt;Welcome &lt;a style="color: #0000ff" href="http://search.microsoft.com/default.asp?so=RECCNT&amp;amp;siteid=us%2Fdev&amp;amp;p=1&amp;amp;nq=NEW&amp;amp;qu=to&amp;amp;IntlSearch=&amp;amp;boolean=PHRASE&amp;amp;ig=01&amp;amp;i=09&amp;amp;i=99"&gt;to&lt;/a&gt; My Blog&amp;lt;/h2&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;    &amp;lt;/body&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; deploy your project in Tomcat or any other server&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Run your project&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;font size="3"&gt;Output&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-yOj7t0Gs_dU/T2jaeotFyQI/AAAAAAAAB5U/HzcnYkJqDa0/s1600-h/Login%25255B9%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Login" border="0" alt="Login" src="http://lh5.ggpht.com/-DJnnAcr-vpA/T2jahujij7I/AAAAAAAAB5c/dWAgmvKx-U8/Login_thumb%25255B7%25255D.jpg?imgmax=800" width="631" height="337"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-LmogfyxUBWs/T2jal3jpRdI/AAAAAAAAB5k/gwuA6T7wGn4/s1600-h/Welcome%25255B6%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Welcome" border="0" alt="Welcome" src="http://lh4.ggpht.com/-EN11sDQtWKE/T2japrgxNII/AAAAAAAAB5s/Q0Ac-7PY-Xo/Welcome_thumb%25255B4%25255D.jpg?imgmax=800" width="638" height="315"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1ad3cd3c-bce2-4ea9-ab64-97b9b86539ad" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/jsp" rel="tag"&gt;jsp&lt;/a&gt;&lt;/div&gt;  </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="http://lh5.ggpht.com/-DJnnAcr-vpA/T2jahujij7I/AAAAAAAAB5c/dWAgmvKx-U8/s72-c/Login_thumb%25255B7%25255D.jpg?imgmax=800" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item><item><title>Reverse a number using recursion in c program</title><link>http://niitindrapuri.blogspot.com/2012/03/reverse-number-using-recursion-in-c.html</link><category>C Language</category><pubDate>Sun, 18 Mar 2012 11:19:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1966466819019851389.post-865625421986898360</guid><description>&lt;pre style="border-bottom: #000000 1px solid; border-left: #000000 1px solid; padding-bottom: 5px; background-color: #ffffff; min-height: 40px; padding-left: 5px; width: 670px; padding-right: 5px; overflow: auto; border-top: #000000 1px solid; border-right: #000000 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;#include&amp;lt;stdio.h&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; main(){&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; num,rev;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;printf("&lt;span style="color: #8b0000"&gt;\nEnter a number :&lt;/span&gt;");&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;scanf("&lt;span style="color: #8b0000"&gt;%d&lt;/span&gt;",&amp;amp;num);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;rev=reverse(num);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;printf("&lt;span style="color: #8b0000"&gt;\nAfter reverse the no is :%d&lt;/span&gt;",rev);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #0000ff"&gt;return&lt;/span&gt; 0;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; sum=0,r;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; reverse(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; num){&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(num){&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;r=num%10;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;sum=sum*10+r;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;reverse(num/10);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #0000ff"&gt;return&lt;/span&gt; sum;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;&lt;span style="color: #0000ff"&gt;return&lt;/span&gt; sum;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 15px"&gt;}&lt;/pre&gt;&lt;/pre&gt;  </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><author>noreply@blogger.com (Dilip Bari)</author></item></channel></rss>