<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7908029536884302293</id><updated>2012-01-02T14:45:22.665+05:30</updated><title type='text'>Hello World</title><subtitle type='html'>God always favor to the prepaid mind.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-6482831043653604446</id><published>2012-01-02T14:45:00.001+05:30</published><updated>2012-01-02T14:45:22.676+05:30</updated><title type='text'>setting debug port in the Tomcat and weblogic</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;strong&gt;&lt;u&gt;Tomcat&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;adding this stuff to your startup script so that you are always running tomcat in debug mode.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Open the startup script in (your_tomcat_home)/bin (WIN: startup.bat, UNIX: startup.sh)&lt;/li&gt;&lt;li&gt;Add the following lines at the first blank line in the file (around line 8)&lt;br /&gt;WIN: &lt;div class="code panel" style="border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;&lt;pre class="code-java"&gt;set JPDA_ADDRESS=8000&lt;br /&gt;set JPDA_TRANSPORT=dt_socket&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;UNIX: &lt;br /&gt;&lt;div class="code panel" style="border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;&lt;pre class="code-java"&gt;export JPDA_ADDRESS=8000&lt;br /&gt;export JPDA_TRANSPORT=dt_socket&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Change the execute line at the end to include &lt;b&gt;jpda start&lt;/b&gt;&lt;br /&gt;WIN: &lt;div class="code panel" style="border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;&lt;pre class="code-java"&gt;call &lt;span class="code-quote"&gt;"%EXECUTABLE%"&lt;/span&gt; jpda start %CMD_LINE_ARGS%&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;UNIX: &lt;br /&gt;&lt;div class="code panel" style="border-bottom-width: 1px; border-left-width: 1px; border-right-width: 1px; border-top-width: 1px;"&gt;&lt;div class="codeContent panelContent"&gt;&lt;pre class="code-java"&gt;exec &lt;span class="code-quote"&gt;"$PRGDIR"&lt;/span&gt;/&lt;span class="code-quote"&gt;"$EXECUTABLE"&lt;/span&gt; jpda start &lt;span class="code-quote"&gt;"$@"&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Run the startup script when starting tomcat to run tomcat in debug mode&lt;/li&gt;&lt;/ol&gt;&lt;strong&gt;&lt;u&gt;Weblogic&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; use the following points to enable the debug port &lt;br /&gt;&lt;ol&gt;&lt;li&gt;go to the domain in the weblogic&lt;/li&gt;&lt;li&gt;open the bin&lt;/li&gt;&lt;li&gt;edit the setDomainEnv.sh&lt;/li&gt;&lt;li&gt;past the &lt;span lang="EN"&gt;JAVA_DEBUG="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8087,server=y,suspend=n -Djava.compiler=NONE"&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span lang="EN"&gt;then execute the startWeblogic.sh&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-6482831043653604446?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/6482831043653604446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2012/01/setting-debug-port-in-tomcat-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6482831043653604446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6482831043653604446'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2012/01/setting-debug-port-in-tomcat-and.html' title='setting debug port in the Tomcat and weblogic'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-5754694065274315580</id><published>2011-12-30T18:05:00.001+05:30</published><updated>2011-12-30T20:06:53.874+05:30</updated><title type='text'>installing the SVN</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Use the following site to install svn plug-in&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;a href="http://www.roseindia.net/projectmanagement/continuousintegration/subeclipse/subversion-eclipse.shtml"&gt;&lt;span style="color: purple; font-family: Calibri;"&gt;http://www.roseindia.net/projectmanagement/continuousintegration/subeclipse/subversion-eclipse.shtml&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;Proxy setting in the windows&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="background: white; line-height: 18pt; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Go to C:\Documents and Settings\user\Application data\subversion\&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Find server file&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Add the proxy setting&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: 18pt; margin: 9.4pt 0in 15.65pt 0.5in; mso-add-space: auto;"&gt;&lt;span style="color: #124587; font-family: &amp;quot;Trebuchet MS&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 11.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;[global]&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: 18pt; margin: 9.4pt 0in 15.65pt 0.5in; mso-add-space: auto;"&gt;&lt;span style="color: #124587; font-family: &amp;quot;Trebuchet MS&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 11.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;http-proxy-host = web-proxy.mycompany.com&lt;br /&gt;http-proxy-port = 8080&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: 18pt; margin: 9.4pt 0in 15.65pt 0.5in; mso-add-space: auto;"&gt;&lt;span style="color: #124587; font-family: &amp;quot;Trebuchet MS&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 11.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;http-proxy-username = &amp;lt;userID&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: 18pt; margin: 9.4pt 0in 15.65pt 0.5in; mso-add-space: auto;"&gt;&lt;span style="color: #124587; font-family: &amp;quot;Trebuchet MS&amp;quot;, &amp;quot;sans-serif&amp;quot;; font-size: 11.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;http-proxy-password = &amp;lt;password&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="background: white; line-height: 18pt; margin: 9.4pt 0in 15.65pt 0.5in; mso-add-space: auto;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-5754694065274315580?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/5754694065274315580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2011/12/installing-svn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5754694065274315580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5754694065274315580'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2011/12/installing-svn.html' title='installing the SVN'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-8033651965681689410</id><published>2011-12-30T11:53:00.001+05:30</published><updated>2011-12-30T12:07:14.376+05:30</updated><title type='text'>Installing and using the Maven</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Follow the following steps to create the Maven&lt;br /&gt;&lt;div style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;1.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;Download the latest version of Maven from the following site&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;a href="http://maven.apache.org/download.html#Installation"&gt;http://maven.apache.org/download.html#Installation&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;2.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;Extract the downloaded zip file &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;3.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;Create .bat file using the following line&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 1in; mso-list: l1 level2 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;a.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;@SET MAVEN_ARGS=%*&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 1in; mso-list: l1 level2 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;b.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;@SET JAVA_HOME=C:\HOMEWARE\sunjdk160_10&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 1in; mso-list: l1 level2 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;c.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;@SET JAVA_CMD="%JAVA_HOME%\bin\java.exe"&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 1in; mso-list: l1 level2 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;d.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;@SET M2_HOME=C:\HOMEWARE\mywork\apache-maven-3.0.3&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 1in; mso-list: l1 level2 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;e.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;@SET CPATH=%M2_HOME%\boot\plexus-classworlds-2.4.jar&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 1in; mso-list: l1 level2 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;f.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;%JAVA_CMD% -classpath %CPATH% -Dclassworlds.conf=%M2_HOME%\bin\m2.conf -Dmaven.home=%M2_HOME% org.codehaus.classworlds.Launcher %MAVEN_ARGS% -e&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;4.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;Name this batch file as “mvn.bat”&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;5.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;Then run the mvn –version for checking the installation &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in; mso-list: l1 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="mso-list: Ignore;"&gt;6.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;Change the JAVA_HOME and M2_HOME path as per the installation of java and maven&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;Setting the repository&lt;/b&gt;&lt;br /&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Go to the path which is specified in the M2_HOME &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Then open the conf folder&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Find the setting.xml file&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;4.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Find the &amp;lt;localRepository /&amp;gt; tag&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo2; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;a.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Specify the repository &lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;path as per the convince&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo2; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;i.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&amp;lt;localRepository&amp;gt;C:\HOMEWARE\maven-local-repo&amp;lt;/localRepository&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;5.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;If you’re in the office &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo2; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;a.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;find the available and accessible mirrors and fill in the &lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&amp;lt;mirror /&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo2; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;b.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;configure all public repositories and plug-in repository in the &amp;lt;profile /&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 10pt;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-family: Calibri;"&gt;Using Maven&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;1.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Download a project from the one of the famous site&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin: 5pt 0in 5pt 1in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l2 level2 lfo3; text-indent: -0.25in;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;span style="mso-list: Ignore;"&gt;a.&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;, &amp;quot;serif&amp;quot;; font-size: 12pt;"&gt;svn checkout &lt;b&gt;&lt;i&gt;http&lt;/i&gt;&lt;/b&gt;://micrite.googlecode.com/svn/trunk/ micrite-read-only &lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;2.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Extract the zip file in the c:\&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l2 level1 lfo3; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;3.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;Copy our mvn.bat file in to the &lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;project file and run the following commands&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l2 level2 lfo3; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;a.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;mvn clean&lt;span style="mso-tab-count: 1;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l2 level2 lfo3; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;b.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;mvn install&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l2 level2 lfo3; text-indent: -0.25in;"&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font-family: Calibri;"&gt;c.&lt;/span&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;mvn eclips:eclipse&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.75in; mso-add-space: auto;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.75in; mso-add-space: auto;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-8033651965681689410?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/8033651965681689410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2011/12/simple-steps-to-create-maven.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8033651965681689410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8033651965681689410'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2011/12/simple-steps-to-create-maven.html' title='Installing and using the Maven'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-1107112894820993914</id><published>2011-11-21T20:01:00.001+05:30</published><updated>2011-11-21T21:05:28.903+05:30</updated><title type='text'>Calculate Bond Price in Java</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;strong&gt;&lt;u&gt;Calculate Bond Price in Java&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;We tried all the tools to calculate the BondPrice .finaly nothing achived with third party tools .&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;Luckly we found the following class to calculate the yeild price of the Bond. This class is more accurate &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;than any other tool.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; java.text.DateFormat;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;div align="left"&gt;import&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; java.text.SimpleDateFormat;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;div align="left"&gt;import&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; java.util.Calendar;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;div align="left"&gt;import&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;　&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; java.util.Date;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;div align="left"&gt;public&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;Calendar maturity = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;maturity.setTime(&lt;i&gt;formatDate&lt;/i&gt;(&lt;/div&gt;&lt;div align="left"&gt;Calendar settlement = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;settlement.setTime(&lt;i&gt;formatDate&lt;/i&gt;(&lt;/div&gt;&lt;div align="left"&gt;Price price = &lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;class&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Price {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;static&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; main(String[] args) {&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"08/28/2012"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;));&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"02/29/2012"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;));&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Price();&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;try&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; priceVa2 = price.tbondPrice( &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Date(settlement.getTimeInMillis()), &lt;/span&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;// settlementDate&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Date(maturity.getTimeInMillis()), &lt;/span&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;// maturityDate&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;0.0865, &lt;/div&gt;&lt;/span&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;// rate&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;0.0895205173068493, &lt;/div&gt;&lt;/span&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;// yield&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;100., &lt;/div&gt;&lt;/span&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;// redemption&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;2, &lt;/div&gt;&lt;/span&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;// frequency&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;0 &lt;/div&gt;&lt;/span&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;&lt;span style="color: #3f7f5f; font-size: x-small;"&gt;// basis&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;);&lt;/div&gt;&lt;div align="left"&gt;System.&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;} &lt;/div&gt;&lt;div align="left"&gt;e.printStackTrace();&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;Calendar cal=&lt;/div&gt;&lt;div align="left"&gt;Date date1 =&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="color: #0000c0; font-size: x-small;"&gt;&lt;span style="color: #0000c0; font-size: x-small;"&gt;out&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;.println(priceVa2);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;catch&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (Exception e) {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;static&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Date formatDate(String date)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;null&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;null&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;try&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;DateFormat formatter ; &lt;/div&gt;&lt;div align="left"&gt;formatter = &lt;/div&gt;&lt;div align="left"&gt;date1 = (Date)formatter.parse(date); &lt;/div&gt;&lt;div align="left"&gt;cal=Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;cal.setTime(date1);&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;e.printStackTrace();&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;paramCalendar1.add(5, -1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;paramCalendar2.add(5, 1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;paramCalendar2.add(5, -1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; SimpleDateFormat(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"MM/dd/yyyy"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;catch&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;(Exception e){&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; date1; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;long&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; days360(Calendar paramCalendar1, Calendar paramCalendar2, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;boolean&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramBoolean)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; i = paramCalendar1.get(5);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; j = paramCalendar2.get(5);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; k = paramCalendar1.get(2);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; l = paramCalendar2.get(2);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; i1 = paramCalendar1.get(1);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; i2 = paramCalendar2.get(1);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (!(paramBoolean))&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (i &amp;gt; 30)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; ((j == 31) &amp;amp;&amp;amp; (i &amp;gt; 30))&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (j == 31)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;paramCalendar1.add(5, -1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;paramCalendar2.add(5, -1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;i = paramCalendar1.get(5);&lt;/div&gt;&lt;div align="left"&gt;j = paramCalendar2.get(5);&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;d1 += paramDouble2 * Math.&lt;i&gt;pow&lt;/i&gt;(d3, d2 * -1.0D);&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;d2 += 1.0D;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;d1 -= paramDouble4;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;d1 = 0.0D;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;d1 = 100.0D * paramDouble1 / frequency;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;Calendar SettlementDt = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;SettlementDt.setTimeInMillis(paramDate1.getTime());&lt;/div&gt;&lt;div align="left"&gt;Calendar maturityDt = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;maturityDt.setTimeInMillis(paramDate2.getTime());&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;Calendar prevCpnDt = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;prevCpnDt.set(SettlementDt.get(1) + 1, maturityDt.get(2), maturityDt.get(5) - 1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (i &amp;gt; 30)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (j &amp;gt; 30)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; i3 = (i2 - i1) * 12 + l - k;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (i3 * 30 + j - i);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; calculatedPrice(&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble1, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble2, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble3, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble4, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble5, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramInt1, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramInt2)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; j = paramInt1;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d3 = 1.0D + paramDouble1 / paramInt2;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d2 = paramDouble5;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d1 = paramDouble3 * Math.&lt;i&gt;pow&lt;/i&gt;(d3, (j - 1 + d2) * -1.0D);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (paramDouble2 &amp;gt; 0.0D)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;for&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; i = 1; i &amp;lt;= j; ++i)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d1;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; tbondPrice(Date paramDate1, Date paramDate2, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble1, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble2, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble3, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; frequency, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramInt2)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throws&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d1;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (paramDouble1 == 0.0D)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; j = 12 / frequency;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (((SettlementDt.get(1) + 1) % 4 != 0) &amp;amp;&amp;amp; (maturityDt.get(2) == 2) &amp;amp;&amp;amp; (maturityDt.get(5) == 29))&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;prevCpnDt.set(SettlementDt.get(1) + 1, maturityDt.get(2), maturityDt.get(5));&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;prevCpnDt.set(maturityDt.get(1), maturityDt.get(2), maturityDt.get(5));&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;prevCpnDt.add(2, j * -1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;Calendar nextCpnDt = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;nextCpnDt.set(prevCpnDt.get(1), prevCpnDt.get(2), prevCpnDt.get(5));&lt;/div&gt;&lt;div align="left"&gt;nextCpnDt.add(2, j);&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;l2 = days360(prevCpnDt, nextCpnDt, &lt;/div&gt;&lt;div align="left"&gt;l1 = days360(SettlementDt, nextCpnDt, &lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (maturityDt.getTimeInMillis() &amp;lt; SettlementDt.getTimeInMillis()) {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throw&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"The maturity date mast be greater then settlement date."&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (paramDouble3 &amp;lt; 0.0D)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throw&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"The redemption price must be grater than zero."&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; ((frequency != 1) &amp;amp;&amp;amp; (frequency != 2) &amp;amp;&amp;amp; (frequency != 3) &amp;amp;&amp;amp; (frequency != 4) &amp;amp;&amp;amp; (frequency != 6) &amp;amp;&amp;amp; (frequency != 12))&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throw&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"The frequency must be 1, 2, 3, 4, 6, or 12."&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; ((paramInt2 != 1) &amp;amp;&amp;amp; (paramInt2 != 0)) {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throw&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"The basis must be 1 or 0."&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (prevCpnDt.getTimeInMillis() &amp;gt; maturityDt.getTimeInMillis())&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;while&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (prevCpnDt.getTimeInMillis() &amp;gt; SettlementDt.getTimeInMillis())&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; maxPeriod = (maturityDt.get(1) - prevCpnDt.get(1)) * 12 + maturityDt.get(2) - prevCpnDt.get(2);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; i = maxPeriod / j;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;long&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; l2;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;long&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; l1;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (paramInt2 == 0)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;l2 = nextCpnDt.getTimeInMillis() - prevCpnDt.getTimeInMillis();&lt;/div&gt;&lt;div align="left"&gt;l1 = nextCpnDt.getTimeInMillis() - SettlementDt.getTimeInMillis();&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;d4 = (paramDouble3 + d1) / (paramDouble2 * d5 + 1.0D) - d3;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;d4 = calculatedPrice(paramDouble2, d1, paramDouble3, d3, d2, i, frequency);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;d += paramArrayOfDouble1[j] * Math.&lt;i&gt;exp&lt;/i&gt;(-paramArrayOfDouble3[j] * paramArrayOfDouble2[j]);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;d5 = 0.0D;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;d5 = 100.0D * paramDouble1 / paramInt1;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;Calendar localCalendar1 = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;localCalendar1.setTimeInMillis(paramDate1.getTime());&lt;/div&gt;&lt;div align="left"&gt;Calendar localCalendar2 = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;localCalendar2.setTimeInMillis(paramDate2.getTime());&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;Calendar localCalendar3 = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;localCalendar3.set(localCalendar1.get(1) + 1, localCalendar2.get(2), localCalendar2.get(5) - 1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d2 = Double.&lt;i&gt;parseDouble&lt;/i&gt;(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;""&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;+l1) / Double.&lt;i&gt;parseDouble&lt;/i&gt;(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;""&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;+l2);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d3 = d1 * (1.0D - d2);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d4;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; ((i == 1) || (i == 0))&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d5 = d2 / frequency;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d4;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; priceOfBond(&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble1, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble2, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble3, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;[] paramArrayOfDouble1, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;[] paramArrayOfDouble2, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;[] paramArrayOfDouble3)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d = 0.0D;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; i = paramArrayOfDouble1.&lt;/span&gt;&lt;span style="color: #0000c0; font-size: x-small;"&gt;&lt;span style="color: #0000c0; font-size: x-small;"&gt;length&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;for&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; j = 0; j &amp;lt; i; ++j) {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (paramDouble1 * Math.&lt;i&gt;exp&lt;/i&gt;(-paramDouble3 * paramDouble2) + d);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;public&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; yieldToMaturityFromPrice(Date paramDate1, Date paramDate2, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble1, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble2, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble3, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramInt1, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramInt2)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throws&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d5;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (paramDouble1 == 0.0D)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; k = 12 / paramInt1;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (localCalendar2.getTimeInMillis() &amp;lt; localCalendar1.getTimeInMillis())&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throw&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"The maturity date mast be greater then settlement date"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (paramDouble2 &amp;lt; 0.0D)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throw&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"The price must be strictly positive."&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (paramDouble3 &amp;lt; 0.0D)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throw&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"The redemption price must be grater than zero."&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; ((paramInt1 != 1) &amp;amp;&amp;amp; (paramInt1 != 2) &amp;amp;&amp;amp; (paramInt1 != 3) &amp;amp;&amp;amp; (paramInt1 != 4) &amp;amp;&amp;amp; (paramInt1 != 6) &amp;amp;&amp;amp; (paramInt1 != 12))&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throw&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"The frequency must be 1, 2, 3, 4, 6, or 12."&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; ((paramInt2 != 1) &amp;amp;&amp;amp; (paramInt2 != 0)) {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;throw&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; Exception(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"The basis must be 1 or 0."&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (((localCalendar1.get(1) + 1) % 4 != 0) &amp;amp;&amp;amp; (localCalendar2.get(2) == 2) &amp;amp;&amp;amp; (localCalendar2.get(5) == 29))&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;localCalendar3.set(localCalendar1.get(1) + 1, localCalendar2.get(2), localCalendar2.get(5));&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;localCalendar3.set(localCalendar2.get(1), localCalendar2.get(2), localCalendar2.get(5));&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;localCalendar3.add(2, k * -1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;Calendar localCalendar4 = Calendar.&lt;i&gt;getInstance&lt;/i&gt;();&lt;/div&gt;&lt;div align="left"&gt;localCalendar4.set(localCalendar3.get(1), localCalendar3.get(2), localCalendar3.get(5));&lt;/div&gt;&lt;div align="left"&gt;localCalendar4.add(2, k);&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;l2 = days360(localCalendar3, localCalendar4, &lt;/div&gt;&lt;div align="left"&gt;l1 = days360(localCalendar1, localCalendar4, &lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (localCalendar3.getTimeInMillis() &amp;gt; localCalendar2.getTimeInMillis())&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;while&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (localCalendar3.getTimeInMillis() &amp;gt; localCalendar1.getTimeInMillis())&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; l = (localCalendar2.get(1) - localCalendar3.get(1)) * 12 + localCalendar2.get(2) - localCalendar3.get(2);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; j = l / k;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;long&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; l2;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;long&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; l1;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (paramInt2 == 0)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;false&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;l2 = localCalendar4.getTimeInMillis() - localCalendar3.getTimeInMillis();&lt;/div&gt;&lt;div align="left"&gt;l1 = localCalendar4.getTimeInMillis() - localCalendar1.getTimeInMillis();&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;d4 = yieldWith1Coupon(d5, paramDouble3, paramDouble2, d7, d6, paramInt1);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d6 = l1 / l2;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d7 = d5 * (1.0D - d6);&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d4;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; ((j == 1) || (j == 0))&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;d2 = 0.1D;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;d2 *= 2.0D;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;d4 = 0.5D * (d3 + d2);&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;d3 = d4;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d3 = -1.0D;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d2 = paramDouble1;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (d2 == 0.0D)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;while&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (calculatedPrice(d2, d5, paramDouble3, d7, d6, j, paramInt1) &amp;gt; paramDouble2)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;for&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; i = 1; i &amp;lt;= 200; ++i)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d1 = calculatedPrice(d4, d5, paramDouble3, d7, d6, j, paramInt1) - paramDouble2;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (Math.&lt;i&gt;abs&lt;/i&gt;(d1) &amp;lt; 0.0001D) {&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;break&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (d1 &amp;gt; 0.0D)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;d2 = d4;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;d4 = 0.5D * (d3 + d2);&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;{&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;}&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d4;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; yieldWith1Coupon(&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble1, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble2, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble3, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble4, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramDouble5, &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;int&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; paramInt)&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d3 = paramDouble2 + paramDouble1;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d1 = paramDouble3 + paramDouble4;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d2 = d3 / d1 - 1.0D;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;double&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; d4 = paramDouble5 / paramInt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;&lt;span style="color: #7f0055; font-size: x-small;"&gt;return&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (d2 / d4);&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;strong&gt;import&lt;/strong&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-1107112894820993914?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/1107112894820993914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2011/11/calculate-bond-price-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/1107112894820993914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/1107112894820993914'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2011/11/calculate-bond-price-in-java.html' title='Calculate Bond Price in Java'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-5963673362826039323</id><published>2011-10-14T11:47:00.001+05:30</published><updated>2011-10-14T11:52:33.501+05:30</updated><title type='text'>A small note on Nostro and Vostro</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;A bank counts a &lt;i&gt;nostro&lt;/i&gt; account with a credit balance as a cash asset in its balance sheet. Conversely, a &lt;i&gt;vostro&lt;/i&gt; account with a credit balance (i.e. a deposit) is a liability, and a &lt;i&gt;vostro&lt;/i&gt; with a debit balance (a loan) is an asset. Thus in many banks a credit entry on an account ("CR") is regarded as negative movement, and a debit ("DR") is positive - the reverse of usual commercial accounting conventions.&lt;br /&gt;With the advent of computerised accounting, nostros and vostros just need to have opposite signs within any one bank's accounting system; that is, if a nostro in credit has a positive sign, then a vostro in credit must have a negative sign. This allows for a reconciliation by summing all accounts to zero (a trial balance) - the basic premise of double-entry bookkeeping.&lt;br /&gt;&lt;span style="font-size: medium;"&gt;Typical usage:&lt;/span&gt;Nostro accounts are mostly commonly used for currency settlement, where a bank or other financial institution needs to hold balances in a currency other than its home accounting unit.&lt;br /&gt;For example: First National Bank of &lt;i&gt;A&lt;/i&gt; does some transactions (loans, foreign exchange, etc.) in USD, but banks in &lt;i&gt;A&lt;/i&gt; will only handle payments in AUD. So FNB of &lt;i&gt;A&lt;/i&gt; opens a USD account at foreign bank Credit Mutuel de &lt;i&gt;B&lt;/i&gt;, and instructs all counter-parties to settle transactions in USD at "account no. 123456 in name of &lt;i&gt;FNBA&lt;/i&gt;, at &lt;i&gt;CMB&lt;/i&gt;, &lt;i&gt;X&lt;/i&gt; Branch". FNBA maintains its own records of that account, for reconciliation; this is its &lt;i&gt;nostro&lt;/i&gt; account. CMB's record of the same account is the &lt;i&gt;vostro&lt;/i&gt; account.&lt;br /&gt;Now, FNBA sells AUD1,000,000 to &lt;i&gt;C&lt;/i&gt; (a counterparty who has an AUD account with FNBA, and a USD account with CMB) for a net consideration of USD2,000,000. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;strong&gt;FNBA will make the following entries in its own accounting system:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" dir="ltr" style="width: 623px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="middle" width="36%"&gt;&lt;span style="font-size: x-small;"&gt;(Internal) FX AUD trading account&lt;/span&gt;&lt;/td&gt;&lt;td valign="middle" width="14%"&gt;&lt;span style="font-size: x-small;"&gt;1,000,000 DR&lt;/span&gt;&lt;/td&gt;&lt;td valign="middle" width="36%"&gt;&lt;span style="font-size: x-small;"&gt;AUD Account in name of C&lt;/span&gt;&lt;/td&gt;&lt;td valign="middle" width="14%"&gt;&lt;span style="font-size: x-small;"&gt;1,000,000 CR&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="middle" width="36%"&gt;&lt;span style="font-size: x-small;"&gt;USD Nostro at CMB (FNBA's nostro)&lt;/span&gt;&lt;/td&gt;&lt;td valign="middle" width="14%"&gt;&lt;span style="font-size: x-small;"&gt;2,000,000 DR&lt;/span&gt;&lt;/td&gt;&lt;td valign="middle" width="36%"&gt;&lt;span style="font-size: x-small;"&gt;(Internal) FX USD trading account&lt;/span&gt;&lt;/td&gt;&lt;td valign="middle" width="14%"&gt;&lt;span style="font-size: x-small;"&gt;2,000,000 CR&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Over at CMB, they record the following transaction:&lt;br /&gt;&lt;table border="0" cellpadding="0" cellspacing="0" dir="ltr" style="width: 630px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="middle" width="27%"&gt;&lt;span style="font-size: x-small;"&gt;USD Account in name of C&lt;/span&gt;&lt;/td&gt;&lt;td valign="middle" width="14%"&gt;&lt;span style="font-size: x-small;"&gt;2,000,000 DR&lt;/span&gt;&lt;/td&gt;&lt;td valign="middle" width="46%"&gt;&lt;span style="font-size: x-small;"&gt;USD Account in name of FNBA (CMB's vostro)&lt;/span&gt;&lt;/td&gt;&lt;td valign="middle" width="14%"&gt;&lt;span style="font-size: x-small;"&gt;2,000,000 CR&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-5963673362826039323?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/5963673362826039323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2011/10/small-note-nostro-vostro.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5963673362826039323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5963673362826039323'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2011/10/small-note-nostro-vostro.html' title='A small note on Nostro and Vostro'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-520295635801023526</id><published>2011-06-03T16:37:00.003+05:30</published><updated>2011-06-10T09:56:22.870+05:30</updated><title type='text'>Grouping tags based on Condition +XSLT</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here we are going to discus about how to group the tags under some condition in xslt. I will explain this by taking the Employer example.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Before this we need to know some of the xslt functions and template calling&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;generate-id()&lt;/li&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;li&gt;key()&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:key&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:template&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/ul&gt;Suppose we have one xml which is having many number of branches in a company .Each branch has&amp;nbsp;many number of employees. The xml looks like this.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size: x-small;"&gt;&amp;lt;?&lt;u&gt;xml&lt;/u&gt; version="1.0" ?&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;div align="left"&gt;&amp;lt;Employees&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamID&amp;gt;1&amp;lt;/TeamID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamName&amp;gt;Sales&amp;lt;/TeamName&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TaskID&amp;gt;1&amp;lt;/TaskID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Hours&amp;gt;5&amp;lt;/Hours&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;EmployeeID&amp;gt;1&amp;lt;/EmployeeID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Name&amp;gt;Bob&amp;lt;/Name&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Surname&amp;gt;&lt;u&gt;Shibob&lt;/u&gt;&amp;lt;/Surname&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;/Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamID&amp;gt;1&amp;lt;/TeamID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamName&amp;gt;Sales&amp;lt;/TeamName&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TaskID&amp;gt;2&amp;lt;/TaskID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Hours&amp;gt;4&amp;lt;/Hours&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;EmployeeID&amp;gt;1&amp;lt;/EmployeeID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Name&amp;gt;Bob&amp;lt;/Name&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Surname&amp;gt;&lt;u&gt;Shibob&lt;/u&gt;&amp;lt;/Surname&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;/Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamID&amp;gt;1&amp;lt;/TeamID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamName&amp;gt;Sales&amp;lt;/TeamName&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TaskID&amp;gt;4&amp;lt;/TaskID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Hours&amp;gt;7&amp;lt;/Hours&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;EmployeeID&amp;gt;2&amp;lt;/EmployeeID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Name&amp;gt;&lt;u&gt;Sara&lt;/u&gt;&amp;lt;/Name&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Surname&amp;gt;Lee&amp;lt;/Surname&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;/Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamID&amp;gt;2&amp;lt;/TeamID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamName&amp;gt;Finance&amp;lt;/TeamName&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TaskID&amp;gt;5&amp;lt;/TaskID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Hours&amp;gt;2&amp;lt;/Hours&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;EmployeeID&amp;gt;3&amp;lt;/EmployeeID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Name&amp;gt;John&amp;lt;/Name&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Surname&amp;gt;Smith&amp;lt;/Surname&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;/Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamID&amp;gt;2&amp;lt;/TeamID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamName&amp;gt;Finance&amp;lt;/TeamName&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TaskID&amp;gt;3&amp;lt;/TaskID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Hours&amp;gt;4&amp;lt;/Hours&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;EmployeeID&amp;gt;4&amp;lt;/EmployeeID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Name&amp;gt;Penny&amp;lt;/Name&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Surname&amp;gt;Wise&amp;lt;/Surname&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;/Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamID&amp;gt;2&amp;lt;/TeamID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TeamName&amp;gt;Finance&amp;lt;/TeamName&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;TaskID&amp;gt;5&amp;lt;/TaskID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Hours&amp;gt;3&amp;lt;/Hours&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;EmployeeID&amp;gt;4&amp;lt;/EmployeeID&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Name&amp;gt;Penny&amp;lt;/Name&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;Surname&amp;gt;Wise&amp;lt;/Surname&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;/Employee&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&amp;lt;/Employees&amp;gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;strong&gt;&lt;u&gt;To do this &lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="color: teal; font-family: 'Courier New';"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;First declare the one key variable &lt;/div&gt;&lt;div style="margin-left: 0.5in;"&gt;&lt;b&gt;&lt;span style="color: teal; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New';"&gt;xsl:key&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: 'Courier New';"&gt; &lt;b&gt;&lt;span style="color: #7f007f;"&gt;name&lt;/span&gt;&lt;/b&gt;=&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"&lt;/span&gt;&lt;/i&gt;&lt;/span&gt; keyEmployeeID&lt;i&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New';"&gt;"&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family: 'Courier New';"&gt; &lt;b&gt;&lt;span style="color: #7f007f;"&gt;match&lt;/span&gt;&lt;/b&gt;=&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;Employee&lt;i&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New';"&gt;"&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family: 'Courier New';"&gt; &lt;b&gt;&lt;span style="color: #7f007f;"&gt;use&lt;/span&gt;&lt;/b&gt;=&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"&lt;/span&gt;&lt;/i&gt;&lt;/span&gt; EmployeeID&lt;i&gt;&lt;span style="color: #2a00ff; font-family: 'Courier New';"&gt;"&lt;/span&gt;&lt;/i&gt;&lt;b&gt;&lt;span style="color: teal; font-family: 'Courier New';"&gt;/&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Then write a for loop for iterating the Employee set&lt;/div&gt;&lt;div style="margin-left: 0.5in;"&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New';"&gt;&amp;lt;xsl:for-each&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family: 'Courier New';"&gt; &lt;b&gt;&lt;span style="color: #7f007f;"&gt;select&lt;/span&gt;&lt;/b&gt;=&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"Employee”&amp;gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Then generate and id for each key value of employes&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt 0.25in;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;span style="color: teal; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New';"&gt;xsl:for-each&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family: 'Courier New';"&gt; &lt;b&gt;&lt;span style="color: #7f007f;"&gt;select&lt;/span&gt;&lt;/b&gt;=&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"…………generate-id(key('keyEmployeeID', EmployeeID)[1])]"&lt;/span&gt;&lt;/i&gt;&lt;b&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: 12pt;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoListParagraph" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"&gt;&lt;span style="font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;·&lt;span style="font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt;"&gt;Assign all this ids in to a array&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt 0.5in;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;b&gt;&lt;span style="color: teal; font-family: 'Courier New';"&gt;&amp;lt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;u&gt;&lt;span style="color: #3f7f7f; font-family: 'Courier New';"&gt;xsl:for-each&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span style="font-family: 'Courier New';"&gt; &lt;b&gt;&lt;span style="color: #7f007f;"&gt;select&lt;/span&gt;&lt;/b&gt;=&lt;i&gt;&lt;span style="color: #2a00ff;"&gt;"tEmployee[generate-id(.) = generate-id(key('keyEmployeeID', EmployeeID)[1])]"&lt;/span&gt;&lt;/i&gt;&lt;b&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-520295635801023526?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/520295635801023526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2011/06/grouping-tags-based-on-condtion-xslt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/520295635801023526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/520295635801023526'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2011/06/grouping-tags-based-on-condtion-xslt.html' title='Grouping tags based on Condition +XSLT'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-2427283377557970124</id><published>2011-06-03T15:24:00.000+05:30</published><updated>2011-06-03T15:24:34.102+05:30</updated><title type='text'>Valid XSD format values</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;&lt;u&gt;xs:datetime &lt;/u&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Valid xs:datetime value is 2005-05-27T14:11:00.943Z but the following values are not the valid one&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;2005-05-27 14:11:00.943Z (missing date and time separator "T"), &lt;/li&gt;&lt;li&gt;2005-05-27T14:11:00.943 (missing time zone)&lt;/li&gt;&lt;li&gt;2005-05-27 14:11:00.943 (missing time separator and time zone). &lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;&lt;u&gt;xs:date&lt;/u&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;2005-05-27Z is a valid xs:date value but 2005-05-27 is not since no time zone is specified&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: red; font-size: small;"&gt;&lt;strong&gt;&lt;u&gt;xs:boolean&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-size: small;"&gt;&lt;span style="color: black;"&gt;True is not a valid xs:boolean valied.It sholud be'true'.similarly 'False' is not valid value,it is 'false'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: red; font-size: small;"&gt;&lt;strong&gt;&lt;u&gt;xs:decimal&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black; font-size: small;"&gt;value 0.12345678 but not 12E-4.to convert scientific number in to the decimal format you neet to use the following template &lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;convertSciToNumString (which is published in the previous post)&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-2427283377557970124?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/2427283377557970124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2011/06/valid-xsd-format-values.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2427283377557970124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2427283377557970124'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2011/06/valid-xsd-format-values.html' title='Valid XSD format values'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-407649832072520274</id><published>2011-06-03T15:03:00.000+05:30</published><updated>2011-06-03T15:03:08.562+05:30</updated><title type='text'>XStream - Features</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="color: black; font-family: 'Arial Narrow','sans-serif'; mso-bidi-font-family: +mj-cs; mso-bidi-font-weight: bold; mso-fareast-font-family: +mj-ea;"&gt;XStream is a simple library to serialize objects to XML and back again.&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;&lt;span style="color: red;"&gt;&lt;strong&gt;&lt;u&gt;Features&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;Ease of use.&lt;/span&gt;&lt;span lang="FR" style="mso-ansi-language: FR;"&gt; A high level facade is supplied that simplifies common use cases. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;No mappings required.&lt;/span&gt;&lt;span lang="FR" style="mso-ansi-language: FR;"&gt; Most objects can be serialized without need for specifying mappings. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;Performance.&lt;/span&gt;&lt;span lang="FR" style="mso-ansi-language: FR;"&gt; Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;Clean XML.&lt;/span&gt;&lt;span lang="FR" style="mso-ansi-language: FR;"&gt; No information is duplicated that can be obtained via reflection. This results in XML that is easier to read for humans and more compact than native Java serialization. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;Requires no modifications to objects.&lt;/span&gt;&lt;span lang="FR" style="mso-ansi-language: FR;"&gt; Serializes internal fields, including private and final. Supports non-public and inner classes. Classes are not required to have default constructor.&lt;br /&gt;&lt;span style="mso-bidi-font-weight: bold;"&gt;Full object graph support.&lt;/span&gt; Duplicate references encountered in the object-model will be maintained. Supports circular references. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;Integrates with other XML APIs.&lt;/span&gt;&lt;span lang="FR" style="mso-ansi-language: FR;"&gt; By implementing an interface, XStream can serialize directly to/from any tree structure (not just XML). &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;Customizable conversion strategies.&lt;/span&gt;&lt;span lang="FR" style="mso-ansi-language: FR;"&gt; Strategies can be registered allowing customization of how particular types are represented as XML. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;Error messages.&lt;/span&gt;&lt;span lang="FR" style="mso-ansi-language: FR;"&gt; When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem. &lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin: 0in 0in 0pt; mso-list: l0 level1 lfo1;"&gt;&lt;span lang="FR" style="mso-ansi-language: FR; mso-bidi-font-weight: bold;"&gt;Alternative output format.&lt;/span&gt;&lt;span lang="FR" style="mso-ansi-language: FR;"&gt; The modular design allows other output formats. XStream ships currently with JSON support and morphing&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-407649832072520274?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/407649832072520274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2011/06/xstream-features.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/407649832072520274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/407649832072520274'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2011/06/xstream-features.html' title='XStream - Features'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-4751937590076895277</id><published>2011-05-31T14:52:00.001+05:30</published><updated>2011-06-10T10:52:41.705+05:30</updated><title type='text'>converting scientific number to Number - XSLT</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;To conver BigDecimal number in to the normal number in xslt ,we need to write&amp;nbsp; a new template .&lt;br /&gt;then call this template in the following way&lt;br /&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:call-template&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"convertSciToNumString"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:with-param&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"inputVal"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"percentAmmo"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:call-template&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;Template is&lt;/strong&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:template&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"convertSciToNumString"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:param&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"inputVal"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"0"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"max-exp"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"'0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"numInput"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"translate(string($inputVal),'e','E')"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="color: #3f5fbf; font-size: x-small;"&gt;&lt;span style="color: #3f5fbf; font-size: x-small;"&gt;&amp;lt;!-- ==== Mantisa ==== --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"numMantisa"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"number(substring-before($numInput,'E'))"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="color: #3f5fbf; font-size: x-small;"&gt;&lt;span style="color: #3f5fbf; font-size: x-small;"&gt;&amp;lt;!-- ==== Exponent ==== --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"numExponent"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:choose&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:when&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;test&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"contains($numInput,'E+')"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"substring-after($numInput,'E+')"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:when&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:otherwise&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"substring-after($numInput,'E')"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:otherwise&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:choose&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="color: #3f5fbf; font-size: x-small;"&gt;&lt;span style="color: #3f5fbf; font-size: x-small;"&gt;&amp;lt;!-- ==== Coefficient ==== --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"numCoefficient"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:choose&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:when&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;test&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"0 &amp;gt; $numExponent"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:text&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;0.&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:text&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"substring($max-exp, 1, -number($numExponent)-1)"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:text&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;1&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:text&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:when&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:when&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;test&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"$numExponent &amp;gt; 0"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:text&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;1&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:text&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"substring($max-exp, 1, number($numExponent))"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:when&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:otherwise&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;1&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:otherwise&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:choose&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"result"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"number($numCoefficient) * number($numMantisa)"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:variable&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:choose&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:when&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;test&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"$result = 'NaN'"&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"$numInput"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:when&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:otherwise&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:value-of&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;&lt;span style="color: #7f007f; font-size: x-small;"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;=&lt;/span&gt;&lt;i&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;&lt;span style="color: #2a00ff; font-size: x-small;"&gt;"$result"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:otherwise&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;div align="left"&gt;&lt;/div&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:choose&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;lt;/&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;&lt;span style="color: #3f7f7f; font-size: x-small;"&gt;xsl:template&lt;/span&gt;&lt;/span&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&lt;span style="color: teal; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/i&gt;&lt;/b&gt;&lt;/b&gt; &lt;br /&gt;&lt;div align="left"&gt;&amp;lt;&lt;/div&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-4751937590076895277?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/4751937590076895277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2011/05/converting-scientific-number-to-number.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4751937590076895277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4751937590076895277'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2011/05/converting-scientific-number-to-number.html' title='converting scientific number to Number - XSLT'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-3970474602569476526</id><published>2011-05-31T14:31:00.002+05:30</published><updated>2011-05-31T14:39:09.414+05:30</updated><title type='text'>Cloud Computing -VMForce</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-GmuZrq-19tk/TeSrn0OKgxI/AAAAAAAAEbU/OFo32Ug9tV4/s1600/Picture2.png" imageanchor="1" style="clear: left; cssfloat: right; float: left; height: 202px; margin-bottom: 1em; margin-right: 1em; width: 343px;"&gt;&lt;img border="0" height="201px" src="http://4.bp.blogspot.com/-GmuZrq-19tk/TeSrn0OKgxI/AAAAAAAAEbU/OFo32Ug9tV4/s320/Picture2.png" width="320px" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;Cloud computing refers to the use of networked infrastructure software and the capacity to provide resources to users in an on-demand environment. With cloud computing, information is permanently stored in servers on the Internet and cached temporarily on desktop computers, notebooks, handhelds, or other client devices. In this model, often referred to as “utility computing,” users can access common business applications online from virtually any end user device, on a pay-per-use basis.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; By design, cloud computing is scalable and elastic, offering IT departments a way to increase capacity or add capabilities on demand, without investing in new infrastructure, training new personnel, or licensing new software.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;u&gt;&lt;span style="color: #e60028; font-family: 'Arial Narrow'; font-size: x-large; font-weight: bold; language: en-US; mso-ascii-font-family: 'Arial Narrow'; mso-bidi-font-family: +mj-cs; mso-color-index: 3; mso-fareast-font-family: +mj-ea;"&gt;VM&lt;em&gt;f&lt;/em&gt;orce&amp;nbsp;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;a href="http://3.bp.blogspot.com/-Bw44_dvQGpY/TeSoruzSZzI/AAAAAAAAEbI/YyWoxYmvGGI/s1600/Picture1.png" imageanchor="1" style="clear: right; cssfloat: right; float: right; height: 256px; margin-bottom: 1em; margin-left: 1em; width: 383px;"&gt;&lt;img border="0" height="245px" src="http://3.bp.blogspot.com/-Bw44_dvQGpY/TeSoruzSZzI/AAAAAAAAEbI/YyWoxYmvGGI/s320/Picture1.png" width="320px" /&gt;&lt;/a&gt;&lt;span style="mso-bidi-font-weight: bold; mso-fareast-font-family: +mn-ea;"&gt;The first enterprise cloud computing platform for Java developers &lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold; mso-fareast-font-family: +mj-ea;"&gt;. This new service will provide enterprise developers with the powerful combination of the Java programming language, the Spring framework, and the Force.com cloud platform. With VMforce, Java developers will be able to build and deploy enterprise apps that are instantly social and available on mobile devices in real time, and that seamlessly leverage Force.com’s cloud database and pre-built platform elements, including reporting and analytics, search, web services API, and application security services. And all of these apps will run on salesforce.com’s trusted global cloud computing infrastructure&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;div style="direction: ltr; language: en-US; margin-bottom: 0pt; margin-top: 0pt; text-align: left; unicode-bidi: embed; vertical-align: baseline;"&gt;&lt;span style="color: #e60028; font-family: 'Times New Roman'; font-size: x-large; font-weight: bold; language: en-US; mso-ascii-font-family: 'Times New Roman'; mso-bidi-font-family: +mn-cs; mso-color-index: 3; mso-fareast-font-family: +mn-ea; mso-font-kerning: 12.0pt;"&gt;&lt;u&gt;Categories of Cloud&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt; vertical-align: baseline;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: black; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-fareast-font-family: +mn-ea; mso-font-kerning: 12.0pt;"&gt;When one digs more into the Cloud, there are many types and models of Cloud like Private Cloud, Public Cloud, Hybrid Cloud, Community Cloud, Enterprise Cloud, Infrastructure as a service (IAAS), Platform as a service (PAAS), Software as a Service (SAAS), Business as a service (BAAS), Gaming as a service (GAAS), BPaas, Haas…or easier to say…Anything as a service(XAAS).&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;a href="http://1.bp.blogspot.com/-dtflqBjmWhQ/TeSt1_FXFTI/AAAAAAAAEbc/KPqGU1eWgBI/s1600/Picture3.png" imageanchor="1" style="clear: left; cssfloat: right; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="170px" src="http://1.bp.blogspot.com/-dtflqBjmWhQ/TeSt1_FXFTI/AAAAAAAAEbc/KPqGU1eWgBI/s320/Picture3.png" width="320px" /&gt;&lt;/a&gt;&lt;span style="color: black; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-fareast-font-family: +mn-ea; mso-font-kerning: 12.0pt;"&gt;Cloud computing is broken down in to few different categories based on the type of service provided&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -0.25in;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: black; font-family: 'Arial','sans-serif'; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-fareast-font-family: Arial; mso-font-kerning: 12.0pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;•&lt;span style="font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-fareast-font-family: +mn-ea; mso-font-kerning: 12.0pt;"&gt;SaaS (Software as a Service) is the category of cloud computing in which the main resources available as a service are software applications&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -0.25in;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: black; font-family: 'Arial','sans-serif'; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-fareast-font-family: Arial; mso-font-kerning: 12.0pt;"&gt;&lt;span style="mso-list: Ignore;"&gt;•&lt;span style="font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-fareast-font-family: +mn-ea; mso-font-kerning: 12.0pt;"&gt;PaaS (Platform as a Service) is the category/application of cloud computing in which the service providers deliver a computing platform or a solution stack to their subscribers over the internet.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-3970474602569476526?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/3970474602569476526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2011/05/cloud-computing-vmforce.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3970474602569476526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3970474602569476526'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2011/05/cloud-computing-vmforce.html' title='Cloud Computing -VMForce'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-GmuZrq-19tk/TeSrn0OKgxI/AAAAAAAAEbU/OFo32Ug9tV4/s72-c/Picture2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-4712241521241485973</id><published>2010-07-29T16:18:00.003+05:30</published><updated>2010-08-10T14:52:54.506+05:30</updated><title type='text'>Corporate Action</title><content type='html'>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;When any public company issued some securities and it initiate an even regarding that securities is called Corporate Action. Dividend is one of the types of CA.&lt;br /&gt;&lt;strong&gt;The primary reasons for CA&lt;/strong&gt;&lt;br /&gt;• Return profit to the shareholders &lt;br /&gt;• Influences the share prices&lt;br /&gt;• Corporate restructuring-&lt;br /&gt;&lt;strong&gt;Ways of announcing CA&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Dividend&lt;/strong&gt;: Here dividend is the classical example to CA. Company will distribute the profit to the entire share holder. Equity price in the secondary market get adjust because of this CA but as point of the company it is positive sentiment in the secondary market for their equity.&lt;br /&gt;&lt;strong&gt;Bonus&lt;/strong&gt;: company performs well and they want to share the profit to the share holders in the form equity. Equity price will adjust in the market because of this CA but company prospective liquidity will increase in the secondary market. There is an issue here, some share holder are not qualified to take the bonus so they will accrue the loss.&lt;br /&gt;&lt;strong&gt;Stock splitting&lt;/strong&gt;: increase or decrease the number of shares in the market to increase or decrease the price of the stock market &lt;br /&gt;&lt;strong&gt;Spinoffs&lt;/strong&gt;: Are an example of a corporate action where a company breaks itself up in order to focus on its core competencies.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Following List shows how many ways of announcing CA&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Cash Dividend,&lt;/li&gt;&lt;li&gt;Optional Dividend, &lt;/li&gt;&lt;li&gt;Stock Dividend,&lt;/li&gt;&lt;li&gt;&amp;nbsp;Stock Split, &lt;/li&gt;&lt;li&gt;Spin Off,&lt;/li&gt;&lt;li&gt;&amp;nbsp;Acquisition,&lt;/li&gt;&lt;li&gt;&amp;nbsp;Rights Offering,&lt;/li&gt;&lt;li&gt;&amp;nbsp;Debt Redemption,&lt;/li&gt;&lt;li&gt;&amp;nbsp;Bonds Exchange,&lt;/li&gt;&lt;li&gt;&amp;nbsp;Bankrupts, &lt;/li&gt;&lt;li&gt;Debt Repurchase, &lt;/li&gt;&lt;li&gt;Reclassification, &lt;/li&gt;&lt;li&gt;Buyback Offer, &lt;/li&gt;&lt;li&gt;Pay in Kind.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-4712241521241485973?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/4712241521241485973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/corporate-action.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4712241521241485973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4712241521241485973'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/corporate-action.html' title='Corporate Action'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-6979286977781218700</id><published>2010-07-21T16:03:00.000+05:30</published><updated>2010-07-21T16:03:14.077+05:30</updated><title type='text'>An Option -One of The Derivative</title><content type='html'>An option is a contract to buy or sell a specific financial product officially known as the option's underlying instrument or underlying interest.It has an expiration date. When an option expires, it no longer has value and no longer exists.&lt;br /&gt;Options come in two varieties, calls and puts, and you can buy or sell either type. &lt;br /&gt;&lt;u&gt;&lt;b&gt;Buying and Selling&lt;/b&gt; &lt;/u&gt;&lt;br /&gt;If you buy a call, you have the right to buy the underlying instrument at the strike price on or before the expiration date. If you buy a put, you have the right to sell the underlying instrument on or before expiration. In either case, as the option holder, you also have the right to sell the option to another buyer during its term or to let it expire worthless.&lt;br /&gt;&lt;br /&gt;When you sell a call as an opening transaction, you're obligated to sell the underlying interest at the strike price, if you're assigned. When you sell a put as an opening transaction, you're obligated to buy the underlying interest, if assigned. &lt;br /&gt;&lt;b&gt;At a Premium &lt;/b&gt;&lt;br /&gt;When you buy an option, the purchase price is called the premium. If you sell, the premium is the amount you receive. The premium isn't fixed and changes constantly - so the premium you pay today is likely to be higher or lower than the premium yesterday or tomorrow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-6979286977781218700?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/6979286977781218700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/option-one-of-derivative.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6979286977781218700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6979286977781218700'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/option-one-of-derivative.html' title='An Option -One of The Derivative'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-3203033898426266153</id><published>2010-07-21T15:47:00.000+05:30</published><updated>2010-07-21T15:47:42.057+05:30</updated><title type='text'>Investment Banking</title><content type='html'>Raising the capital to the Corporation or Government by underwriting and acting as agent in the issuance of the securities.it also assists companies involved in mergers and acquisitions, divestitures.&lt;br /&gt;An investment Bank is spited into so called Front-office ,middle office and Back Office.&lt;br /&gt;Front-Office deals the sales and trading,research on the market&lt;br /&gt;Middle-Office deals with the Risk Management,Corporate Treasury ,Financial Control and Corporate sategy&lt;br /&gt;Back-Office deals with the Operation and technologies&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Corporations investment bankers offers when and how to place their investments in the market .Investment Bank mainly to satisfy both issuers and investor.Here investors are expecting the high returns on their investments&amp;nbsp;.In other side Issuers are expecting more capital with lowest interest rates for a long time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-3203033898426266153?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/3203033898426266153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/investment-banking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3203033898426266153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3203033898426266153'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/investment-banking.html' title='Investment Banking'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-8315741328393532573</id><published>2010-07-21T15:42:00.000+05:30</published><updated>2010-07-21T15:42:23.409+05:30</updated><title type='text'>Forex Markets - Trade Life Cycle</title><content type='html'>&lt;b&gt;Trading Position&lt;/b&gt;&lt;br /&gt;1.When you buy / sell a currency , you are said to hold a Position&lt;br /&gt;2.Position denotes your size of holding in that currency&lt;br /&gt;3.When you buy – “going long or overbought”&lt;br /&gt;4.When you sell – “going short or oversold”&lt;br /&gt;5.If you have no position – “ being square”&lt;br /&gt;&lt;b&gt;FORWARD CONTRACT :&lt;/b&gt;&lt;br /&gt;A contractual commitment to buy or sell a specified amount of&lt;br /&gt;foreign exchange for a specified price (forward exchange rate )&lt;br /&gt;at a specified future date (maturity of contract ).&lt;br /&gt;&lt;b&gt;Premium/ Discount :&lt;/b&gt;&lt;br /&gt;.Forward exchange rates can be higher or lower than the applicable spot rate.&lt;br /&gt;.The difference between spot rate and forward rate is called ‘swap premium or discount’&lt;br /&gt;.If the base currency interest rate is higher – discount – forward rate is lower&lt;br /&gt;.If the base currency interest rate is lower – premium – forward rate is higher&lt;br /&gt;&lt;b&gt;What is a Swap?&lt;/b&gt;&lt;br /&gt;1 Exchange of two currencies and their re-exchange later&lt;br /&gt;2 A swap is a lending and borrowing transaction achieved through the foreign exchange market.&lt;br /&gt;3 Instead of lending(borrowing) and borrowing(lending), we just sell(buy) and buy(sell) in the forex market.&lt;br /&gt;&lt;b&gt;&lt;u&gt;Different Financial Markets&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Listed Market –&lt;/b&gt;&lt;br /&gt;. Exchanges where an Auction method is used at a physical location. (e.g.) The New York Stock Exchange (NYSE)&lt;br /&gt;. Exchanges where trade execution is automated using Order Matching Systems&lt;br /&gt;. All the exchanges are registered with the SEC / SEBI.&lt;br /&gt;. e.g. stock markets&lt;br /&gt;&lt;b&gt; Over-the-Counter Market (OTC, Unlisted) –&lt;/b&gt;&lt;br /&gt;. A negotiated market without a physical location where transactions are done via telecommunications.&lt;br /&gt;. e.g. Currency markets&lt;br /&gt;&lt;b&gt;OTC Markets&lt;/b&gt;&lt;br /&gt;. Currency Markets are traded entirely OTC&lt;br /&gt;. OTC price information is either published periodically in paper form, disseminated over telephone lines, or displayed real-time electronically&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-8315741328393532573?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/8315741328393532573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/forex-markets-trade-life-cycle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8315741328393532573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8315741328393532573'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/forex-markets-trade-life-cycle.html' title='Forex Markets - Trade Life Cycle'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-2270958321622546810</id><published>2010-07-21T15:31:00.000+05:30</published><updated>2010-07-21T15:31:23.942+05:30</updated><title type='text'>short selling</title><content type='html'>short selling (also known as shorting or going short) is the practice of selling assets, usually securities that have been borrowed from a third party (usually a broker) with the intention of buying identical assets back at a later date to return to the lender (expecting a bearish market)&lt;br /&gt;&lt;br /&gt; short seller hopes to profit from a decline in the price of the assets between the sale and the repurchase, as the seller will pay less to buy the assets than the seller received on selling them&lt;br /&gt;&lt;b&gt;Naked Short selling&lt;/b&gt;&lt;br /&gt;Naked short selling, or naked shorting, is the practice of short-selling a financial instrument without first borrowing the security or ensuring that the security can be borrowed, as is conventionally done in a short sale.&lt;br /&gt;&lt;br /&gt; The transaction generally remains open until the shares are acquired by the seller, or the seller's broker, allowing the trade to be settled. If it is not settled the trade is considered to have “failed to deliver”&lt;br /&gt;&lt;b&gt;Mechanism of short selling..&lt;/b&gt;&lt;br /&gt;1.The investor instructs the broker to sell the shares and the proceeds are credited to his broker's account.&lt;br /&gt;2.Upon completion of the sale, the investor has 3 days (in the US) to borrow the shares. If required by law, the investor first ensures that cash or equity is on deposit with his brokerage firm as collateral for the initial short margin requirement&lt;br /&gt;3.The investor may close the position by buying back the shares (called covering). If the price has dropped, he makes a profit. If the stock advanced, he takes a loss.&lt;br /&gt;4.Finally, the investor may return the shares to the lender or stay short indefinitely.&lt;br /&gt;5.At any time, the lender may call for the return of his shares e.g. because he wants to sell them. The borrower must buy shares on the market and return them to the lender (or he must borrow the shares from elsewhere). This is called ‘called away’ This happens when many people short sells a particular security&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-2270958321622546810?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/2270958321622546810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/short-selling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2270958321622546810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2270958321622546810'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/short-selling.html' title='short selling'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-8135776267297189882</id><published>2010-07-21T15:28:00.001+05:30</published><updated>2010-07-21T15:28:52.114+05:30</updated><title type='text'>Hedge Accounting</title><content type='html'>A method of accounting where entries for the ownership of a security and the opposing hedge are treated as one. Hedge accounting attempts to reduce the volatility created by the repeated adjustment of a financial instrument's value, known as marking to market. This reduced volatility is done by combining the instrument and the hedge as one entry, which offsets the opposing movements.&lt;br /&gt;&lt;br /&gt;Hedge accounting modifies the usual accounting treatment of a hedging instrument and/or a hedged item to enable gains and losses on the hedging instrument to be recognised in the income statement in the same period as offsetting losses and gains on the hedged item. This is a matching concept.  A pre-requisite for hedge accounting is that a hedging instrument, normally a derivative, is designated as an offset to changes in the fair value or cash flows of a hedged item.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Why hedging and hedging accounting&lt;/b&gt;&lt;br /&gt;1.Most business activity involves risks and uncertainties, and it is necessary of elaborating effective financial strategies in order to manage these risks and uncertainties. &lt;br /&gt;2.One way in which this can be done is to enter into transactions that expose the entity to risk and uncertainty that fully or partially offsets one or more of the entity’s other risks and uncertainties, transactions known as ‘hedges’. &lt;br /&gt;3.The instrument acquired to offset risk or uncertainty is known as ‘hedging instrument’ and the risk or uncertainty hedged is known as ‘hedged item’. &lt;br /&gt;4.When certain criteria are met, International Accounting Standard (IAS) 39 “Financial instruments: Recognition and Measurement” permits entities to apply special accounting treatment, so-called ‘hedge accounting‘. &lt;br /&gt;&lt;b&gt;Types of Hedge Accounting&lt;/b&gt;&lt;br /&gt;1.Cash flow Hedging&lt;br /&gt;2.Fair Value Hedging&lt;br /&gt;3.Hedge of a Net Investment&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-8135776267297189882?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/8135776267297189882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/hedge-accounting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8135776267297189882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8135776267297189882'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/hedge-accounting.html' title='Hedge Accounting'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-4460802813577905428</id><published>2010-07-21T15:24:00.000+05:30</published><updated>2010-07-21T15:24:06.500+05:30</updated><title type='text'>Electronic Clearing System</title><content type='html'>&lt;b&gt;Coverage&lt;/b&gt;&lt;br /&gt;Bulk payment transaction like periodic payments defined as “User”&lt;br /&gt;&lt;br /&gt;The transactions to move from a single User source to a large number of Destination Account Holders&lt;br /&gt;&lt;br /&gt;The credit instructions from the User to the Destination Account Holders would be on media (tape/floppy/CD/pen drive)  and would form the basis for the Sponsor Bank to debit the User’s account and the Destination Bank branches to credit the beneficiaries' Accounts&lt;br /&gt;&lt;br /&gt;Such other payment transactions involving a single debit to a User’s account at one bank and multiple credits to a large number of beneficiaries at many banks to be specified by National Clearing Cell (NCC) / Clearing House (CH) after ascertaining the level of infrastructure available at the Service/Main branches of member banks.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ECS Process Cycle&lt;/b&gt;&lt;br /&gt;1.Guidelines for Input Preparation and Input Submission ( User Institution -&gt; Sponsor Bank -&gt; Clearing House) )&lt;br /&gt;2.Record layout of inward  data for destination banks  ( Clearing House -&gt; Destination Banks)&lt;br /&gt;3.Record layout of return data  ( Destination Banks -&gt; Clearing house) &lt;br /&gt;4.Record layout of Final Output Data after return processing (Clearing House -&gt; Sponsor Bank -&gt; User Institution)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Return of processed output&lt;/b&gt;&lt;br /&gt;If a Destination Bank branch is not in a position to credit a particular transaction for reasons like “Account closed/transferred”, “No such Accounts”, “Account description does not tally”, etc., it should report the same with a Return Memo .  The same would be forwarded to its Service Branch/Main Branch on day-1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-4460802813577905428?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/4460802813577905428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/electronic-clearing-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4460802813577905428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4460802813577905428'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/07/electronic-clearing-system.html' title='Electronic Clearing System'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-2236868609022412679</id><published>2010-06-07T13:51:00.000+05:30</published><updated>2010-06-07T13:51:23.955+05:30</updated><title type='text'>Why i choose this Corporate and Investment Banking domain rather than Retail Banking</title><content type='html'>I started my career with Retail Banking Domain.Recently i moved to the one more challenging domain  as Corporate and Investment Banking.&lt;br /&gt; Why i choose this Corporate and Investment Banking domain ? &lt;br /&gt;&lt;br /&gt;    The Investment banking business is very far removed from the world of Retail Banking.&lt;br /&gt;&lt;br /&gt;    Investment banking business includes Capital Markets and is very highly dynamic. Billions of dollars are being traded at any given point of time. &lt;br /&gt;&lt;br /&gt;    Investment banks hire only the best professionals to build and support all their applications they use.&lt;br /&gt;&lt;br /&gt;    The changing business environment provides the drive and challenge for the IT teams to enhance systems and to deliver quality products and solutions every time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-2236868609022412679?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/2236868609022412679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/06/why-i-choose-this-corporate-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2236868609022412679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2236868609022412679'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/06/why-i-choose-this-corporate-and.html' title='Why i choose this Corporate and Investment Banking domain rather than Retail Banking'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-2767660382297992474</id><published>2010-05-27T17:43:00.004+05:30</published><updated>2010-05-27T17:50:50.114+05:30</updated><title type='text'>One of the resource for investing-Bonds</title><content type='html'>A company needs funds to expand into new markets while governments need money for everything&lt;br /&gt;from infrastructure to social programs. The problem large organizations run into is that they typically need far more money than the average bank can provide. The solution is to raise money by issuing bonds (or other debt instruments) to a public market.&lt;br /&gt;&lt;br /&gt;Really, a bond is nothing more than a loan of which you are the &lt;strong&gt;lender&lt;/strong&gt;. The organization that sells a bond is known as the &lt;strong&gt;issuer&lt;/strong&gt;. You can think of it as an IOU given by a borrower (the issuer) to a lender (the investor).&lt;br /&gt;&lt;br /&gt;The interest rate is often referred to as the &lt;strong&gt;coupon&lt;/strong&gt;. The date on which the issuer has to repay the amount borrowed, known as &lt;strong&gt;face value (&lt;/strong&gt;also known as the &lt;strong&gt;par value &lt;/strong&gt;or&lt;strong&gt; principal&lt;/strong&gt;), is called the &lt;strong&gt;maturity date&lt;/strong&gt;. Bonds are known as &lt;strong&gt;fixed-income.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;When a bond's price trades above the face value it is said to be selling at a &lt;strong&gt;premium&lt;/strong&gt;. When a bond sells below face value, it is said to be selling at a &lt;strong&gt;discount&lt;/strong&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;When bond investors refer to yield, they are usually referring to yield to maturity.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Types of Bonds&lt;/u&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Government Bonds&lt;/li&gt;&lt;li&gt;Municipal Bonds&lt;/li&gt;&lt;li&gt;Corporate Bonds&lt;/li&gt;&lt;li&gt;Zero Coupon Bonds&lt;/li&gt;&lt;/ul&gt;&lt;u&gt;Some of the important points regarding the Bonds&lt;/u&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Bonds are just like IOUs. Buying a bond means you are lending out your&amp;nbsp; money.&lt;/li&gt;&lt;li&gt;Stocks are equity; bonds are debt.&lt;/li&gt;&lt;li&gt;Issuers of bonds are governments and corporations.&lt;/li&gt;&lt;li&gt;A bond is characterized by its face value, coupon rate, maturity, and issuer.&lt;/li&gt;&lt;li&gt;Yield is the rate of return you get on a bond.&lt;/li&gt;&lt;li&gt;&amp;nbsp;When price goes up, yield goes down and vice versa.&lt;/li&gt;&lt;/ul&gt;&lt;u&gt;Some of the usefull links &lt;/u&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;InvestingInBonds.com&lt;/li&gt;&lt;li&gt;http://www.investopedia.com/university/bonds/&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-2767660382297992474?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/2767660382297992474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/05/one-of-resource-for-investing-bonds.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2767660382297992474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2767660382297992474'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/05/one-of-resource-for-investing-bonds.html' title='One of the resource for investing-Bonds'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-4089218159138373733</id><published>2010-05-20T17:59:00.000+05:30</published><updated>2010-05-20T17:59:45.544+05:30</updated><title type='text'>Different types of Inner Classes</title><content type='html'>In java we have a option to write a class in another class.Such a class is called the Inner class.&lt;br /&gt;check the following diagram ,it will explain the how the class architecture in the Java&lt;br /&gt;&lt;br /&gt;These are categorised into Static and non-static inner classes.Under non-static inner classes we have inner classes ,Local inner classes and Anonymous Classes .Objects that are instances of an inner class exist within an instance of the outer class&lt;br /&gt;and has direct access to the methods and fields of its enclosing instance&lt;br /&gt;&lt;u&gt;Local inner class&lt;/u&gt;&lt;br /&gt;we can declare a inner class with in a body of a method&lt;br /&gt;Syntax of creating an object for&amp;nbsp; inner class&lt;br /&gt;OuterClass.InnerClass innerObject = outerObject.new InnerClass();&lt;br /&gt;&lt;u&gt;Anonymous inner class&lt;/u&gt;&lt;br /&gt;we can also declare a inner class with out a name with in the body of a method.&lt;br /&gt;ex:DriverManager.getConnection() method is using this concept only.&lt;br /&gt;&lt;u&gt;Static inner classes&lt;/u&gt;&lt;br /&gt;As with class methods and variables, a static nested class is associated with its outer class.&lt;br /&gt;Syntax of creating an object for Static inner class&lt;br /&gt;OuterClass.InnerClass innerObject = new OuterClass.new InnerClass();&lt;br /&gt;&lt;br /&gt;Ex&lt;br /&gt;class OuterClass&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; ------&lt;br /&gt;&amp;nbsp;&amp;nbsp; -------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; class InnerClass &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-4089218159138373733?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/4089218159138373733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/05/different-types-of-inner-classes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4089218159138373733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4089218159138373733'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/05/different-types-of-inner-classes.html' title='Different types of Inner Classes'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-5072950709785131925</id><published>2010-03-03T17:35:00.000+05:30</published><updated>2010-03-03T17:35:34.853+05:30</updated><title type='text'>rowNum()</title><content type='html'>rowNum() function always give the no of records fetched from the table but not the a row number in the table&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;select * from table where rowNum() =10;&lt;br /&gt;above query will not return any thing&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-5072950709785131925?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/5072950709785131925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/03/rownum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5072950709785131925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5072950709785131925'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/03/rownum.html' title='rowNum()'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-6606817082693102634</id><published>2010-03-02T10:31:00.000+05:30</published><updated>2010-03-02T10:31:36.306+05:30</updated><title type='text'>setting STRICT_QUOTE_ESCAPING in catilina.sh file</title><content type='html'>&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=&lt;wbr&gt;&lt;/wbr&gt;org.apache.juli.&lt;wbr&gt;&lt;/wbr&gt;ClassLoaderLogManager -Dorg.apache.jasper.compiler.&lt;wbr&gt;&lt;/wbr&gt;Parser.STRICT_QUOTE_ESCAPING=&lt;wbr&gt;&lt;/wbr&gt;false"&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-6606817082693102634?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/6606817082693102634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/03/setting-strictquoteescaping-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6606817082693102634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6606817082693102634'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/03/setting-strictquoteescaping-in.html' title='setting STRICT_QUOTE_ESCAPING in catilina.sh file'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-3876767217710156901</id><published>2010-01-20T11:15:00.006+05:30</published><updated>2010-01-20T11:41:37.438+05:30</updated><title type='text'>My points on Websphere Message Broker Nodes</title><content type='html'>&lt;div class="MsoNormal" style="mso-pagination: none;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_j56E3_yZsnU/S1adUJD4tcI/AAAAAAAAD_s/d6a4awHPnH0/s1600-h/n1.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/_j56E3_yZsnU/S1adUJD4tcI/AAAAAAAAD_s/d6a4awHPnH0/s640/n1.bmp" width="451" /&gt;&lt;/a&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/_j56E3_yZsnU/S1adqYWNVXI/AAAAAAAAD_8/AR3ZUw3ut-I/s1600-h/n3.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/_j56E3_yZsnU/S1adqYWNVXI/AAAAAAAAD_8/AR3ZUw3ut-I/s640/n3.bmp" width="438" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_j56E3_yZsnU/S1adhZgxKfI/AAAAAAAAD_0/PAGgp3EbiNQ/s1600-h/n2.bmp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/_j56E3_yZsnU/S1adhZgxKfI/AAAAAAAAD_0/PAGgp3EbiNQ/s640/n2.bmp" width="466" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: 18px; text-decoration: underline;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-3876767217710156901?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/3876767217710156901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/01/nodes-in-ibm-websphere-message-broker.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3876767217710156901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3876767217710156901'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/01/nodes-in-ibm-websphere-message-broker.html' title='My points on Websphere Message Broker Nodes'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_j56E3_yZsnU/S1adUJD4tcI/AAAAAAAAD_s/d6a4awHPnH0/s72-c/n1.bmp' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-2724825053168191478</id><published>2010-01-08T12:40:00.002+05:30</published><updated>2010-01-12T11:28:29.125+05:30</updated><title type='text'>Spring :For the Beginners</title><content type='html'>&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;My advice to beginners on the spring use the&amp;nbsp;following&amp;nbsp;&amp;nbsp;url&amp;nbsp;&lt;a href="http://www.springbyexample.org/examples/index.html"&gt;http://www.springbyexample.org/examples/index.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;It is providing very good explanation about the different components in Spring world.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;spring with&amp;nbsp;Web Services&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;&lt;/span&gt;is&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&amp;nbsp;&lt;b&gt;m&lt;/b&gt;&lt;b&gt;y&amp;nbsp;favorite topic .&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-2724825053168191478?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/2724825053168191478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2010/01/spring-for-beginners.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2724825053168191478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2724825053168191478'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2010/01/spring-for-beginners.html' title='Spring :For the Beginners'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-3938930242509020026</id><published>2009-12-30T11:12:00.002+05:30</published><updated>2009-12-30T11:12:24.653+05:30</updated><title type='text'></title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_j56E3_yZsnU/SzroI_dPZJI/AAAAAAAAD-U/hsO5Nh8TjBg/s1600-h/new-year-card-b1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_j56E3_yZsnU/SzroI_dPZJI/AAAAAAAAD-U/hsO5Nh8TjBg/s640/new-year-card-b1.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-3938930242509020026?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/3938930242509020026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/12/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3938930242509020026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3938930242509020026'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/12/blog-post.html' title=''/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_j56E3_yZsnU/SzroI_dPZJI/AAAAAAAAD-U/hsO5Nh8TjBg/s72-c/new-year-card-b1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-6297168061900614107</id><published>2009-12-30T09:55:00.006+05:30</published><updated>2010-01-06T15:12:29.593+05:30</updated><title type='text'>My points on Websphere Message Broker</title><content type='html'>&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span style="line-height: 19px;"&gt;&lt;b&gt;&lt;span style="font-family: Arial; font-size: 11px; font-weight: normal; line-height: normal; white-space: pre;"&gt;http://docs.google.com/present/edit?id=0AVqRcA4NAu8bZGc5MmJqc18xNmNiaDZtYzg3&amp;amp;hl=en&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 19px;"&gt;&lt;b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;WebSphere Message Broker&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;(WMB) is&amp;nbsp;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/IBM" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="IBM"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;IBM&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;'s information&amp;nbsp;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Message_broker" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #5a3696; text-decoration: none;" title="Message broker"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;broker&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;from the&amp;nbsp;&lt;/span&gt;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/WebSphere" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="WebSphere"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;WebSphere&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;product family that allows business information to flow between disparate applications across multiple hardware and software platforms. Business rules can be applied to the data flowing through the message broker to route and transform the information. The product can be considered to be an&amp;nbsp;&lt;/span&gt;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Enterprise_Service_Bus" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Enterprise Service Bus"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Enterprise Service Bus&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;providing connectivity between disparate applications&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 19px;"&gt;&lt;span style="line-height: 24px;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;The WebSphere Message Broker Toolkit enables&amp;nbsp;&lt;/span&gt;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Middleware_Analysts" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Middleware Analysts"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;developers&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;to graphically design message flows and related artifacts. Once developed, these resources can be packaged into a broker archive (BAR) file and deployed into the runtime environment. At this point, the broker is able to continually process messages according to the logic described by the message flow.WebSphere Message Broker flows can be used in a&amp;nbsp;&lt;/span&gt;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Service_Oriented_Architecture" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Service Oriented Architecture"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Service Oriented Architecture&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;, and if properly designed by&amp;nbsp;&lt;/span&gt;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Middleware_Analysts" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Middleware Analysts"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Middleware Analysts&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;, integrated into&amp;nbsp;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Event-driven_SOA" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Event-driven SOA"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;event-driven SOA&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;schemas, sometimes referred to as&amp;nbsp;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Event-driven_SOA" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Event-driven SOA"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;SOA 2.0&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3 style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-repeat: initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; color: black; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.17em; padding-top: 0.5em;"&gt;&lt;span id="Broker_nodes_available"&gt;&lt;span style="font-size: medium;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Broker nodes available&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;A&amp;nbsp;&lt;/span&gt;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Middleware_Analysts" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Middleware Analysts"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;developer&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;can choose from many pre-designed broker nodes. Nodes have different purposes. Some nodes map data from one format to another (for instance, Cobol or PL/I Copybook to canonical XML). Other nodes evaluate content of data and route the flow differently based on certain criteria.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; line-height: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Node types&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;There are many types of node that can be used in developing message flows; the following node transformation technology options are available:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="line-height: 1.5em; list-style-image: url(http://en.wikipedia.org/skins-1.5/monobook/bullet.gif); list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0.3em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Extended Structured Query Language (ESQL)&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Graphical Message Mapping&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/Xslt" style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: initial; background-image: none; background-position: initial initial; background-repeat: initial; color: #002bb8; text-decoration: none;" title="Xslt"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;eXtensible Stylesheet Language Transformations (XSLT)&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;JavaCompute (as of version 6)&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;WebSphere Transformation Extender (formerly known as Ascential DataStage TX, DataStage TX and Mercator Integration Broker) is available as a separate licensing option&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.1em;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;PhpCompute (as of version 6.1.0.3)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Creating a&amp;nbsp;broker in Windows&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;root drive=""&gt;&lt;/root&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;\Program Files\IBM\MQSI\6.1\bin&amp;gt;mqsiprofile&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;root drive=""&gt;&lt;/root&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;\Program Files\IBM\MQSI\6.1\bin&amp;gt;mqsicreatebroker &amp;nbsp;&lt;/span&gt;&lt;broker name=""&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; -i &amp;lt;&amp;nbsp;user Name&amp;nbsp;&amp;gt; -a &lt;/span&gt;&lt;password&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &amp;nbsp;-q &lt;/span&gt;&lt;queue manager=""&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; -s &amp;lt;&amp;nbsp;User server&amp;nbsp;Queue&amp;nbsp;Manager&amp;nbsp;&amp;gt; -n &amp;lt;&amp;nbsp;Database&amp;nbsp;Instance&amp;nbsp;&amp;gt;&lt;/span&gt;&lt;/queue&gt;&lt;/password&gt;&lt;/broker&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Ex:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;div&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;D:\Program Files\IBM\MQSI\6.1\bin&amp;gt;mqsicreatebroker WBRK_BROKER -i mohanrao -a qwer*098 -q WBRK_QM -s WBRK_UNS_QM -n DEFBKD61&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Creating&amp;nbsp;Configure Manager In Windows&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;root drive=""&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;\Program Files\IBM\MQSI\6.1\bin&amp;gt;mqsicreateconfigmgr CONF_MGR -i mohanrao -a qwer*098 -q QM_evolvus_lap&lt;/span&gt;&lt;/root&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Start the Component&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;root drive=""&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;\Program Files\IBM\MQSI\6.1\bin&amp;gt;mqsistart CONF_MGR&lt;/span&gt;&lt;/root&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;root drive=""&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;\Program Files\IBM\MQSI\6.1\bin&amp;gt;mqsicreateaclentry CONF_MGR -f &lt;/span&gt;&lt;root drive=""&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;\myList&lt;/span&gt;&lt;/root&gt;&lt;/root&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Creating Queue&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;runmqsc &lt;/span&gt;&lt;queue manager=""&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;----------it will start a session for given &amp;nbsp;Queue Manger&lt;/span&gt;&lt;/queue&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&amp;nbsp;&amp;nbsp;DEFINE qlocal (&lt;/span&gt;&lt;queue name=""&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;)&lt;/span&gt;&lt;/queue&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Some of &amp;nbsp;the Major Calls for MQ&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQCONN- to connect the Queue&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQCONNX-it will connect and also open the Queue&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQDISC- to Define A description about the Queue&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQOPEN- To Open the Connected Queue&lt;br /&gt;MQCLOSE - To Close The Opened Queue&lt;br /&gt;MQPUT- To insert/place the message in to the Opened Queue&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQGET - To retrieve the Message From The Opened Queue&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQBEGIN- To start the transaction &amp;nbsp;Opened &amp;nbsp;Queue&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQCMIT- To Commit the&amp;nbsp;started&amp;nbsp;transaction&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;Command Line Deployment&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;span style="font-weight: normal;"&gt;mqsideploy -b&lt;broker name=""&gt; -e&lt;execution group="" name=""&gt; -bar &lt;bar file=""&gt;&lt;/bar&gt;&lt;/execution&gt;&lt;/broker&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: normal;"&gt;name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;Example Java Classes For MQ&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;1)&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;div&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;import com.ibm.mq.*;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;public class Put {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;public static void main (String args[]) throws Exception&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQQueueManager qm = new MQQueueManager("QM");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQQueue queue = new MQQueue(qm,"AQ",MQC.MQOO_OUTPUT,"","","");&amp;nbsp;&lt;/span&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQMessage msg = new MQMessage();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;msg.writeString(args[0]);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;queue.put(msg);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;queue.close();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;qm.disconnect();&lt;/span&gt;&lt;/span&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;2)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;import com.ibm.mq.*;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;public class Get{&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;public static void main (String args[]) throws Exception&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQQueueManager qm = new MQQueueManager("QM");&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQQueue queue = new MQQueue(qm,"LQ",MQC.MQOO_INPUT_SHARED,"","","");&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;MQMessage msg = new MQMessage();&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;queue.get(msg);&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;System.out.println(msg.readString( msg.getMessageLength() ));&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;//queue.close();&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;//qm.disconnect();&lt;/span&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: pre;"&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif; font-weight: bold; text-decoration: underline;"&gt;Find The Following Documents&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif; text-decoration: underline;"&gt;&lt;b&gt;&lt;span style="-webkit-text-decorations-in-effect: none; font-weight: normal; line-height: 19px;"&gt;&lt;a href="http://docs.google.com/fileview?id=0B1qRcA4NAu8bZWFmNTM5NGMtMTRkMC00ODk2LThiOTItNzY1NzU5MDBjZTJi&amp;amp;hl=en"&gt;&lt;span style="font-size: x-small;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bZWFmNTM5NGMtMTRkMC00ODk2LThiOTItNzY1NzU5MDBjZTJi&amp;amp;hl=en&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span style="line-height: 19px; text-decoration: underline;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none; font-family: Arial; font-size: 11px; line-height: normal; white-space: pre;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bMDU0NzAxNjUtYWEwYS00NGZlLTk2MjgtYjE0ZDZhNTkzOTZk&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bOGExOGUzNTQtZjllOS00ZWIyLWJlODktNGViOWY3NDgwMjQx&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bNjFlZjc2YmEtMTRkZS00ZDdlLTgzYWEtNjBkODIwYWFhZjky&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bY2JmYWNjMGUtNjg0Yi00NzBhLTg4NDUtNGI1ODc0OTE2NGRh&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bZTY4OTg2MmEtNDBiNy00MTQwLTlkODMtZWNhZWVhZmI4ODE3&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bY2E1MjA2ZGQtOGE0OC00N2ZiLTk0MDMtNTJiOGI5OTcyZGJk&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bMmY3N2FhMjEtYmU2Ni00YTBkLTgzNTktMjRjNjQ2OGE3NWU2&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bYjEwN2M2ZjEtMDU1OC00ZWZlLWIzZGYtZDUzMThkMTU4Mjk0&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bNTEwZDU0MGUtY2JhOC00Yjc5LWE5ZDMtYTUxYTRiNTBmM2U3&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bNWVjYmNiYzktOWRjNi00ZjE1LTg1OTMtZjQ0NGZmMGUyNjVl&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bZTY3ZThkOGEtNDVkZi00YWRhLTkyYjAtMzgzZTg5M2M4ZjM5&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bY2I1YjVhZTItOTRiYS00NWRiLWI5NjctN2UzZGRjMmQ3ZDll&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 11px; text-decoration: underline; white-space: pre;"&gt;&lt;span style="-webkit-text-decorations-in-effect: none;"&gt;http://docs.google.com/fileview?id=0B1qRcA4NAu8bZTcxZTkxMjMtMDZhNy00NjgyLTlkODAtMjkyOTNiMjU5Y2Jm&amp;amp;hl=en&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span style="line-height: 19px; text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-6297168061900614107?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/6297168061900614107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/12/my-points-on-websphere-message-broker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6297168061900614107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6297168061900614107'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/12/my-points-on-websphere-message-broker.html' title='My points on Websphere Message Broker'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-3928363856272882666</id><published>2009-12-10T16:12:00.002+05:30</published><updated>2009-12-10T16:12:24.476+05:30</updated><title type='text'>Creating Database Connection Pool in Tomcat 5.0 and Tomcat 5.5 for MySQL and Java</title><content type='html'>&lt;span class="Apple-style-span" style="color: #444444; font-family: 'Trebuchet MS', sans-serif; font-size: 12px; line-height: 17px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: navy; font-family: Arial; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This tutorial gives you a close look at Jakarta Commons Database Connection Pool (DBCP) in Tomcat 5.0 and Tomcat 5.5. DBCP is the database connection pooling technology built into the popular open-source Tomcat servlet engine. Because it’s included with Tomcat, you don’t need to download or install any files or libraries.&lt;div style="margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;However, depending on which database you are connecting to, you will have to download the appropriate JDBC driver. In this example we are connecting to MySQL. Normally, to deploy an application to the Tomcat servlet engine, you just copy the application’s WAR file, or deployment directory, to the Tomcat webapps directory. However, to configure DBCP for your application, you need to do a bit more work: you need to add the application to the Tomcat server configuration file conf/server.xml.&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;To do this, you need to add a new &lt;context&gt; entry to the Tomcat server.xml file. Open the server.xml file with your favorite editor and look for the Tomcat Root Context. You need to add the &lt;context&gt; entry in the correct part of the server.xml file. For example, you can add it after the ROOT context and before the examples context, as in the snippet shown here:&lt;/context&gt;&lt;/context&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: #fafafa; background-image: url(http://www.java-samples.com/images/quote.gif); background-position: 3px 5px; background-repeat: no-repeat; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; color: #666666; font: normal normal bold 1.2em/1.5em 'Trebuchet MS', Tahoma, sans-serif; margin-bottom: 15px; margin-left: 15px; margin-right: 15px; margin-top: 15px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;!-- Tomcat Root Context --&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;!--&amp;nbsp;&lt;br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;context path="" docBase="ROOT" debug="0"/&gt;&amp;nbsp;&lt;br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;--&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;context debug="0" docbase="roller" path="/myapp"&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;resource auth="Container" name="jdbc/mydb" type="javax.sql.DataSource"&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;resourceparams name="jdbc/mydb"&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;parameter&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;name&gt;factory&lt;/name&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;!-- Use the following value for Tomcat 5.0:&amp;nbsp;&lt;br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;&lt;value&gt;org.apache.commons.dbcp.BasicDataSourceFactory&lt;/value&gt;&amp;nbsp;&lt;br style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "&gt;--&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;!-- Use this value for Tomcat 5.5: --&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;value&gt;org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory&lt;/value&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/parameter&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;parameter&gt;&lt;name&gt;maxActive&lt;/name&gt;&lt;value&gt;100&lt;/value&gt;&lt;/parameter&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;parameter&gt;&lt;name&gt;maxWait&lt;/name&gt;&lt;value&gt;100&lt;/value&gt;&lt;/parameter&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;parameter&gt;&lt;name&gt;username&lt;/name&gt;&lt;value&gt;scott&lt;/value&gt;&lt;/parameter&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;parameter&gt;&lt;name&gt;password&lt;/name&gt;&lt;value&gt;tiger&lt;/value&gt;&lt;/parameter&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;parameter&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;name&gt;driverClassName&lt;/name&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;value&gt;org.gjt.mm.mysql.Driver&lt;/value&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/parameter&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;parameter&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;name&gt;url&lt;/name&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;value&gt;jdbc:mysql://localhost:3306/mydb?autoReconnect=true&lt;/value&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/parameter&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/resourceparams&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/resource&gt;&lt;/context&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;!-- Tomcat Examples Context --&gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;context &amp;nbsp;="" debug="0" docbase="examples" path="/examples"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;reloadable="true" crossContext="true"&amp;gt;&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;logger &amp;nbsp;="" classname="org.apache.catalina.logger.FileLogger"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;prefix="localhost_examples_log." suffix=".txt" timestamp="true"/&amp;gt;&lt;/logger&gt;&lt;/context&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The preceding example shows how to configure DBCP for an application called myapp. The first entry inside the &lt;context&gt; element is the &lt;resource&gt; declaration. The &lt;resource&gt; declaration declares a javax.sql.DataSource and binds it to the JNDI name jdbc/mydb. The &lt;resourceparams&gt; element and the nested &lt;parameter&gt; elements within specify the DBCP parameters for the application’s database connection pool. We’ve already discussed the maxActive and maxWait parameters. The driverClassName and url parameters are standard JDBC connection parameters.&amp;nbsp;&lt;/parameter&gt;&lt;/resourceparams&gt;&lt;/resource&gt;&lt;/resource&gt;&lt;/context&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: #fafafa; background-image: url(http://www.java-samples.com/images/quote.gif); background-position: 3px 5px; background-repeat: no-repeat; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; color: #666666; font: normal normal bold 1.2em/1.5em 'Trebuchet MS', Tahoma, sans-serif; margin-bottom: 15px; margin-left: 15px; margin-right: 15px; margin-top: 15px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Note&amp;nbsp;&lt;/b&gt;The value for the factory parameter will vary based on the Tomcat distribution. Tomcat 5.0 and earlier versions used the Jakarta Commons DBCP library. Starting with Tomcat 5.5, the DBCP library has been changed from the Commons version to a Tomcat-specific library. If you want to double check that the value you use is correct, check the Tomcat JAR files in Tomcat’s common\lib directory, find the BasicDataSourceFactory class, and use the fully qualified class name of the class you find.&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The next code excerpt shows how to obtain a connection from the previous connection pool. First, you use JNDI to look up a javax.sql.DataSource interface, and then you ask that interface for a connection. When you’ve finished with the connection, you close it and return it to the pool for reuse. Closing the connection doesn’t actually close the underlying physical connection; it just returns the connection to the pool.&lt;br /&gt;&lt;/div&gt;&lt;blockquote style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: #fafafa; background-image: url(http://www.java-samples.com/images/quote.gif); background-position: 3px 5px; background-repeat: no-repeat; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; color: #666666; font: normal normal bold 1.2em/1.5em 'Trebuchet MS', Tahoma, sans-serif; margin-bottom: 15px; margin-left: 15px; margin-right: 15px; margin-top: 15px; padding-bottom: 0px; padding-left: 20px; padding-right: 0px; padding-top: 0px;"&gt;&lt;div style="margin-bottom: 10px; margin-left: 15px; margin-right: 15px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;javax.naming.InitialContext context = new InitialContext();&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;// Look up the data source&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;javax.sql.DataSource dataSource =&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;(javax.sql.DataSource)context.lookup ("java:comp/env/jdbc/mydb");&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;// Get a connection from the pool&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;java.sql.Connection conn = dataSource.getConnection();&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;// ...Use the connection...&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;// Close the connection to return it to the pool&amp;nbsp;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;conn.close()&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-3928363856272882666?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/3928363856272882666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/12/creating-database-connection-pool-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3928363856272882666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3928363856272882666'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/12/creating-database-connection-pool-in.html' title='Creating Database Connection Pool in Tomcat 5.0 and Tomcat 5.5 for MySQL and Java'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-9037295020285185398</id><published>2009-11-19T13:17:00.000+05:30</published><updated>2009-11-19T13:17:34.971+05:30</updated><title type='text'>Hashmap and HashTable</title><content type='html'>Hash map&amp;nbsp;allows&amp;nbsp;null values but hash table accept the null values but it gives runtime exception&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-9037295020285185398?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/9037295020285185398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/hashmap-and-hashtable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/9037295020285185398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/9037295020285185398'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/hashmap-and-hashtable.html' title='Hashmap and HashTable'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-422002083613055167</id><published>2009-11-19T13:07:00.002+05:30</published><updated>2009-11-19T13:07:52.033+05:30</updated><title type='text'>some important points on static and non static method overriding</title><content type='html'>&lt;span class="Apple-style-span" style="color: #666666; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 19px;"&gt;a static method (in a subclass) may hide another static method (in a superclass)&lt;br /&gt;a static method (in a subclass) cannot hide a non-static method (in a superclass)&lt;br /&gt;a non-static method (in a subclass) may override another non-static method (in a superclass)&lt;br /&gt;a non-static method (in a subclass) cannot override a static method (in a superclass)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-422002083613055167?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/422002083613055167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/some-important-points-on-static-and-non.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/422002083613055167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/422002083613055167'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/some-important-points-on-static-and-non.html' title='some important points on static and non static method overriding'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-5527121232944258501</id><published>2009-11-11T18:56:00.001+05:30</published><updated>2009-11-11T18:56:52.138+05:30</updated><title type='text'>different types of Synchronization</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Tahoma, Arial; font-size: 12px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" bordercolor="#000000" cellpadding="2" cellspacing="0" style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;"&gt;&lt;tbody style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;"&gt;&lt;tr style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;"&gt;&lt;td colspan="3" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;&lt;b style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;"&gt;&amp;nbsp;&lt;/b&gt;&lt;hr style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;"&gt;&lt;td class="tdvamsee" colspan="3" style="font-family: Verdana; font-size: 12px; line-height: normal; margin-top: 40px;"&gt;&lt;span class="tdvamseel" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 1.1em; line-height: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 12px;"&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;&lt;span style="font-size: 12px; line-height: normal;"&gt;Types&amp;nbsp;of Synchronization:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;1)Method&amp;nbsp;level Synchronization: A&amp;nbsp;method&amp;nbsp;can be Synchronized by adding a perfix word Synchronize . Here we have Parametrised Synchronization options also.&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;example: public Synchronize void foo(){}&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;2)Block level Synchronization: A block can be Synchronized by adding a perfix word Synchronize . Here we have Parametrised Synchronization options also.&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;Synchronize { }&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-5527121232944258501?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/5527121232944258501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/different-types-of-synchronization.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5527121232944258501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5527121232944258501'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/different-types-of-synchronization.html' title='different types of Synchronization'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-8639670109327615094</id><published>2009-11-11T18:26:00.000+05:30</published><updated>2009-11-11T18:26:42.741+05:30</updated><title type='text'>Types of action clases in stuts</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;There are fine different types of actions in the struts&lt;br /&gt;&lt;/div&gt;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;i) Forward Action (to forward a request to another resource in your&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;application)&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;ii) Include Action ( To include some action )&lt;br /&gt;&lt;/div&gt;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;You Might be wondering what the difference between Forward Action and Include&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;Action so here it is : The difference is that you need to use the IncludeAction&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;only if the action is going to be included by another action or JSP. Use&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;ForwardAction to forward a request to another resource in your application such&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;as a Servlet that already does business logic processing or even another JSP&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;page.&lt;br /&gt;&lt;/div&gt;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;iii) Dispatch Action ( to group related actions into one class)&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;iv) Lookup Dispatch Action (is useful if the method name in the Action is not&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;driven by its name in the front end but by the Locale independent key into the&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;resource bundle.)&lt;br /&gt;&lt;/div&gt;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;The difference between LookupDispatchAction and DispatchAction is that the&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;actual method that gets called in LookupDispatchAction is based on a lookup of a&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;key value instead of specifying the method name directly.&lt;br /&gt;&lt;/div&gt;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;v) Switch Action (The SwitchAction class provides a means to switch from a&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;resource in one module to another resource in a different module. SwitchAction&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;is useful only if you have multiple modules in your Struts application. The&amp;nbsp;&lt;br style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;SwitchAction class can be used as is without extending.)&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-8639670109327615094?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/8639670109327615094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/types-of-action-clases-in-stuts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8639670109327615094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8639670109327615094'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/types-of-action-clases-in-stuts.html' title='Types of action clases in stuts'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-4739589574748297802</id><published>2009-11-11T18:14:00.002+05:30</published><updated>2009-11-11T18:14:39.665+05:30</updated><title type='text'>Implicit Objects  in jsp</title><content type='html'>&lt;table border="1" id="wp66060" summary="Implicit Objects"&gt;&lt;tbody&gt;&lt;tr align="center"&gt;&lt;th&gt;&lt;a href="" name="wp66066"&gt;&lt;/a&gt;&lt;div class="pCellHeading" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: bold; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: center; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;Variable&lt;/div&gt;&lt;/th&gt;&lt;th&gt;&lt;a href="" name="wp66068"&gt;&lt;/a&gt;&lt;div class="pCellHeading" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: bold; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: center; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;Class&lt;/div&gt;&lt;/th&gt;&lt;th&gt;&lt;a href="" name="wp66070"&gt;&lt;/a&gt;&lt;div class="pCellHeading" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: bold; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: center; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;Description&lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr align="left"&gt;&lt;td&gt;&lt;a href="" name="wp66072"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;application&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66075"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;&lt;a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" style="color: #3366cc;" target="_blank"&gt;javax.servlet.&lt;br /&gt;ServletContext&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66077"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;The context for the JSP page's servlet and any Web components contained in the same application. See&amp;nbsp;&lt;a href="http://java.sun.com/j2ee/1.3/docs/tutorial/doc/Servlets10.html#wp64724" style="color: #3366cc;"&gt;Accessing the Web Context&lt;/a&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="left"&gt;&lt;td&gt;&lt;a href="" name="wp66082"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;config&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66085"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;&lt;a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletConfig.html" style="color: #3366cc;" target="_blank"&gt;javax.servlet.&lt;br /&gt;ServletConfig&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66087"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;Initialization information for the JSP page's servlet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="left"&gt;&lt;td&gt;&lt;a href="" name="wp66089"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;exception&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66092"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;&lt;a href="http://java.sun.com/products/jdk/1.3.1/docs/api/java/lang/Throwable.html" style="color: #3366cc;" target="_blank"&gt;java.lang.&lt;br /&gt;Throwable&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66096"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;Accessible only from an error page. See&amp;nbsp;&lt;a href="http://java.sun.com/j2ee/1.3/docs/tutorial/doc/JSPIntro4.html#wp65997" style="color: #3366cc;"&gt;Handling Errors&lt;/a&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="left"&gt;&lt;td&gt;&lt;a href="" name="wp66099"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;out&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66102"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;&lt;a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/JspWriter.html" style="color: #3366cc;" target="_blank"&gt;javax.servlet.&lt;br /&gt;jsp.JspWriter&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66104"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;The output stream.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="left"&gt;&lt;td&gt;&lt;a href="" name="wp66106"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;page&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66109"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;&lt;a href="http://java.sun.com/products/jdk/1.3.1/docs/api/java/lang/Object.html" style="color: #3366cc;" target="_blank"&gt;java.lang.&lt;br /&gt;Object&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66111"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;The instance of the JSP page's servlet processing the current request. Not typically used by JSP page authors.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="left"&gt;&lt;td&gt;&lt;a href="" name="wp66113"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;pageContext&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66116"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;&lt;a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/PageContext.html" style="color: #3366cc;" target="_blank"&gt;javax.servlet.&lt;br /&gt;jsp.PageContext&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66118"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;The context for the JSP page. Provides a single API to manage the various scoped attributes described in&amp;nbsp;&lt;a href="http://java.sun.com/j2ee/1.3/docs/tutorial/doc/Servlets5.html#wp64315" style="color: #9999cc;"&gt;Using Scope Objects&amp;nbsp;&lt;/a&gt;.&lt;/div&gt;&lt;a href="" name="wp66122"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;This API is used extensively when implementing tag handlers (see&amp;nbsp;&lt;a href="http://java.sun.com/j2ee/1.3/docs/tutorial/doc/JSPTags5.html#wp72755" style="color: #3366cc;"&gt;Tag Handlers&lt;/a&gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="left"&gt;&lt;td&gt;&lt;a href="" name="wp66127"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;request&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66129"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;subtype of&lt;br /&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;&lt;a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html" style="color: #3366cc;" target="_blank"&gt;javax.servlet.&lt;br /&gt;ServletRequest&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66132"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;The request triggering the execution of the JSP page. See&amp;nbsp;&lt;a href="http://java.sun.com/j2ee/1.3/docs/tutorial/doc/Servlets7.html#wp64433" style="color: #3366cc;"&gt;Getting Information from Requests&lt;/a&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="left"&gt;&lt;td&gt;&lt;a href="" name="wp66137"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;response&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66139"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;subtype of&lt;br /&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;&lt;a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletResponse.html" style="color: #3366cc;" target="_blank"&gt;javax.servlet.&lt;br /&gt;ServletResponse&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66142"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;The response to be returned to the client. Not typically used by JSP page authors.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="left"&gt;&lt;td&gt;&lt;a href="" name="wp66144"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;session&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66147"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;&lt;code class="cCode" style="font-family: 'Courier New', Courier, mono;"&gt;&lt;a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html" style="color: #3366cc;" target="_blank"&gt;javax.servlet.&lt;br /&gt;http.HttpSession&lt;/a&gt;&lt;/code&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="" name="wp66151"&gt;&lt;/a&gt;&lt;div class="pCellBody" style="color: black; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0em; margin-left: 0em; margin-right: 0em; margin-top: 0em; text-align: left; text-decoration: none; text-indent: 0em; text-transform: none;"&gt;The session object for the client. See&amp;nbsp;&lt;a href="http://java.sun.com/j2ee/1.3/docs/tutorial/doc/Servlets11.html#wp64744" style="color: #3366cc;"&gt;Maintaining Client State&lt;/a&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-4739589574748297802?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/4739589574748297802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/implicit-objects-in-jsp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4739589574748297802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/4739589574748297802'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/implicit-objects-in-jsp.html' title='Implicit Objects  in jsp'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-3270306690465374758</id><published>2009-11-11T18:13:00.000+05:30</published><updated>2009-11-11T18:13:28.616+05:30</updated><title type='text'>Difference between ServletContext and ServletConfig</title><content type='html'>&lt;span style="color: black;"&gt;ServletContext Defines a set of methods that a servlet uses to communicate with its servlet container.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;ServletConfig is a servlet configuration object used by a servlet container used to pass information to a servlet during initialization. All of its initialization parameters can ONLY be set in deployment descriptor.&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;The ServletContext object is contained within the ServletConfig object, which the Web server provides the servlet when the servlet is initialized.&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;You can specify param-value pairs for ServletContext object in &lt;context-param&gt; tags in web.xml file.&lt;/context-param&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;The ServletConfig parameters are specified for a particular servlet and are unknown to other servlets.&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: black;"&gt;The ServletContext parameters are specified for an entire application outside of any particular servlet and are available to all the servlets within that application.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-3270306690465374758?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/3270306690465374758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/difference-between-servletcontext-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3270306690465374758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3270306690465374758'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/difference-between-servletcontext-and.html' title='Difference between ServletContext and ServletConfig'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-5309242901076802690</id><published>2009-11-11T18:09:00.003+05:30</published><updated>2009-11-11T18:11:20.971+05:30</updated><title type='text'>what is the use of immutable String class in java?...</title><content type='html'>&lt;span style="font-family: Tahoma, Arial; font-size: 12px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;table border="0" bordercolor="#000000" cellpadding="2" cellspacing="0" style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;"&gt;&lt;tbody style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;"&gt;&lt;tr style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;"&gt;&lt;td colspan="3" style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;&lt;span style="font-family: Tahoma, Arial;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;hr style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="font-family: Tahoma, Arial; font-size: 12px; line-height: normal;"&gt;&lt;td class="tdvamsee" colspan="3" style="font-family: Verdana; font-size: 12px; line-height: normal; margin-top: 40px;"&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 1.1em; line-height: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 12px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif, Arial, Tahoma, Verdana, Helvetica; font-size: 1.1em; line-height: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 12px;"&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;Immutable means not changeable. when a string is declared and initiated with some values.&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: normal;"&gt;Afterwards whenever we will concat that string or change that string. if we r going to add more characters in that string object. it will not allow dynamic size change. to cater such problem when any change will occur in string object the object will be recreated and previous object will be destroyed and new will be created with new size to accomodate change. thats y strings are immutable in&amp;nbsp;java.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium;"&gt;&lt;b&gt;Mutable Objects:&lt;/b&gt;&amp;nbsp;When you have a reference to an instance of an object, the contents of that instance&amp;nbsp;&lt;b&gt;can&lt;/b&gt;&amp;nbsp;be altered&lt;br /&gt;&lt;b&gt;Immutable Objects:&lt;/b&gt;&amp;nbsp;When you have a reference to an instance of an object, the contents of that instance&amp;nbsp;&lt;b&gt;cannot&lt;/b&gt;&amp;nbsp;be altered&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-5309242901076802690?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/5309242901076802690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/what-is-use-of-immutable-string-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5309242901076802690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5309242901076802690'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/what-is-use-of-immutable-string-class.html' title='what is the use of immutable String class in java?...'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-6552395432036165961</id><published>2009-11-11T18:05:00.003+05:30</published><updated>2009-11-11T18:05:47.266+05:30</updated><title type='text'>what is Factory Method</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px;"&gt;Factory method is just a fancy name for a method that instantiates objects. Like a factory, the job of the factory method is to create -- or manufacture -- objects.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-6552395432036165961?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/6552395432036165961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/what-is-factory-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6552395432036165961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6552395432036165961'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/what-is-factory-method.html' title='what is Factory Method'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-8684674763674941726</id><published>2009-11-11T18:05:00.000+05:30</published><updated>2009-11-11T18:05:11.590+05:30</updated><title type='text'>Simple example for revesing a string</title><content type='html'>public static void main(String[] args) {&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;String text="text";&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;for(int i=text.length();i&amp;gt;0;i--){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;//System.out.print(text.substring(i-1,i));&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;System.out.print(text.toCharArray()[i-1]);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-8684674763674941726?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/8684674763674941726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/simple-example-for-revesing-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8684674763674941726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8684674763674941726'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/11/simple-example-for-revesing-string.html' title='Simple example for revesing a string'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-2847498086184520463</id><published>2009-10-01T16:20:00.002+05:30</published><updated>2009-10-01T16:20:36.660+05:30</updated><title type='text'>My marriage invitation</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_j56E3_yZsnU/SsSJX6bL6iI/AAAAAAAACu4/UGJ393qkk4I/s1600-h/Scrapbook_02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_j56E3_yZsnU/SsSJX6bL6iI/AAAAAAAACu4/UGJ393qkk4I/s400/Scrapbook_02.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-2847498086184520463?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/2847498086184520463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/10/my-marriage-invitation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2847498086184520463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2847498086184520463'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/10/my-marriage-invitation.html' title='My marriage invitation'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_j56E3_yZsnU/SsSJX6bL6iI/AAAAAAAACu4/UGJ393qkk4I/s72-c/Scrapbook_02.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-3841730049910656547</id><published>2009-09-29T11:41:00.001+05:30</published><updated>2009-09-29T11:41:58.224+05:30</updated><title type='text'>loading the values form a properties file</title><content type='html'>Properties pro = new Properties();&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;InputStream in = WelcomeAction.class&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;.getResourceAsStream("/IBLConstants.properties");&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;pro.load(in);&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;for (int i = 0; i &amp;lt; pro.size(); i++) {&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;if (pro.containsKey(roleType)) {&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;System.out.println(pro.getProperty(roleType));&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-3841730049910656547?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/3841730049910656547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/09/loading-values-form-properties-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3841730049910656547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3841730049910656547'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/09/loading-values-form-properties-file.html' title='loading the values form a properties file'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-1791241513719557174</id><published>2009-09-10T18:39:00.001+05:30</published><updated>2009-09-10T18:40:57.743+05:30</updated><title type='text'>Finding the Duplicate records from the Table</title><content type='html'>SELECT MAX(col_1&lt;column&gt;) AS dupid,COUNT(col_1) AS dupcnt&lt;/column&gt;&lt;br /&gt;FROM table_name&lt;br /&gt;GROUP BY&amp;nbsp;col_1&amp;nbsp;&amp;nbsp;HAVING dupcnt &amp;gt; 1&lt;br /&gt;&lt;br /&gt;&lt;table name=""&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-1791241513719557174?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/1791241513719557174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/09/finding-duplicate-records-from-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/1791241513719557174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/1791241513719557174'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/09/finding-duplicate-records-from-table.html' title='Finding the Duplicate records from the Table'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-3255829790880359118</id><published>2009-09-02T15:26:00.000+05:30</published><updated>2009-09-02T15:26:23.736+05:30</updated><title type='text'>Difference between hashcode and equal method</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial; font-size: 12px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;&lt;strong&gt;hashCode() and equals().&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;Object class provides two methods hashcode() and equals() to represent the identity of an object. It is a common convention that if one method is overridden then other should also be implemented.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;Before explaining why, let see what the contract these two methods hold. As per the Java API documentation:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;Whenever it is invoked on the same object more than once during an execution of a Java application, the hashcode() method must consistently return the same integer, provided no information used in equals() comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;If two objects are equal according to the equals(object) method, then calling the hashCode() method on each of the two objects must produce the same integer result.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;It is NOT required that if two objects are unequal according to the equals(Java.lang.Object) method, then calling the hashCode() method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;Now, consider an example where the key used to store the in Hashmap is an Integer. Consider that Integer class doesn’t implement hashcode() method. The code would look like:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&amp;nbsp;&amp;nbsp;map.put(new Integer(5),”Value1″);&lt;br /&gt;String value = (String) map.get(new Integer(5));&lt;br /&gt;System.out.println(value);&lt;br /&gt;//Output : Value is null&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&amp;nbsp;&lt;span&gt;&lt;span style="font-size: small;"&gt;Null value will be displayed since the hashcode() method returns a different hash value for the Integer object created at line 2and JVM tries to search for the object at different location.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;Now if the integer class has hashcode() method like:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;public int hashCode(){&lt;br /&gt;return value;&lt;br /&gt;}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;Everytime the new Integer object is created with same integer value passed; the Integer object will return the same hash value. Once the same hash value is returned, JVM will go to the same memory address every time and if in case there are more than one objects present for the same hash value it will use equals() method to identify the correct object.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;Another step of caution that needs to be taken is that while implementing the hashcode() method the fields that are present in the hashcode() should not be the one which could change the state of object.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0px; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="font-family: 'Times New Roman'; font-size: small;"&gt;Consider the example:&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;class&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;FourWheeler&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;implements&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;Vehicle {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;private&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;String&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;name&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;private&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;purchaseValue&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;private&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;noOfTyres&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;FourWheeler(){}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-indent: 0.5in;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px; text-indent: 0.5in;"&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;FourWheeler(String name,&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;purchaseValue) {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;this&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;name&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;= name;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;this&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: silver; background-image: initial; background-position: initial initial; background-repeat: initial; color: #0000c0; font-size: 10pt;"&gt;purchaseValue&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;= purchaseValue;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;void&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;setPurchaseValue(&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;purchaseValue) {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;this&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;.&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;purchaseValue&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;= purchaseValue;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #646464; font-size: 10pt;"&gt;@Override&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;hashCode() {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;final&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;prime = 31;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;result = 1;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;result = prime * result + ((&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;name&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;==&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;null&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;) ? 0 :&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;name&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;.hashCode());&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;result = prime * result +&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;purchaseValue&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;result;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0px; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0px; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;FourWheeler fourWObj = new FourWheeler(“Santro”,”333333);&lt;br /&gt;map.put(fourWObj,”Hyundai);&lt;br /&gt;fourWObj.setPurchaseValue(“555555)&lt;br /&gt;System.out.println(map.get(fourWObj));&lt;br /&gt;//Output: null&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0px; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;We can see that inspite of passing the same object the value returned is null. This is because the hashcode() returned on evaluation will be different since the purchaseValue is set to ‘555555’ from ‘333333’. Hence we can conclude that the hashcode() should contain fields that doesn’t change the state of object.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0px; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;One compatible, but not all that useful, way to define hashCode() is like this:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;public int hashcode(){&lt;br /&gt;return 0;&lt;br /&gt;}&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;This approach will yield bad performance for the HashMap. The conclusion which can be made is that the hashcode() should(not must) return the same value if the objects are equal. If the objects are not equal then it must return different value.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;Overriding equals() method&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;Consider the example:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;class&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;StringHelper {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;private&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;String&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;inputString&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;StringHelper(String string) {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;inputString&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;=string;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #646464; font-size: 10pt;"&gt;@Override&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;hashCode() {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;inputString&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;.length();&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;static&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;void&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;main(String[] args) {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;StringHelper helperObj =&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;new&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;StringHelper(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: 10pt;"&gt;“string”&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;StringHelper&amp;nbsp;&lt;span style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: silver; background-image: initial; background-position: initial initial; background-repeat: initial;"&gt;helperObj1&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;new&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;StringHelper(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: 10pt;"&gt;“string”&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;(helperObj.hashCode() ==&amp;nbsp;&lt;span style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: silver; background-image: initial; background-position: initial initial; background-repeat: initial;"&gt;helperObj1&lt;/span&gt;.hashCode()){&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;System.&lt;/span&gt;&lt;em&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;out&lt;/span&gt;&lt;/em&gt;&lt;span style="color: black; font-size: 10pt;"&gt;.println(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: 10pt;"&gt;“HashCode are equal”&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;(helperObj.equals(&lt;span style="-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: silver; background-image: initial; background-position: initial initial; background-repeat: initial;"&gt;helperObj1&lt;/span&gt;)){&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;System.&lt;/span&gt;&lt;em&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;out&lt;/span&gt;&lt;/em&gt;&lt;span style="color: black; font-size: 10pt;"&gt;.println(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: 10pt;"&gt;“Objects are equal”&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;else&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;System.&lt;/span&gt;&lt;em&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;out&lt;/span&gt;&lt;/em&gt;&lt;span style="color: black; font-size: 10pt;"&gt;.println(&lt;/span&gt;&lt;span style="color: #2a00ff; font-size: 10pt;"&gt;“Objects are not equal”&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;String getInputString() {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;inputString&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;// Output:&lt;br /&gt;HashCode are equal&lt;br /&gt;Objects are not equal&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;We can see that even though the StringHelper object contains the same value the equals method has returned false but the hashcode method has return true value.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;To prevent this inconsistency, we should make sure that we override both methods such that the contract between both methods doesn’t fail.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Steps that need to be taken into consideration while implementing equals method.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;1.&amp;nbsp;&lt;strong&gt;Use the == operator to check if the argument is a reference to this object.&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;If so, return true. This is just a performance optimization, but one that is worth doing if the comparison is potentially expensive.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;2.&amp;nbsp;&lt;strong&gt;Use the instanceof operator to check if the argument has the correct type&lt;/strong&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;If not, return false. Typically, the correct type is the class in which the method occurs. Occasionally, it is some interface implemented by this class. Use an interface if the class implements an interface that refines the equals contract to permit comparisons across classes that implement the interface. Collection interfaces such as Set, List, Map, and Map.Entry have this property.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;3.&amp;nbsp;&lt;strong&gt;Cast the argument to the correct type. Because this cast was preceded by an instanceof test, it is guaranteed to succeed.&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;4.&amp;nbsp;&lt;strong&gt;For each “significant” field in the class, checks if that field of the argument matches the corresponding field of this object&lt;/strong&gt;.&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;If all these tests succeed, return true; otherwise, return false&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0.25in; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;5.&amp;nbsp;&lt;strong&gt;When you are finished writing your equals method, ask yourself three questions: Is it symmetric? Is it transitive? Is it consistent?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0px; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span&gt;&lt;span style="font-size: small;"&gt;The correct implementation if equals method for the StringHelper class could be:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: #646464; font-size: 10pt;"&gt;@Override&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;public&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;boolean&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;equals(Object obj) {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;(&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;this&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;== obj)&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;true&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;(obj ==&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;null&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;false&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;(getClass() != obj.getClass())&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;false&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;final&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;StringHelper other = (StringHelper) obj;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;(&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;inputString&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;==&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;null&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;(other.&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;inputString&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;!=&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;null&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;false&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;else&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;if&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;(!&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;inputString&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;.equals(other.&lt;/span&gt;&lt;span style="color: #0000c0; font-size: 10pt;"&gt;inputString&lt;/span&gt;&lt;span style="color: black; font-size: 10pt;"&gt;))&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;false&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;return&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #7f0055; font-size: 10pt;"&gt;true&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: black; font-size: 10pt;"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="first-para" style="margin-bottom: auto; margin-left: 0px; margin-right: 0px; margin-top: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 10px;"&gt;&lt;span style="color: black; font-size: 10pt;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-3255829790880359118?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/3255829790880359118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/09/difference-between-hashcode-and-equal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3255829790880359118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3255829790880359118'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/09/difference-between-hashcode-and-equal.html' title='Difference between hashcode and equal method'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-3138303380266417751</id><published>2009-08-31T10:06:00.002+05:30</published><updated>2009-08-31T10:06:42.708+05:30</updated><title type='text'>Banking Basics</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial; font-size: 13px; white-space: pre;"&gt;&lt;a href="http://www.scribd.com/doc/19249474/Banking-Basics-290808"&gt;http://www.scribd.com/doc/19249474/Banking-Basics-290808&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-3138303380266417751?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/3138303380266417751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/banking-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3138303380266417751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/3138303380266417751'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/banking-basics.html' title='Banking Basics'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-8353926923539103723</id><published>2009-08-27T10:23:00.002+05:30</published><updated>2009-08-27T10:25:36.813+05:30</updated><title type='text'>Generic class for Amount in words</title><content type='html'>&lt;div&gt;package com.evolvus.common.util;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;public class AmountInWords {&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;   final static String units[] = {"","one ","two ","three ","four ","five ","six ",   &lt;/div&gt;&lt;div&gt;                        "seven ","eight ","nine ","ten ","eleven ","twelve ","thirteen ",   &lt;/div&gt;&lt;div&gt;                        "fourteen ","fifteen ","sixteen ","seventeen ","eighteen ","nineteen "};   &lt;/div&gt;&lt;div&gt;        String tens[] = {"", "ten ","twenty ","thirty ","forty ","fifty ","sixty ","seventy ",   &lt;/div&gt;&lt;div&gt;                        "eighty ","ninety "}; &lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;  public String format(String aHigherCurrency, String aLowerCurrency,&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;String aAmount, String aSystemCurrencyFormat,int decimalLength) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;  &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;String words="";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;String[] systemCurrencyFormats = aSystemCurrencyFormat.split(",");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;int formatCount = systemCurrencyFormats[0].length();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;String higherCurrencyValue = null;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;String lowerCurrencyValue = null;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;String[] amounts = aAmount.split("\\.");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;if (amounts != null &amp;amp;&amp;amp; amounts.length &gt; 0) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;higherCurrencyValue = amounts[0];&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;if (amounts.length &gt; 1)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;				&lt;/span&gt;lowerCurrencyValue = amounts[1];&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;words=words.concat(aHigherCurrency);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;words=words.concat(" ");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;/* Call to amount to words for higher currency */&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;words=words.concat(this.intialFormat(Integer.parseInt(higherCurrencyValue), formatCount));&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;if (lowerCurrencyValue != null) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;if (lowerCurrencyValue.length() &gt; decimalLength) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;				&lt;/span&gt;lowerCurrencyValue = lowerCurrencyValue.substring(0,&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;						&lt;/span&gt;decimalLength);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;words=words.concat("and ");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;/* Call to amount to words for lower currency */&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;words=words.concat(this.intialFormat(Integer.parseInt(lowerCurrencyValue), 2));&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;words=words.concat(aLowerCurrency);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;return words;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;        &lt;/div&gt;&lt;div&gt;  public String intialFormat(int amount,int foramt)   &lt;/div&gt;&lt;div&gt;        {   &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;  &lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;String words = "";&lt;/div&gt;&lt;div&gt;            String tword="";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;        if(foramt==3){  &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;        &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;int millions = amount / 1000000;    &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;   &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;tword =threeDigits(millions);   &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            if(tword.length()&gt;1)   &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;                 words=tword + "million ";      &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            amount-= millions*1000000;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;        }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;        else if (foramt==2){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;        &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;int crore = amount / 10000000; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            tword =threeDigits(crore); &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            tword = threeDigits(crore);   &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            if(tword.length()&gt;1)   &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;                    words+= tword + "crore ";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            amount-= crore*10000000;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            int lakhs = amount / 100000; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            tword = threeDigits(lakhs);   &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            if(tword.length()&gt;1)   &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;                    words+= tword + "lakh ";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;            amount-= lakhs*100000;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;        }&lt;/div&gt;&lt;div&gt;            &lt;/div&gt;&lt;div&gt;            int thousands = amount / 1000;   &lt;/div&gt;&lt;div&gt;            tword = threeDigits(thousands);   &lt;/div&gt;&lt;div&gt;            if(tword.length()&gt;1)   &lt;/div&gt;&lt;div&gt;                    words+= tword + "thousand ";&lt;/div&gt;&lt;div&gt;            &lt;/div&gt;&lt;div&gt;            amount-=thousands*1000;&lt;/div&gt;&lt;div&gt;            words+=threeDigits(amount);   &lt;/div&gt;&lt;div&gt;            return  words;               &lt;/div&gt;&lt;div&gt;        }  &lt;/div&gt;&lt;div&gt;     &lt;/div&gt;&lt;div&gt;    public String threeDigits(int digits)   &lt;/div&gt;&lt;div&gt;    {   &lt;/div&gt;&lt;div&gt;        String digWord = "";   &lt;/div&gt;&lt;div&gt;        int hnd = digits / 100;   &lt;/div&gt;&lt;div&gt;       if(hnd&gt;0)   &lt;/div&gt;&lt;div&gt;         digWord+=units[hnd] + "hundred ";   &lt;/div&gt;&lt;div&gt;       int ten = digits - hnd *100;   &lt;/div&gt;&lt;div&gt;       if(ten&lt;20)&gt;&lt;div&gt;           digWord+= units[ten];   &lt;/div&gt;&lt;div&gt;       else  &lt;/div&gt;&lt;div&gt;       {   &lt;/div&gt;&lt;div&gt;        int tenth = ten / 10;   &lt;/div&gt;&lt;div&gt;        digWord+=tens[tenth];   &lt;/div&gt;&lt;div&gt;        int last = ten - tenth*10;   &lt;/div&gt;&lt;div&gt;        digWord+= units[last];   &lt;/div&gt;&lt;div&gt;           &lt;/div&gt;&lt;div&gt;       }   &lt;/div&gt;&lt;div&gt;       return digWord;   &lt;/div&gt;&lt;div&gt;    }   &lt;/div&gt;&lt;div&gt;          &lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;     public static void main(String args[]){  &lt;/div&gt;&lt;div&gt;    &lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt; AmountInWords a = new AmountInWords();&lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt; /* Inputs&lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;  * &lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;  * Higher Currency&lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;  * Lower Currency&lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;  * Amount&lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;  * SystemConfiguration&lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;  * Selected Currency Decimal Points&lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;  * */&lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt; &lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt; String s=a.format("Rupees", "Paisa", "3451234.425", "##,###", 3);&lt;/div&gt;&lt;div&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt; System.out.println(s);&lt;/div&gt;&lt;div&gt;     }&lt;/div&gt;&lt;div&gt;  &lt;/div&gt;&lt;div&gt;}    &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-8353926923539103723?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/8353926923539103723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/generic-class-for-amount-in-words.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8353926923539103723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8353926923539103723'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/generic-class-for-amount-in-words.html' title='Generic class for Amount in words'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-5108739230580273491</id><published>2009-08-20T14:14:00.001+05:30</published><updated>2009-08-20T14:14:58.808+05:30</updated><title type='text'>Flex Style explorer for beter CSS</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="color: black; "&gt;&lt;span class="Apple-style-span"  style="font-family:Arial;"&gt;A&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.0pt;font-family:Verdana; color:black"&gt; free online tool provided by Adobe Flex to create CSS&lt;/span&gt;. Some of the impressive parts of this tool are&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top:1.8pt;margin-right:0in;margin-bottom:1.8pt; margin-left:6.0pt;text-indent:-.25in;line-height:9.75pt;mso-list:l0 level1 lfo1; tab-stops:list .5in"&gt;&lt;span style="mso-bidi-font-size:9.0pt; font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol; color:black"&gt;&lt;span style="mso-list:Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;                             &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.0pt;font-family:Verdana; color:black"&gt;its free&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top:1.8pt;margin-right:0in;margin-bottom:1.8pt; margin-left:6.0pt;text-indent:-.25in;line-height:9.75pt;mso-list:l0 level1 lfo1; tab-stops:list .5in"&gt;&lt;span style="mso-bidi-font-size:9.0pt; font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol; color:black"&gt;&lt;span style="mso-list:Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;                             &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.0pt;font-family:Verdana; color:black"&gt;Its online so no installation required&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top:1.8pt;margin-right:0in;margin-bottom:1.8pt; margin-left:6.0pt;text-indent:-.25in;line-height:9.75pt;mso-list:l0 level1 lfo1; tab-stops:list .5in"&gt;&lt;span style="mso-bidi-font-size:9.0pt; font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol; color:black"&gt;&lt;span style="mso-list:Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;                             &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.0pt;font-family:Verdana; color:black"&gt;Damn quick&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-top:1.8pt;margin-right:0in;margin-bottom:1.8pt; margin-left:6.0pt;text-indent:-.25in;line-height:9.75pt;mso-list:l0 level1 lfo1; tab-stops:list .5in"&gt;&lt;span style="mso-bidi-font-size:9.0pt; font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol; color:black"&gt;&lt;span style="mso-list:Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;                             &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:9.0pt;font-family:Verdana; color:black"&gt;And effect against every change you make is visible at the very same moment just like desktop applications. I think this is what flex is best in.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top:.1in;margin-right:0in;margin-bottom:.2in;margin-left:0in; line-height:10.5pt"&gt;&lt;span style="font-size:9.0pt;font-family:Verdana; color:black"&gt;The name of this tool is&lt;span class="apple-converted-space"&gt; &lt;b style="mso-bidi-font-weight:normal"&gt;Flex Style explorer&lt;/b&gt;. &lt;/span&gt;&lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;The Flex explorer allows you to interact with components and visually modify them. More importantly it is an effective development tool that allows you to create CSS within the site and then copy it in to our application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:Arial;color:windowtext"&gt;&lt;/span&gt;Please click on the following link&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a href="http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html"&gt;http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html#&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-5108739230580273491?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/5108739230580273491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/flex-style-explorer-for-beter-css.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5108739230580273491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/5108739230580273491'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/flex-style-explorer-for-beter-css.html' title='Flex Style explorer for beter CSS'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-2031934165137120819</id><published>2009-08-19T17:19:00.000+05:30</published><updated>2009-08-19T17:20:25.488+05:30</updated><title type='text'>MYSQL DB Backup through java</title><content type='html'>import java.io.BufferedReader;&lt;br /&gt;import java.io.BufferedWriter;&lt;br /&gt;import java.io.FileWriter;&lt;br /&gt;import java.io.InputStreamReader;&lt;br /&gt;import java.util.Date;&lt;br /&gt;&lt;br /&gt;public class DBBackupUtil {&lt;br /&gt; public static boolean getData(String userName,String password,String dbName,String FileName) throws Exception {&lt;br /&gt;  boolean isCompleted=true;&lt;br /&gt;  FileWriter fstream=null;&lt;br /&gt;  BufferedWriter out=null;&lt;br /&gt;  BufferedReader in=null;&lt;br /&gt;  Process run=null;&lt;br /&gt;  try{&lt;br /&gt;   System.out.println("DBBackup Start time:"+new Date());&lt;br /&gt;   System.out.println("---Started--");&lt;br /&gt;    run = Runtime.getRuntime().exec("mysqldump -u"+userName+" -p"+password+" --database "+dbName+" --routines=1");&lt;br /&gt;    in= new BufferedReader(new InputStreamReader(run.getInputStream()));  &lt;br /&gt;    String line = null;  &lt;br /&gt;    fstream = new FileWriter(FileName);&lt;br /&gt;       out = new BufferedWriter(fstream);&lt;br /&gt;    while ((line = in.readLine()) != null) {  &lt;br /&gt;         out.write(line+'\r');&lt;br /&gt;    }&lt;br /&gt;    out.close();&lt;br /&gt;    in.close();&lt;br /&gt;    System.out.println("---Completed--");&lt;br /&gt;    System.out.println("DBBackup Completed time:"+new Date());&lt;br /&gt;    &lt;br /&gt;  }catch (Exception e) {&lt;br /&gt;   e.printStackTrace();&lt;br /&gt;   isCompleted =false;&lt;br /&gt;  }finally{&lt;br /&gt;   fstream=null;&lt;br /&gt;   out=null;&lt;br /&gt;   in=null;&lt;br /&gt;  }&lt;br /&gt;   return isCompleted;&lt;br /&gt; }&lt;br /&gt; public static void main(String[] args)  {&lt;br /&gt;  try{&lt;br /&gt;   DBBackupUtil backup = new DBBackupUtil();&lt;br /&gt;   &lt;br /&gt;   backup.getData("root","root","ams_cameltest2","C:\\back.sql");&lt;br /&gt;  &lt;br /&gt;  }catch (Exception e) {&lt;br /&gt;   e.printStackTrace();&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-2031934165137120819?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/2031934165137120819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/mysql-db-backup-through-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2031934165137120819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/2031934165137120819'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/mysql-db-backup-through-java.html' title='MYSQL DB Backup through java'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-6263246242792889685</id><published>2009-08-12T13:03:00.000+05:30</published><updated>2009-08-12T13:05:54.869+05:30</updated><title type='text'>Generic class for different currency</title><content type='html'>&lt;div&gt;public class GenericFormatCurrency {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;String preixStr="";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;String postfixStr = "";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;int postfixLen=0;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;String[] preixStrArray;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;int prefixArrayLen = 0;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;int prefixLen1=0;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;int prefixLen2=0;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;format(String formatStr){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;preixStr=formatStr.substring(0,formatStr.lastIndexOf("."));&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;postfixStr=formatStr.substring(formatStr.lastIndexOf(".")+1);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;postfixLen = postfixStr.length();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;preixStrArray = preixStr.split(",");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;prefixArrayLen = preixStrArray.length;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;if(prefixArrayLen-1==0){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;prefixLen1=preixStrArray[0].length();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;}else{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;prefixLen1=preixStrArray[prefixArrayLen-1].length();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;prefixLen2=preixStrArray[prefixArrayLen-2].length();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;public  void formaNumber(String number) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;//format format = new format("##,####.0000");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;//String number="87654321.12345";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;String pre=number.substring(0,number.lastIndexOf("."));&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;String postnum=number.substring(number.lastIndexOf(".")+1);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;String output="";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;int length1=this.prefixLen1;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;int length2=this.prefixLen2;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;if(postnum.trim().length()&lt;=this.postfixLen){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;output="."+postnum;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;}else{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;output="."+postnum.substring(0,this.postfixLen);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;System.out.println(output);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;if(pre.trim().length()&lt;this.prefixlen1){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;output=pre+output&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;}else{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;while(pre.trim().length()&gt;0){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;				&lt;/span&gt;output=","+pre.substring(pre.trim().length()-length1,pre.trim().length())+output;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;				&lt;/span&gt;pre = pre.substring(0,pre.trim().length()-length1);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;				&lt;/span&gt;length1 = length2;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;				&lt;/span&gt;if(pre.trim().length()&lt;=this.prefixLen1){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;					&lt;/span&gt;output = pre+output;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;					&lt;/span&gt;break;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;				&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;			&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;System.out.println(output);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;public static void main(String[] args) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;GenericFormatCurrency format = new GenericFormatCurrency("##,####.0000");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;String number="87654321.12345";&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;format.formaNumber(number);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;System.out.println("-------------------------");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;		&lt;/span&gt;format.formaNumber("87654321.1234");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;	&lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-6263246242792889685?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/6263246242792889685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/generic-class-for-different-currency.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6263246242792889685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/6263246242792889685'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/08/generic-class-for-different-currency.html' title='Generic class for different currency'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-1085003900695186531</id><published>2009-07-30T10:10:00.002+05:30</published><updated>2009-07-30T10:14:47.427+05:30</updated><title type='text'>Resolving heap space problem</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: verdana; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;h4 class="serendipity_title" style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: Verdana, Arial, Geneva, Helvetica, sans-serif; font-size: medium; font-weight: bold; color: rgb(51, 51, 51); padding-left: 5px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: rgb(54, 85, 140); "&gt;&lt;a href="http://blog.xam.dk/archives/68-Eclipse-and-memory-settings.html" style="color: rgb(255, 0, 0); text-decoration: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; "&gt;Eclipse and memory settings&lt;/a&gt;&lt;/h4&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;eclipse.ini is a configuration file that is located in&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt; the root of your&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt; eclipseinstallation which is used as the default arguments passed to&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;eclipse..&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#333333;"&gt;&lt;div&gt;--launcher.XXMaxPermSize&lt;/div&gt;&lt;div&gt;512M&lt;/div&gt;&lt;div&gt;-vmargs &lt;/div&gt;&lt;div&gt;-Xms1024M &lt;/div&gt;&lt;div&gt;-Xmx1536m    &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;span class="Apple-style-span"  style="color:#FF0000;"&gt;Environment varialbe&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;JAVA_OPT java -Xms2048m -Xmx2441m&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-1085003900695186531?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/1085003900695186531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/07/resolving-heap-space-problem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/1085003900695186531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/1085003900695186531'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/07/resolving-heap-space-problem.html' title='Resolving heap space problem'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-1797852343132910263</id><published>2009-07-24T18:34:00.004+05:30</published><updated>2009-08-19T17:22:13.270+05:30</updated><title type='text'>How to upload a file in to the  ftp server through java</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div&gt;package com.evolvus.documentmanagement.util;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import java.io.ByteArrayInputStream;&lt;/div&gt;&lt;div&gt;import java.io.ByteArrayOutputStream;&lt;/div&gt;&lt;div&gt;import java.io.IOException;&lt;/div&gt;&lt;div&gt;import java.io.InputStream;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;import org.apache.commons.net.ftp.FTP;&lt;/div&gt;&lt;div&gt;import org.apache.commons.net.ftp.FTPClient;&lt;/div&gt;&lt;div&gt;import org.apache.commons.net.ftp.FTPConnectionClosedException;&lt;/div&gt;&lt;div&gt;import org.apache.commons.net.ftp.FTPReply;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/***&lt;/div&gt;&lt;div&gt; * This is an  program demonstrating how to use the FTPClient class.&lt;/div&gt;&lt;div&gt; * This program connects to an FTP server and retrieves the specified&lt;/div&gt;&lt;div&gt; * file. &lt;/div&gt;&lt;div&gt; ***/&lt;/div&gt;&lt;div&gt;public final class FTPUtil&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public boolean insertIntoFTP(String server,String port,String username,String password,String remote,String local,String directoryName,byte[] data){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;boolean  error = false;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;FTPClient ftp = null;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;try&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;ftp = new FTPClient();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;this.getFTPConnection(ftp, server,port, username, password,directoryName);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;if(ftp!=null){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;InputStream input;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;input =  new ByteArrayInputStream(data);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;ftp.storeFile(remote, input);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;        }catch (FTPConnectionClosedException e)&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;            error = true;&lt;/div&gt;&lt;div&gt;            System.err.println("Server closed connection.");&lt;/div&gt;&lt;div&gt;            e.printStackTrace();&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        catch (IOException e)&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;            error = true;&lt;/div&gt;&lt;div&gt;            e.printStackTrace();&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        finally&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;            if (ftp.isConnected())&lt;/div&gt;&lt;div&gt;            {&lt;/div&gt;&lt;div&gt;                try&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                    ftp.disconnect();&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;                catch (IOException f)&lt;/div&gt;&lt;div&gt;                {&lt;/div&gt;&lt;div&gt;                    // do nothing&lt;/div&gt;&lt;div&gt;                }&lt;/div&gt;&lt;div&gt;            }&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;        return error;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public byte[] getDataFromFTP(String server,String port,String username,String password,String remote,String directoryName,String local){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;byte[] data = null ;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;boolean  error = false;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;FTPClient ftp = null;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;try&lt;/div&gt;&lt;div&gt;        {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;ftp = new FTPClient();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;this.getFTPConnection(ftp, server,port, username, password,directoryName);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;if(ftp!=null){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;    &lt;/span&gt;ByteArrayOutputStream output;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;                output = new ByteArrayOutputStream();&lt;/div&gt;&lt;div&gt;                ftp.retrieveFile(remote, output);&lt;/div&gt;&lt;div&gt;                data=output.toByteArray() ;&lt;/div&gt;&lt;div&gt;                output.close();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;        }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;catch (FTPConnectionClosedException e)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;  {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;            error = true;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;            System.err.println("Server closed connection.");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;            e.printStackTrace();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;   }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt; catch (IOException e)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;        {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;            error = true;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;            e.printStackTrace();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;        }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt; finally&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;      {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;            if (ftp.isConnected())&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;            {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;                try&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;                {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;                    ftp.disconnect();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;                }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;                catch (IOException f)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;                {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;                    // do nothing&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;                }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;            }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;            return data;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;        }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public FTPClient getFTPConnection(FTPClient ftp,String server,String port,String username,String password,String directoryName){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt; boolean  error = false;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt; try&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;        {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            int reply;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            if(port!=null &amp;amp;&amp;amp;port.trim().length()&gt;0)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;ftp.connect(server,Integer.parseInt(port));&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            else&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;ftp.connect(server);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            System.out.println("Connected to " + server + ".");&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            // After connection attempt, you should check the reply code to verify&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            // success.&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            reply = ftp.getReplyCode();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            if (!FTPReply.isPositiveCompletion(reply))&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                ftp.disconnect();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                System.err.println("FTP server refused connection.");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            if (!ftp.login(username, password))&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                ftp.logout();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                error = true;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;           if(!ftp.changeWorkingDirectory(directoryName)){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;        &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;   ftp.mkd(directoryName);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;           }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            ftp.setFileType(FTP.BINARY_FILE_TYPE);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;        }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;        catch (IOException e)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;        {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            if (ftp.isConnected())&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                try&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                    ftp.disconnect();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                catch (IOException f)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                    // do nothing&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;                }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            System.err.println("Could not connect to server.");&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;            e.printStackTrace();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;        }&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;        return ftp;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public static void main(String[] args) {&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;FTPUtil util = new FTPUtil();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;util.insertIntoFTP("192.168.1.1", "65300", "user1", "ftp*evolvus", "test123", "test", "test123", "test".getBytes());&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-1797852343132910263?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/1797852343132910263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/07/how-to-upload-file-in-ftp-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/1797852343132910263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/1797852343132910263'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/07/how-to-upload-file-in-ftp-server.html' title='How to upload a file in to the  ftp server through java'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-8968183877408634070</id><published>2009-07-10T20:10:00.002+05:30</published><updated>2009-07-10T20:12:54.920+05:30</updated><title type='text'>Multiple file upload using Apache Struts</title><content type='html'>&lt;span class="Apple-style-span"   style="  line-height: 17px; font-family:Arial;font-size:14px;"&gt;&lt;h3 class="post-title entry-title" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: normal; font-style: inherit; font-size: 1.5em; font-family: Georgia; vertical-align: baseline; color: rgb(17, 17, 17); line-height: 1; "&gt;&lt;br /&gt;&lt;/h3&gt;&lt;div class="post-header-line-1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-size: 14px; font-family: inherit; vertical-align: baseline; "&gt;&lt;p class="quite small date-header" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.875em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: normal; font-style: inherit; font-size: 0.8em; font-family: inherit; vertical-align: baseline; line-height: 1.875em; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="post-body" id="post-6295794668707983444"    style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:14px;color:initial;"&gt;&lt;p    style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:14px;color:initial;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; color: rgb(0, 0, 0); font-family:inherit;font-size:14px;"&gt;Uploading of file using struts with the FormFile is easy! But the requirement that I got was not as sweet as I thought. I had to upload multiple files and the user had the facility to add files before doing the upload. Thus I had to have a “Add File” button that will present the user with one more column to select a file using the browse button.&lt;/span&gt;&lt;o:p style="color: rgb(0, 0, 0); "&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-size: 14px; font-family: inherit; vertical-align: baseline; color: rgb(0, 0, 0); "&gt;Having the facility of FormFile and the apache upload package, I thought the task would be easy but I had tough time due the dynamic part of this task. In the end I solved the problem. And here is the solution for you people as you should not reinvent the wheel. :)&lt;/p&gt;&lt;p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-size: 14px; font-family: inherit; vertical-align: baseline; color: rgb(0, 0, 0); "&gt;Add button problem was solved by a simple java script that created an INPUT tag and inserted to the existing form. The code is given below:&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"    style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:14px;color:initial;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;function &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;addFileElement() &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;{&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:'Courier New';font-size:10pt;color:initial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;fCount++;&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:'Courier New';font-size:10pt;color:initial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;var &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;fObject = document.getElementById(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(42, 0, 255); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;'fileSection'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;var &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;text = &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(42, 0, 255); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;'File:'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;var &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;tag=&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(42, 0, 255); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;'&lt;input type="file" name=""&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;+fCount+&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(42, 0, 255); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;']" value=""&gt;'&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;var &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;brk=&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(42, 0, 255); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;'&lt;br /&gt;';&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;var &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;o1 = document.createTextNode(text);&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;var &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;o2 = document.createElement(tag);&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;var &lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;o3 = document.createElement(brk);&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"    style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:14px;color:initial;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white;  background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:black;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;fObject.appendChild(o3);&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;fObject.appendChild(o1);&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;fObject.appendChild(o2);&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;fObject.appendChild(o3);&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:'Courier New';font-size:10pt;color:initial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"    style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:14px;color:initial;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background- background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:white;"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-size: 14px; font-family: inherit; vertical-align: baseline; color: rgb(0, 0, 0); "&gt;As usual the form bean of struts had a FormFile and an ArrayList variable that would hold the entire set of files. Now, I the form bean we tune the setter method of FormFile so that, each time the function is called the new file that is being set is added to the ArrayList. The code is given below:&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"    style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:14px;color:initial;"&gt;&lt;b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: white; color: rgb(127, 0, 85); background-position: 0% 50%; font-family:'Courier New';font-size:10pt;"&gt;public&lt;/span&gt;&lt;/b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background- background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:white;"&gt; &lt;b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; color: rgb(127, 0, 85); font-family:inherit;font-size:13px;"&gt;void&lt;/span&gt;&lt;/b&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;setTestFile(&lt;/span&gt;&lt;b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; color: rgb(127, 0, 85); font-family:inherit;font-size:13px;"&gt;int&lt;/span&gt;&lt;/b&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;in,FormFile&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;t)&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:'Courier New';font-size:10pt;color:initial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"    style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:14px;color:initial;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background- background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:white;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; color: rgb(127, 0, 85); font-family:inherit;font-size:13px;"&gt;try&lt;/span&gt;&lt;/b&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:'Courier New';font-size:10pt;color:initial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"    style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:14px;color:initial;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background- background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:white;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; color: rgb(127, 0, 85); font-family:inherit;font-size:13px;"&gt;this&lt;/span&gt;&lt;/b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;.testFile&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;=&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;t;&lt;/span&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:'Courier New';font-size:10pt;color:black;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt; &lt;/span&gt;// testFile is FormFile’s obj&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background- background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:white;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;setFormFiles(t);&lt;/span&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:'Courier New';font-size:10pt;color:black;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt; &lt;/span&gt;// add the file to array&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; background-image: none; background-repeat: repeat; background-attachment: scroll; -webkit-background-clip: initial; -webkit-background-origin: initial; background- background-position: 0% 50%; font-family:'Courier New';font-size:10pt;color:white;"&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;index++;&lt;br /&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;}&lt;/span&gt;&lt;b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; color: rgb(127, 0, 85); font-family:inherit;font-size:13px;"&gt;catch&lt;/span&gt;&lt;/b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;(Exception&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;e)&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;System.out.println(&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline; color: rgb(42, 0, 255); font-family:inherit;font-size:13px;"&gt;"Exception in setTestFile!"&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;+&lt;/span&gt; &lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit;   vertical-align: baseline;  font-family:inherit;font-size:13px;color:black;"&gt;e);&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:inherit;font-size:13px;color:initial;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border- font-weight: inherit; font-style: inherit;   vertical-align: baseline; font-family:'Courier New';font-size:10pt;color:initial;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-weight: inherit; font-style: inherit; font-size: 14px; font-family: inherit; vertical-align: baseline; color: rgb(0, 0, 0); "&gt;&lt;o:p&gt;A&lt;/o:p&gt;nd now the jsp code! It’s fairly simple and sweet. All you have to do is provide a strut form that has "browse" buttons, a "submit" button and a “add” button. The add button will run the above java script and you will get more options to upload file!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7908029536884302293-8968183877408634070?l=pmohanrao.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pmohanrao.blogspot.com/feeds/8968183877408634070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pmohanrao.blogspot.com/2009/07/multiple-file-upload-using-apache.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8968183877408634070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7908029536884302293/posts/default/8968183877408634070'/><link rel='alternate' type='text/html' href='http://pmohanrao.blogspot.com/2009/07/multiple-file-upload-using-apache.html' title='Multiple file upload using Apache Struts'/><author><name>Mohan rao</name><uri>http://www.blogger.com/profile/08839918309572426663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_j56E3_yZsnU/S_UjVKReAFI/AAAAAAAAESo/t9dypJDVffI/S220/2251.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7908029536884302293.post-8348507038370316366</id><published>2009-06-24T12:08:00.003+05:30</published><updated>2009-06-24T12:11:18.479+05:30</updated><title type='text'>Handling StoredProcedure in SpringORM</title><content type='html'>&lt;h3 style="margin:0in;margin-bottom:.0001pt"&gt;&lt;span lang="EN" style="font-size: 10.0pt;font-family:Verdana;color:black;mso-ansi-language:EN"&gt; &lt;/span&gt;&lt;tt&gt;&lt;u&gt;&lt;span lang="EN" style="font-size:10.5pt;color:black;mso-ansi-language:EN"&gt;StoredProcedure&lt;/span&gt;&lt;/u&gt;&lt;/tt&gt;&lt;u&gt;&lt;span lang="EN" style="font-size:10.0pt;font-family:Verdana;color:black;mso-ansi-language: EN"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/h3&gt;  &lt;p style="margin-top:3.75pt;margin-right:0in;margin-bottom:3.75pt;margin-left: 0in"&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black; mso-ansi-language:EN"&gt;The&lt;span class="apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;tt&gt;&lt;span lang="EN" style="font-size:8.0pt;color:black;mso-ansi-language:EN"&gt;StoredProcedure&lt;/span&gt;&lt;/tt&gt;&lt;span class="apple-converted-space"&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family: Verdana;color:black;mso-ansi-language:EN"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language:EN"&gt;class is a superclass for object abstractions of RDBMS stored procedures. This class is&lt;span class="apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;tt&gt;&lt;span lang="EN" style="font-size:8.0pt;color:black;mso-ansi-language:EN"&gt;abstract&lt;/span&gt;&lt;/tt&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language: EN"&gt;, and its various&lt;span class="apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;tt&gt;&lt;span lang="EN" style="font-size:8.0pt;color:black;mso-ansi-language:EN"&gt;execute(..)&lt;/span&gt;&lt;/tt&gt;&lt;span class="apple-converted-space"&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family: Verdana;color:black;mso-ansi-language:EN"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language:EN"&gt;methods have&lt;/span&gt;&lt;tt&gt;&lt;span lang="EN" style="font-size:8.0pt;color:black;mso-ansi-language: EN"&gt;protected&lt;/span&gt;&lt;/tt&gt;&lt;span class="apple-converted-space"&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language:EN"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language: EN"&gt;access, preventing use other than through a subclass that offers tighter typing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top:3.75pt;margin-right:0in;margin-bottom:3.75pt;margin-left: 0in"&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black; mso-ansi-language:EN"&gt;The inherited&lt;span class="apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;tt&gt;&lt;span lang="EN" style="font-size:8.0pt;color:black;mso-ansi-language:EN"&gt;sql&lt;/span&gt;&lt;/tt&gt;&lt;span class="apple-converted-space"&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family: Verdana;color:black;mso-ansi-language:EN"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language:EN"&gt;property will be the name of the stored procedure in the RDBMS. Note that JDBC 3.0 introduces named parameters, although the other features provided by this class are still necessary in JDBC 3.0.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-top:3.75pt;margin-right:0in;margin-bottom:3.75pt;margin-left: 0in"&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black; mso-ansi-language:EN"&gt;Here is an example of a program that calls a function,&lt;span class="apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;tt&gt;&lt;span lang="EN" style="font-size:8.0pt;color:black;mso-ansi-language:EN"&gt;sysdate()&lt;/span&gt;&lt;/tt&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language: EN"&gt;, that comes with any Oracle database. To use the stored procedure functionality one has to create a class that extends&lt;span class="apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;tt&gt;&lt;span lang="EN" style="font-size:8.0pt;color:black;mso-ansi-language:EN"&gt;StoredProcedure&lt;/span&gt;&lt;/tt&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language: EN"&gt;. There are no input parameters, but there is an output parameter that is declared as a date type using the class&lt;span class="apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;tt&gt;&lt;span lang="EN" style="font-size:8.0pt;color:black;mso-ansi-language:EN"&gt;SqlOutParameter&lt;/span&gt;&lt;/tt&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language: EN"&gt;. The&lt;span class="apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;tt&gt;&lt;span lang="EN" style="font-size:8.0pt;color:black;mso-ansi-language:EN"&gt;execute()&lt;/span&gt;&lt;/tt&gt;&lt;span class="apple-converted-space"&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family: Verdana;color:black;mso-ansi-language:EN"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN" style="font-size:9.0pt;font-family:Verdana;color:black;mso-ansi-language:EN"&gt;method returns a map with an entry for each declared output parameter using the parameter name as the key.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style="mso-element:para-border-div;border:solid #CCCCCC 1.0pt;mso-border-alt: solid #CCCCCC .5pt;padding:3.0pt 3.0pt 3.0pt 3.0pt;background:#F3F5E9"&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="FR" style="font-size:9.0pt;color:black;mso-ansi-language:FR"&gt;import java.sql.Types;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="FR" style="font-size:9.0pt;color:black;mso-ansi-language:FR"&gt;import java.util.HashMap;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="FR" style="font-size:9.0pt;color:black;mso-ansi-language:FR"&gt;import java.util.Iterator;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="FR" style="font-size:9.0pt;color:black;mso-ansi-language:FR"&gt;import java.util.Map;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="FR" style="font-size:9.0pt;color:black;mso-ansi-language:FR"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="FR" style="font-size:9.0pt;color:black;mso-ansi-language:FR"&gt;import javax.sql.DataSource;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="FR" style="font-size:9.0pt;color:black;mso-ansi-language:FR"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;import org.springframework.jdbc.core.SqlOutParameter;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;import org.springframework.jdbc.datasource.*;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;import org.springframework.jdbc.object.StoredProcedure;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;public class TestStoredProcedure {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;public static void main(String[] args)&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;TestStoredProcedure t = new TestStoredProcedure();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;t.test();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;System.out.println("Done!");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;void test() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;DriverManagerDataSource ds = new DriverManagerDataSource();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;ds.setDriverClassName("oracle.jdbc.OracleDriver");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;ds.setUrl("jdbc:oracle:thin:@localhost:1521:mydb");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;ds.setUsername("scott");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;ds.setPassword("tiger");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;MyStoredProcedure sproc = new MyStoredProcedure(ds);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;Map results = sproc.execute();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;printMap(results);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-ansi-language:EN"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background:#F3F5E9;border:none;mso-border-alt:solid #CCCCCC .5pt; padding:0in;mso-padding-alt:3.0pt 3.0pt 3.0pt 3.0pt"&gt;&lt;span lang="EN" style="font-size:9.0pt;color:black;mso-a
