<?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-4034650153155250265</id><updated>2012-01-05T02:33:00.259-08:00</updated><title type='text'>WAY 2 CAPTURE WORKING STUFF</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-3880014604586077088</id><published>2010-02-08T20:57:00.000-08:00</published><updated>2010-02-08T21:00:02.103-08:00</updated><title type='text'>How to Handle Session Expire in Ajax Call (Prototype Framework)</title><content type='html'>&lt;div style="color: blue;"&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Steps:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;i&gt;1. Call is made to server using XMLHttpRequest either get or post method&lt;/i&gt;&lt;br /&gt;&lt;i&gt;2. Check string token like "session expired" or "sessionexpired" the result data. If so then it indicates that session is expired.&lt;/i&gt;&lt;br /&gt;&lt;i&gt;3. If session expired then redirect it to the Session Expire Page using following code:&lt;/i&gt;&lt;br /&gt;&lt;i&gt;var sessionExpiryURL="/global/sessionExpired.jspx";&lt;/i&gt;&lt;br /&gt;&lt;i&gt;window.location=sessionExpiryURL;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: blue;"&gt;Sample Codes:&lt;/div&gt;&lt;br /&gt;Note: Sample code uses prototype framework.&lt;br /&gt;&lt;br /&gt;Script uses handling Session Expire:&lt;br /&gt;var sessionExpiryURL="/global/sessionExpired.xhtml";&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The following method checks if the session has expired or not &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pre: Applicable for Ajax call only and the ajaxResponseText must pass the responseText from the AJax call &lt;br /&gt;*/&lt;br /&gt;function isSessionExpired_OnResponseText(ajaxResponseText){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ajaxResponseText != null ){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var lclAjaxResponseText = ajaxResponseText.toLowerCase(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (lclAjaxResponseText.indexOf("session expired") &amp;gt;=0 || lclAjaxResponseText.indexOf("sessionexpired") &amp;gt;=0 ){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;}&lt;br /&gt;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The following method checks if the session expired and redirects to session expiry&amp;nbsp; page &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pre: Applicable for Ajax call only and the ajaxResponseText must pass the responseText from the AJax call &lt;br /&gt;*/&lt;br /&gt;function handleSessionExpiry_OnResponseText(ajaxResponseText){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(isSessionExpired_OnResponseText(ajaxResponseText) == true){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; window.location=sessionExpiryURL;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The following method checks if the session has expired or not &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pre: Applicable for Ajax call only and the ajaxResponseText must pass the responseText from the AJax call &lt;br /&gt;*/&lt;br /&gt;function isSessionExpired(ajaxResponseObj){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ajaxResponseObj!= null ){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var contentText =ajaxResponseObj.responseText;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return isSessionExpired_OnResponseText(contentText);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The following method checks if the session expired and redirects to session expiry&amp;nbsp; page &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pre: Applicable for Ajax call only and the ajaxResponseText must pass the responseText from the AJax call &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;*/&lt;br /&gt;function handleSessionExpiry(ajaxResponseObj){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ajaxResponseObj!= null ){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var contentText =ajaxResponseObj.responseText;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return handleSessionExpiry_OnResponseText(contentText);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Script uses to post Ajax Call:&lt;br /&gt;&lt;br /&gt;var jScript = Class.create();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; jScript .prototype =&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialize: function()&lt;br /&gt;&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; // Initialization Stuff, It is called before calling any mothod of jScript&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* funtion defination &lt;br /&gt;@ URL - URL to be submitted to server&lt;br /&gt;@ params-Associative array (Hash) to carry data from client to server&lt;br /&gt;@ sourceObj- Ideally onchange of source object event; it posts the ajax request&lt;br /&gt;@ targetObj- Ideally&amp;nbsp; targetObj is the placeholder for the response like populating some data into it.&lt;br /&gt;/*&lt;br /&gt;post: function(URL, params, sourceObj, targetObj) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var url = strURL ;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var responseText = "";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; new Ajax.Request(strURL, {&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; parameters: parameters,&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; method:'post',&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; onSuccess:function(transport) {&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; try {&lt;br /&gt;// Algorithm uses to extract data from response and populate to the targetObj&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }catch(e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(isSessionExpired(transport)==true) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; handleSessionExpiry(transport);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; alert("System Error" );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&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; onFailure:function(transport) {&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; alert("An&amp;nbsp; error occurred");&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; alert("Error occurred: " + transport.responseText);&amp;nbsp;&amp;nbsp;&amp;nbsp; //Debug purpose only&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; //TODO handle errors&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; });&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//AJAX Function&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadStates: function (){&lt;br /&gt;&amp;nbsp;&amp;nbsp; var sourceObj = $('countryName'); // country name selected in dropdown&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var targetObj =  $('stateNames'); // dropdown list box to&amp;nbsp; hold state names &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var parameters = new Hash();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var strURL="../Country/getStates.xhtml"; // Servlet to provide state names &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters['countryName'] = sourceObj.value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.set('ajaxParam', '1');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.post(strURL, parameters,&amp;nbsp; sourceObj , targetObj );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;jScript .Initializer = function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; jScript = new jScript ();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Event.observe(window, 'load', jScript .Initializer);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-3880014604586077088?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/3880014604586077088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2010/02/how-to-handle-session-expire-in-ajax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3880014604586077088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3880014604586077088'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2010/02/how-to-handle-session-expire-in-ajax.html' title='How to Handle Session Expire in Ajax Call (Prototype Framework)'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-3014713645520678643</id><published>2010-02-02T01:16:00.000-08:00</published><updated>2010-02-03T13:40:18.100-08:00</updated><title type='text'>jQuery Autocomplete Field Sample Code (Using Plugins)</title><content type='html'>&lt;strong&gt;1. Auto complete plugin - http://www.pengoworks.com/workshop/jquery/autocomplete.htm&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2. Javascript:&lt;/strong&gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&lt;br /&gt;/** AJAX - Call back&lt;br /&gt;This function will submit the form when any item is selected from the autocompleted text field&lt;br /&gt;@param li - item submited from the autocomplete field&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;function findValue(li) {&lt;br /&gt;if( li == null ){&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;var selectedValue;&lt;br /&gt;if( !!li.extra ){&lt;br /&gt;selectedValue = li.extra[0];&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;selectedValue = li.selectValue;&lt;br /&gt;}&lt;br /&gt;j$("studentNameQS").value=j$("studentName").value;&lt;br /&gt;// Action class method name&lt;br /&gt;j$("testForm").action = "showStudentDetailsById.xhtml";&lt;br /&gt;j$("testForm").submit();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/** AJAX - Call back&lt;br /&gt;A JavaScript function that will be called when an item is selected. The autocompleter will specify a single argument, being the LI element selected.&lt;br /&gt;This LI element will have an attribute "extra" that contains an array of all cells that the backend specified.&lt;br /&gt;@param li - item submited from the autocomplete field&lt;br /&gt;*/&lt;br /&gt;function selectItem(li) {&lt;br /&gt;findValue(li);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/** AJAX - Call back&lt;br /&gt;A JavaScript function that will be called when item are populated in the select box.&lt;br /&gt;@param row - item in string format laying inbetween line separator.&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;function displayItem (row) {&lt;br /&gt;return row[0];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/** AJAX - Call back&lt;br /&gt;A JavaScript funcion that can provide advanced markup for an item. For each row of results, this function will be called. &lt;br /&gt;The returned value will be displayed inside an LI element in the results list. &lt;br /&gt;Autocompleter will provide 3 parameters: &lt;br /&gt;the results row, &lt;br /&gt;the position of the row in the list of results, &lt;br /&gt;and the number of items in the list of results.&lt;br /&gt;@param row - item in string format laying inbetween line separator.    &lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;function formatItem(row) {&lt;br /&gt;return row[0];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;j$(document).ready(function() {&lt;br /&gt;// Register autocomplete plugin with the given textfield id i.e. #studentNameQS once the DOM is ready.&lt;br /&gt;j$("#studentNameQS").autocomplete(&lt;br /&gt;"findStudentDetails.xhtml", // URL&lt;br /&gt;{&lt;br /&gt;delay:10,&lt;br /&gt;minChars:4,&lt;br /&gt;matchSubset:1,&lt;br /&gt;matchContains:1,&lt;br /&gt;cacheLength:10,&lt;br /&gt;maxItemsToShow:10,&lt;br /&gt;formatItem:formatItem,&lt;br /&gt;onItemSelect:selectItem,&lt;br /&gt;onFindValue:findValue,&lt;br /&gt;lineSeparator:'|',&lt;br /&gt;cellSeparator: '~',&lt;br /&gt;autoFill:true&lt;br /&gt;}&lt;br /&gt;);&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Form:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;s:form name="ajaxStudentForm" id="ajaxStudentForm" action="showStudentDetailsById.xhtml"&amp;gt;&lt;br /&gt;&amp;lt;s:hidden name="studentNameQS"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/s:form&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input id="studentName" type="text" maxlength="254" size="55"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. Action Class&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Method to get Student Name based on the Search criteria&lt;br /&gt; * It is used for the Student Name Quick search functionality i.e. to show available names during typing&lt;br /&gt; * &lt;br /&gt; * @return String&lt;br /&gt; * @throws Exception&lt;br /&gt; */&lt;br /&gt;public String findStudentNames() throws Exception{&lt;br /&gt;&lt;br /&gt;response.setContentType("text");&lt;br /&gt;response.setHeader("Cache-Control", "no-cache");&lt;br /&gt;// "searchQuery" is constructed by jquery-autocomplete.js - makeUrl()&lt;br /&gt;// Should be verify in makeUrl(); what is used for the parameter&lt;br /&gt;studentNameWildCard = request.getParameter("searchQuery");&lt;br /&gt;&lt;br /&gt;// There is nothing supplied for RoleName&lt;br /&gt;if (studentNameWildCard == null) {&lt;br /&gt;response.getWriter().write("");&lt;br /&gt;return null;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//Get the data from DB Based on the wild card chars&lt;br /&gt;&lt;br /&gt;StringBuilder studentNameIds = new StringBuilder();&lt;br /&gt;&lt;br /&gt;// Going to construct (ROLENAME~ID) like "|ABC~123|BCD~234|CDE~345|"&lt;br /&gt;String[] staticNames = new String[ABC~123|BCD~234|CDE~345|]&lt;br /&gt;// Put pipeline (|) as a line separator&lt;br /&gt;studentNameIds.append("|");&lt;br /&gt;studentNameIds.append("Ram");&lt;br /&gt;// Put tild (~) as a cell separator&lt;br /&gt;studentNameIds.append("~");&lt;br /&gt;studentNameIds.append(1);&lt;br /&gt;studentNameIds.append("|");&lt;br /&gt;studentNameIds.append("Shiv");&lt;br /&gt;// Put tild (~) as a cell separator&lt;br /&gt;studentNameIds.append("~");&lt;br /&gt;studentNameIds.append(2);&lt;br /&gt;&lt;br /&gt;response.getWriter().write(studentNameIds.toString());&lt;br /&gt;return null;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-3014713645520678643?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/3014713645520678643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2010/02/jquery-autocomplte-field-sample-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3014713645520678643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3014713645520678643'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2010/02/jquery-autocomplte-field-sample-code.html' title='jQuery Autocomplete Field Sample Code (Using Plugins)'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-5557494296599572665</id><published>2010-01-20T01:01:00.000-08:00</published><updated>2010-01-20T02:34:52.181-08:00</updated><title type='text'>How to pass jsp:param in jsp:include and access from struts 2 tag</title><content type='html'>1. Include a jsp file in the first page by passing the parameters like "text" as follows:&lt;br /&gt;&lt;br /&gt;first.jspx:&lt;br /&gt;..&lt;br /&gt;..&lt;br /&gt;&amp;lt;jsp:include page="/WEB-INF/jsp/middle.jspx"&amp;gt;&lt;br /&gt;  &amp;lt;jsp:param name="text" value="Good Morning!!!" /&amp;gt;&lt;br /&gt;&amp;lt;/jsp:include&amp;gt;&lt;br /&gt;..&lt;br /&gt;..&lt;br /&gt;&lt;br /&gt;2. middle.jspx&lt;br /&gt;..&lt;br /&gt;..&lt;br /&gt;&amp;lt;jsp:include page="/WEB-INF/jsp/last.jspx"&amp;gt;&lt;br /&gt;  &amp;lt;jsp:param name="text" value="${param.text}" /&amp;gt;&lt;br /&gt;&amp;lt;/jsp:include&amp;gt;&lt;br /&gt;..&lt;br /&gt;..&lt;br /&gt;&lt;br /&gt;3. last.jspx&lt;br /&gt;&lt;br /&gt;..&lt;br /&gt;..&lt;br /&gt;&amp;lt;c:set var="text" value="${param.text}"/&amp;gt;&lt;br /&gt;&lt;br /&gt;Your Passed Text is == &amp;lt;s:property value="%{#attr.text}"/&amp;gt;&lt;br /&gt;..&lt;br /&gt;..&lt;br /&gt;&lt;br /&gt;Note:Unfortunately you can't use JSTL in Struts 2 tags anymore.  The above solution is a work around by using JSTL to set the parameter into page scope.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-5557494296599572665?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/5557494296599572665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2010/01/how-to-pass-jspparameter-in-struts-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/5557494296599572665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/5557494296599572665'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2010/01/how-to-pass-jspparameter-in-struts-2.html' title='How to pass jsp:param in jsp:include and access from struts 2 tag'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-917073583274413533</id><published>2010-01-14T01:06:00.000-08:00</published><updated>2010-01-14T01:36:22.330-08:00</updated><title type='text'>How to handle Clob type in iBatis</title><content type='html'>&lt;strong&gt;1. Create a type handler:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;package com.demo.sqlmap.typehandler;&lt;br /&gt;&lt;br /&gt;import java.io.File;&lt;br /&gt;import java.io.FileInputStream;&lt;br /&gt;import java.io.FileOutputStream;&lt;br /&gt;import java.io.InputStream;&lt;br /&gt;import java.sql.Blob;&lt;br /&gt;import java.sql.SQLException;&lt;br /&gt;import java.text.DateFormat;&lt;br /&gt;import java.util.Date;&lt;br /&gt;&lt;br /&gt;import com.demo.domain.BlobBean;&lt;br /&gt;import com.ibatis.sqlmap.client.extensions.ParameterSetter;&lt;br /&gt;import com.ibatis.sqlmap.client.extensions.ResultGetter;&lt;br /&gt;import com.ibatis.sqlmap.client.extensions.TypeHandlerCallback;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class BlobTypeHandlerCallback implements TypeHandlerCallback {&lt;br /&gt;&lt;br /&gt;private static final int BUFFER_SIZE = 3000;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * @throws&lt;br /&gt; * @see com.ibatis.sqlmap.client.extensions.TypeHandlerCallback#getResult(com.ibatis.sqlmap.client.extensions.ResultGetter)&lt;br /&gt; */&lt;br /&gt; public Object getResult(ResultGetter getter) throws SQLException {&lt;br /&gt;  Blob blob = null;&lt;br /&gt;  String fileName = null;&lt;br /&gt;  InputStream inStream = null;&lt;br /&gt;  FileOutputStream outStream = null;&lt;br /&gt;  try {&lt;br /&gt;   blob = getter.getBlob();&lt;br /&gt;   File blobFile= File.createTempFile("mytmp", ".tmp", getTmpFileDirectory());&lt;br /&gt;   outStream = new FileOutputStream(blobFile);&lt;br /&gt;   inStream = blob.getBinaryStream();&lt;br /&gt;&lt;br /&gt;   int length = -1;&lt;br /&gt;   byte[] buffer = new byte[BUFFER_SIZE];&lt;br /&gt;&lt;br /&gt;   // Write to file&lt;br /&gt;   while ((length = inStream.read(buffer)) != -1) {&lt;br /&gt;    outStream.write(buffer, 0, length);&lt;br /&gt;    outStream.flush();&lt;br /&gt;   }&lt;br /&gt;   if (inStream != null)&lt;br /&gt;    inStream.close();&lt;br /&gt;   if (outStream != null)&lt;br /&gt;    outStream.close();&lt;br /&gt;&lt;br /&gt;   return new BlobBean(new FileInputStream(blobFile));&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  catch (Exception ex) {&lt;br /&gt;   throw new SQLException("Unable to export to file: " + fileName);&lt;br /&gt;  } finally {&lt;br /&gt;   inStream = null;&lt;br /&gt;   outStream = null;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @see com.ibatis.sqlmap.client.extensions.TypeHandlerCallback#setParameter(com.ibatis.sqlmap.client.extensions.ParameterSetter,&lt;br /&gt;  *      java.lang.Object)&lt;br /&gt;  */&lt;br /&gt; public void setParameter(ParameterSetter setter, Object parameter) throws SQLException {&lt;br /&gt;  try {&lt;br /&gt;   if (parameter != null &amp;&amp; parameter instanceof ChobBlob) {&lt;br /&gt;    InputStream is = ((BlobBean) parameter).getInputStream();&lt;br /&gt;    File file = ((BlobBean) parameter).getUploadedFile();&lt;br /&gt;    if (is != null)&lt;br /&gt;     setter.setBinaryStream(is, (int) file.length());&lt;br /&gt;   }&lt;br /&gt;  } catch (Exception ex) {&lt;br /&gt;   ex.printStackTrace();&lt;br /&gt;   throw new SQLException("Error in passing the inputstream " + ex.getMessage());&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @see com.ibatis.sqlmap.client.extensions.TypeHandlerCallback#valueOf(java.lang.String)&lt;br /&gt;  */&lt;br /&gt; public Object valueOf(String s) {&lt;br /&gt;  return s;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * Generate a random FileName&lt;br /&gt;  */&lt;br /&gt; public static synchronized final String constructFileName() {&lt;br /&gt;  Date date = new Date();&lt;br /&gt;  return "BLOB_T" + date.getTime() + "T-"+DateFormat.getTimeInstance().format(date).replace(":", "-")&lt;br /&gt;          + Math.random();&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * Method to get tmp file Directory.&lt;br /&gt;  *&lt;br /&gt;  * @return&lt;br /&gt;  */&lt;br /&gt; protected File getTmpFileDirectory() {&lt;br /&gt;  String tempDir = System.getProperty("java.io.tmpdir");&lt;br /&gt;  File fileUploadDir = new File(tempDir + File.separator + "fileupload");&lt;br /&gt;  if (!fileUploadDir.exists())&lt;br /&gt;   fileUploadDir.mkdirs();&lt;br /&gt;  return fileUploadDir;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Create a Blob Class to hold the binary data:&lt;/strong&gt;&lt;br /&gt;package com.demo.domain;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.io.File;&lt;br /&gt;import java.io.FileInputStream;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.InputStream;&lt;br /&gt;&lt;br /&gt;public class BlobBean{&lt;br /&gt;&lt;br /&gt; /** Reference to the underlying Input stream. */&lt;br /&gt; private InputStream inputStream;&lt;br /&gt;&lt;br /&gt; /** Reference to the file */&lt;br /&gt; private File uploadedFile;&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @return the uploadedFile&lt;br /&gt;  */&lt;br /&gt; public File getUploadedFile() {&lt;br /&gt;  return uploadedFile;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @param uploadedFile&lt;br /&gt;  *            the uploadedFile to set&lt;br /&gt;  */&lt;br /&gt; public void setUploadedFile(File uploadedFile) {&lt;br /&gt;  this.uploadedFile = uploadedFile;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /** No Args Constructor. */&lt;br /&gt; public BlobBean() {&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * Constructor.&lt;br /&gt;  * &lt;br /&gt;  * @param inputStream&lt;br /&gt;  */&lt;br /&gt; public BlobBean(InputStream inputStream) {&lt;br /&gt;  this.inputStream = inputStream;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * Constructor. Initialize inputStream instance variable from the given&lt;br /&gt;  * Path.&lt;br /&gt;  * &lt;br /&gt;  * @param inputStream&lt;br /&gt;  */&lt;br /&gt; public BlobBean(String path) throws IOException {&lt;br /&gt;  File f = new File(path);&lt;br /&gt;  initalize(f);&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * Constructor. Initialize inputStream instance variable from the given&lt;br /&gt;  * Path.&lt;br /&gt;  * &lt;br /&gt;  * @param inputStream&lt;br /&gt;  */&lt;br /&gt; public BlobBean(File file) throws IOException {&lt;br /&gt;  initalize(file);&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * Initlalize file to contents&lt;br /&gt;  * &lt;br /&gt;  * @param f&lt;br /&gt;  * @throws IOException&lt;br /&gt;  */&lt;br /&gt; private void initalize(File f) throws IOException {&lt;br /&gt;  this.uploadedFile = f;&lt;br /&gt;  InputStream is = null;&lt;br /&gt;  is = new FileInputStream(f);&lt;br /&gt;  this.inputStream = is;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @return the inputStream&lt;br /&gt;  */&lt;br /&gt; public final InputStream getInputStream() {&lt;br /&gt;  return inputStream;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @param inputStream&lt;br /&gt;  *            the inputStream to set&lt;br /&gt;  */&lt;br /&gt; public final void setInputStream(final InputStream inputStream) {&lt;br /&gt;  this.inputStream = inputStream;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Create a Bean to hold the binary data:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;package com.demo.domain;&lt;br /&gt;&lt;br /&gt;import java.util.Date;&lt;br /&gt;&lt;br /&gt;import com.demo.domain.BlobBean;&lt;br /&gt;&lt;br /&gt;public class FileUpload {&lt;br /&gt;&lt;br /&gt; private Long id = ApprovableExtendedBusinessObject.UNSAVED_VALUE;&lt;br /&gt;&lt;br /&gt; private BlobBean binaryData;&lt;br /&gt;&lt;br /&gt; private Date fileUploadDate;&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;     * @return the fileUploadDate&lt;br /&gt;     */&lt;br /&gt;    public Date getFileUploadDate() {&lt;br /&gt;     return fileUploadDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;    /**&lt;br /&gt;     * @param fileUploadDate the fileUploadDate to set&lt;br /&gt;     */&lt;br /&gt;    public void setFileUploadDate(Date fileUploadDate) {&lt;br /&gt;     this.fileUploadDate = fileUploadDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @return the id&lt;br /&gt;  */&lt;br /&gt; public Long getId() {&lt;br /&gt;  return id;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @param id&lt;br /&gt;  *            the id to set&lt;br /&gt;  */&lt;br /&gt; public void setId(Long id) {&lt;br /&gt;  this.id = id;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @return the binaryData&lt;br /&gt;  */&lt;br /&gt; public BlobBean getBinaryData() {&lt;br /&gt;  return binaryData;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @param binaryData&lt;br /&gt;  *            the binaryData to set&lt;br /&gt;  */&lt;br /&gt; public void setBinaryData(BlobBean binaryData) {&lt;br /&gt;  this.binaryData = binaryData;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. Create a DAO implementation class to deal with database&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;package com.demo.fileupload.dao.impl;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;&lt;br /&gt;&lt;br /&gt;import com.demo.domain.FileUpload;&lt;br /&gt;import com.demo.fileupload.dao.FileUploadDao;&lt;br /&gt;&lt;br /&gt;// Note FileUploadDao must be defined with the necessary methods&lt;br /&gt;&lt;br /&gt;public class FileUploadDaoImpl extends SqlMapClientDaoSupport implements FileUploadDao {&lt;br /&gt;&lt;br /&gt; public FileUpload download(Long id) throws PersistenceLayerException {&lt;br /&gt;  FileUpload fileUpload = (FileUpload) getSqlMapClientTemplate().queryForObject(&lt;br /&gt;          "commons.fileupload.download", id.longValue());&lt;br /&gt;  return fileUpload;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public Long upload(FileUpload fileUpload) throws PersistenceLayerException {&lt;br /&gt;  getSqlMapClientTemplate().insert("commons.fileupload.upload", fileUpload);&lt;br /&gt;  return fileUpload.getId();&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5. Create a SQL-MAP file&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"&lt;br /&gt;    "http://ibatis.apache.org/dtd/sql-map-2.dtd"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;sqlMap namespace="commons.fileupload"&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;typeAlias alias="blobTypeHandlerCallback" type="com.demo.sqlmap.typehandler.BlobTypeHandlerCallback"/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;resultMap class="com.demo.domain.FileUpload" id="FileUploadMap"&amp;gt;&lt;br /&gt;  &amp;lt;result property="id" column="ID"/&amp;gt;&lt;br /&gt;  &amp;lt;result property="binaryData" column="FILECONTENT"&lt;br /&gt;    typeHandler="blobTypeHandlerCallback"/&amp;gt;&lt;br /&gt;  &amp;lt;result property="fileUploadDate" column="FILEUPLOADDATE"/&amp;gt;&lt;br /&gt; &amp;lt;/resultMap&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;insert id="upload" parameterClass="com.demo.domain.FileUpload"&amp;gt;&lt;br /&gt;  &amp;lt;![CDATA[&lt;br /&gt;   insert into FILEUPLOAD (ID, FILECONTENT, FILEUPLOADDATE)&lt;br /&gt;   values(#id#, #binaryData,handler=blobTypeHandlerCallback#,sysdate)&lt;br /&gt;  ]]&amp;gt;&lt;br /&gt; &amp;lt;/insert&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;select id="download" resultMap="FileUploadMap"&amp;gt;&lt;br /&gt;   &amp;lt;![CDATA[&lt;br /&gt;    select ID, FILECONTENT, FILEUPLOADDATE&lt;br /&gt;    from FILEUPLOAD&lt;br /&gt;    where ID = #id#&lt;br /&gt;   ]]&amp;gt;&lt;br /&gt; &amp;lt;/select&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/sqlMap&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;6. Table Structure&lt;/strong&gt;&lt;br /&gt;Column Name   ID     Pk   Null?  Data Type    &lt;br /&gt;&lt;br /&gt;ID            1      1    N      NUMBER (19)  &lt;br /&gt;FILECONTENT   2           Y      BLOB         &lt;br /&gt;FILEUPLOADDATE3           Y      TIMESTAMP(6)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-917073583274413533?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/917073583274413533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2010/01/how-to-handle-clob-type-in-ibatis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/917073583274413533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/917073583274413533'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2010/01/how-to-handle-clob-type-in-ibatis.html' title='How to handle Clob type in iBatis'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-3301784579497219481</id><published>2009-12-15T02:37:00.000-08:00</published><updated>2009-12-15T05:01:07.632-08:00</updated><title type='text'>How to configure Global/Default Interceptor in Struts 2</title><content type='html'>Global/Default interceptor means to me like the interceptor would be applied to the entire action classes may span accross mutiple packages.&lt;br /&gt;&lt;br /&gt;Step 1: Create an interceptor &lt;br /&gt;Step 2: Register the interceptor in interceptors tag.&lt;br /&gt;Step 3: Create an interceptor stack having all the necessary references to the interceptors&lt;br /&gt;Step 4: If there are multiple packages are involved then put the interceptor in the common package and &lt;br /&gt;all other packages would extend it.&lt;br /&gt;&lt;br /&gt;For Example:&lt;br /&gt;&lt;br /&gt;&amp;lt;struts&amp;gt;&lt;br /&gt;&amp;lt;package name="base-package" extends="struts-default"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;interceptors&amp;gt;&lt;br /&gt;  &amp;lt;!-- interceptor used to initialize resource used through out the application--&amp;gt;&lt;br /&gt;  &amp;lt;interceptor name="ResourceInit" class="com.test.ResourceInitInterceptor"/&amp;gt;&lt;br /&gt;   &lt;br /&gt;   &amp;lt;!-- interceptor stack composes struts provided interceptors and custody related--&amp;gt;&lt;br /&gt;  &amp;lt;interceptor-stack name="base-default-stack"&amp;gt; &lt;br /&gt;   &amp;lt;interceptor-ref name="ResourceInit"/&amp;gt;&lt;br /&gt;   &amp;lt;!-- "defaultStack" defined in struts in struts-default.xml--&amp;gt;&lt;br /&gt;   &amp;lt;interceptor-ref name="defaultStack"/&amp;gt;&lt;br /&gt;  &amp;lt;/interceptor-stack&amp;gt;&lt;br /&gt;   &lt;br /&gt; &amp;lt;/interceptors&amp;gt;&lt;br /&gt;  &lt;br /&gt; &amp;lt;!-- Default interceptor executed for the entire actions --&amp;gt;&lt;br /&gt; &amp;lt;default-interceptor-ref name="base-default-stack"/&amp;gt; &lt;br /&gt;&amp;lt;/package&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;include file="/com/struts_config/struts_module_1.xml" /&amp;gt;&lt;br /&gt;&amp;lt;include file="/com/struts_config/struts_module_2.xml" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/struts&amp;gt;&lt;br /&gt;&lt;br /&gt;Note: struts_module_1 and struts_module_2 must extends "base-package"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-3301784579497219481?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/3301784579497219481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/12/how-to-configure-globaldefault.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3301784579497219481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3301784579497219481'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/12/how-to-configure-globaldefault.html' title='How to configure Global/Default Interceptor in Struts 2'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-6933793738801700921</id><published>2009-12-13T20:47:00.000-08:00</published><updated>2009-12-26T04:51:51.579-08:00</updated><title type='text'>XA-DataSource and Non-XA Datasource in Global Transaction</title><content type='html'>Datasource - XA datasource is a data source that can participate in an XA global transaction.&lt;br /&gt;&lt;br /&gt;Non-XA Datasource - Non-XA datasource generally can't participate in a global transaction.&lt;br /&gt;&lt;br /&gt;An XA transaction, in the most general terms, is a "global transaction" that may span multiple resources. A non-XA transaction always involves just one resource. &lt;br /&gt;&lt;br /&gt;An XA transaction involves a coordinating transaction manager, with one or more databases (or other resources, like JMS) all involved in a single global transaction. Non-XA transactions have no transaction coordinator, and a single resource is doing all its transaction work itself (this is sometimes called local transactions). &lt;br /&gt;&lt;br /&gt;When the implementation code surrounded/enclosed by the global (XA) transaction then the entire code must be treated as unit irrespective of number of datasource(s) are involved in the unit. Therefore when you say "commit", the results are committed across all of the resources and when you say "rollback", _everything_ is rolled back across all resources (XA-Enabled Datasource). &lt;br /&gt;&lt;br /&gt;If there are non-xa enabled datasource surrounded by global transaction (XA transaction) then it does not participate in the transaction therefore operation associated to the non-xa datasource has to be committed or rollback manually. As &lt;br /&gt;J2EE Specification says that transaction can not be nested here there must not be opened separate transaction for non-xa datasource inside the global transaction. Non-XA datasource is a local datasource which can be commit/rollback without using any transaction boundary for it.&lt;br /&gt;&lt;br /&gt;How to configure Global Transaction using Spring AOP:&lt;br /&gt;&lt;br /&gt;Add the following configuration in the applicationContext.xml file:&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt; xmlns:aop="http://www.springframework.org/schema/aop"&lt;br /&gt; xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt; xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&lt;br /&gt; http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd&lt;br /&gt; http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;bean id="txManager"  &lt;br /&gt; class="org.springframework.transaction.jta.JtaTransactionManager"&amp;gt;&lt;br /&gt;  &amp;lt;property name="transactionManagerName"  value="javax.transaction.TransactionManager" /&amp;gt;&lt;br /&gt; &amp;lt;/bean&amp;gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &amp;lt;!-- the transactional advice --&amp;gt;&lt;br /&gt; &amp;lt;tx:advice id="defaultTxAdvice" transaction-manager="txManager"&amp;gt;&lt;br /&gt; &amp;lt;!--the transactional semantics...--&amp;gt;&lt;br /&gt;  &amp;lt;tx:attributes&amp;gt;&lt;br /&gt;  &amp;lt;!-- all methods starting with 'get' are read-only --&amp;gt;&lt;br /&gt;   &amp;lt;tx:method name="get*" read-only="true"  /&amp;gt;&lt;br /&gt;   &amp;lt;!-- other methods use the default transaction settings --&amp;gt;&lt;br /&gt;   &amp;lt;tx:method name="*" rollback-for="List Checked Business Exception separated by comma" /&amp;gt;&lt;br /&gt;  &amp;lt;/tx:attributes&amp;gt;&lt;br /&gt; &amp;lt;/tx:advice&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;aop:config&amp;gt;&lt;br /&gt; &amp;lt;aop:pointcut id="com.test.operations"&lt;br /&gt;        expression="execution(* com.test.service.ServiceImpl.*(..))" /&amp;gt;&lt;br /&gt;        &amp;lt;aop:advisor advice-ref="defaultTxAdvice" pointcut-ref="com.test.operations" /&amp;gt;&lt;br /&gt;&amp;lt;/aop:config&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;br /&gt;Note: If applicaton server Transaction manager specific selected then just change JtaTransactionManager to their respective classes for example for weblogic it's "org.springframework.transaction.jta.WeblogicJtaTransactionManager"&lt;br /&gt;&lt;br /&gt;Special configuration for JTA having more that 30 Seconds timeout:&lt;br /&gt;i. Set Timeout to 180 seconds (if plans ) during DataSource Configuration&lt;br /&gt;ii. Goto JTA &gt; Set 180 seconds timeout and restart the app server to be effective.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-6933793738801700921?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/6933793738801700921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/12/xa-datasource-and-non-xa-datasource-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/6933793738801700921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/6933793738801700921'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/12/xa-datasource-and-non-xa-datasource-in.html' title='XA-DataSource and Non-XA Datasource in Global Transaction'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-4235578017999603119</id><published>2009-09-25T23:29:00.000-07:00</published><updated>2009-09-28T02:59:14.371-07:00</updated><title type='text'>Notes About Inner Class - Core Java</title><content type='html'>1. Innerclass nested with other class i.e. enclosing class. They are four types:&lt;br /&gt;i.   Static &lt;br /&gt;ii.  Member class&lt;br /&gt;iii. Local class&lt;br /&gt;iv.  Anonymous Class&lt;br /&gt;&lt;br /&gt;N.B - Inner class is a member of enclosing class like method or field.&lt;br /&gt;&lt;br /&gt;2. Static Member Class/Interface:&lt;br /&gt;i. Static class is a static member of class like static method/field.&lt;br /&gt;ii. Interfaces can be defined as static member class.&lt;br /&gt;iii. A static member class is not associated with any instance of the containing class (i.e., there is no this object).&lt;br /&gt;iv. A static member class has access to all static members of its containing class, including private members. The reverse is true as well: the methods of the containing class have access to all members of a static member class, including the private members. A static member class even has access to all the members of any other static member classes, including the private members of those classes. &lt;br /&gt;v. A static member class cannot have the same name as any of its enclosing classes. In addition, static member classes and interfaces can be defined only within top-level classes and other static member classes and interfaces.&lt;br /&gt;&lt;br /&gt;5. Member Class&lt;br /&gt;&lt;br /&gt;i.Member class is a member (instance) of the enclosing class and has access to any and all methods or variables of enclosing one and even the parent's this reference.&lt;br /&gt;ii. A member class cannot have the same name as any containing class or package.&lt;br /&gt;iii. Member classes cannot contain any static fields, methods, or classes (with the exception of constant fields declared both static and final). The reason of it as  static fields, methods, and classes are top-level constructs not associated with any particular object, while every member class is associated with an instance of its enclosing class. Defining a static top-level member within a non-top-level member &lt;br /&gt;class simply promotes confusion and bad programming style, so you are required to define all static members within a top-level or static member class or interface.&lt;br /&gt;iv. Interfaces cannot be defined as member classes. An interface cannot be instantiated, so there is no object to associate with an instance of the enclosing class. If you declare an interface as a member of a class, the interface is implicitly static, making it a static member class. &lt;br /&gt;v. To access the this reference of the containing class use classname.this&lt;br /&gt;&lt;br /&gt;6. Local classes are declared within a block of code and are visible only within that block, just as any other method variable.&lt;br /&gt;&lt;br /&gt;7. An anonymous class is a local class that has no name.&lt;br /&gt;&lt;br /&gt;8. Advantages of inner classes can be an object-oriented advantage, an organizational advantage, and a call-back advantage.&lt;br /&gt;&lt;br /&gt;i. Lets prove the above three advantages:&lt;br /&gt;&lt;br /&gt;Object-Oriented&lt;br /&gt;---------------&lt;br /&gt;Let's look at the member class. Since its instance is a member of its parent instance, it has access to every member and method in the parent. At first glance, this might not seem like much; we already have that sort of access from within a method in the parent class. However, the member class allows us to take logic out of the parent and objectify it. &lt;br /&gt;&lt;br /&gt;Organizational&lt;br /&gt;--------------&lt;br /&gt;&lt;br /&gt;Inner classes allow us to further organize our package structure through the use of namespaces. Instead of dumping everything in a flat package, classes can be further nested within classes. Explicitly, without inner classes, we were limited to the following hierarchy structure&lt;br /&gt;&lt;br /&gt;Callback&lt;br /&gt;--------&lt;br /&gt;&lt;br /&gt;Inner member classes and anonymous classes both provide a convenient method for defining callbacks. The most obvious example relates to GUI code. &lt;br /&gt;&lt;br /&gt;As with anything else, you have to take the good with the bad. Inner classes have their disadvantages. From a maintenance point of view, inexperienced Java developers may find the inner class difficult to understand. The use of inner classes will also increase the total number of classes in your code. Moreover, from a development point of view, most Java tools come up a bit short on their support of inner classes.&lt;br /&gt;&lt;br /&gt;Ref: http://docstore.mik.ua/orelly/java-ent/jnut/ch03_10.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-4235578017999603119?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/4235578017999603119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/09/notes-about-inner-class-core-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/4235578017999603119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/4235578017999603119'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/09/notes-about-inner-class-core-java.html' title='Notes About Inner Class - Core Java'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-571984810137687923</id><published>2009-09-25T19:17:00.000-07:00</published><updated>2009-09-28T03:00:59.730-07:00</updated><title type='text'>Notes about Inheritance - CoreJava</title><content type='html'>1. All the classes implecitly extends from Object class as it defines and implements common behaviour to the all classes. &lt;br /&gt;2. You can declare a field in the subclass with the same name as the one in the superclass, thus hiding it (not recommended). &lt;br /&gt;3. You can write a new instance method in the subclass that has the same signature as the one in the superclass, thus overriding it. &lt;br /&gt;4. You can write a new static method in the subclass that has the same signature as the one in the superclass, thus hiding it. &lt;br /&gt;5. You can write a subclass constructor that invokes the constructor of the superclass, either implicitly or by using the keyword super. Remember Constructors are not inheritable.&lt;br /&gt;6. private member is accesible from the subclass indirectly. i.e. superclass is having public/protected method which access the private variables in generally its setter/getter method.&lt;br /&gt;7. Remember a nested class has access to private members i.e. field/method of its enclosing class. Seems to be violated the encapsulation principles. Therefore, a public or protected nested class inherited by a subclass has indirect access to all of the private members of the superclass. &lt;br /&gt;8. Do the casting after checking with instanceof operator.&lt;br /&gt;&lt;br /&gt;9. Method overriding (hiding)&lt;br /&gt;&lt;br /&gt;The overriding method has the same name, number and type of parameters, and return type as the method it overrides. An overriding method can also return a subtype of the type returned by the overridden method. This is called a covariant return type. Remember the access specifier has to be same or widen/higher scope not lesser if so compile time error.&lt;br /&gt;&lt;br /&gt;It is recommended that use @override, as it instructs the compiler that you intend to override a method in the superclass. If, for some reason, the compiler detects that the method does not exist in one of the superclasses, it will generate an error.&lt;br /&gt;&lt;br /&gt;Another point to remember that the distinction between hiding (static) and overriding (instance) has important implications. The version of the overridden method that gets invoked is the one in the subclass. The version of the hidden method that gets invoked depends on whether it is invoked from the superclass or the subclass.&lt;br /&gt;&lt;br /&gt;************************Summary*********************************&lt;br /&gt;------------------------| Super Instance Method  -----| Super Static Method  &lt;br /&gt;------------------------|-----------------------------|-----------------------------&lt;br /&gt;Sub Instance Method ----| Overrides ------------------| compile-time error  &lt;br /&gt;------------------------|-----------------------------|-----------------------------&lt;br /&gt;Subclass Static Method -| compile-time error ---------|  Hides  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Remember Static method calls on type whereas instance method calls on instance.&lt;br /&gt;&lt;br /&gt;10. Java does not support (i.e. intensinally eliminated to make simple) multiple inheritance implementation (i.e. class). There is a well known problem in multiple inheritance i.e. diamond problem. like consider the following example&lt;br /&gt;&lt;br /&gt;Animal class is having method called talk().&lt;br /&gt;&lt;br /&gt;Two classes i.e. Frog and Dinosaur each extends (error in java) Animal and implements talk().&lt;br /&gt;&lt;br /&gt;Another class Frogosaur extends both Dinosaur and Frog and trying to call talk on type Animal. Here is the problem like ambiguity arises.&lt;br /&gt;&lt;br /&gt;11. Interfaces give you more polymorphism than singly inherited families of classes, because with interfaces you don't have to make everything fit into one family of classes&lt;br /&gt;&lt;br /&gt;12. Advantage of composition over inheritance (composition is quite better one to go with if it fits for the requirement)&lt;br /&gt;&lt;br /&gt;i. It's easier to change classes involved in a composition relationship than it is to change classes involved in an inheritance relationship&lt;br /&gt;ii. Composition allows you to delay the creation of back-end objects until (and unless) they're needed. It also allows you to change the back-end objects dynamically throughout the lifetime of the front-end object. With inheritance, you get the image of the superclass in your subclass object image as soon as the subclass is created, and it remains part of the subclass object throughout the lifetime of the subclass. &lt;br /&gt;iii. It's easier to add new subclasses (inheritance) than it is to add new front-end classes (composition), because inheritance comes with polymorphism. If you have a bit of code that relies only on a superclass interface, that code can work with a new subclass without change. This isn't true of composition, unless you use composition with interfaces.&lt;br /&gt;&lt;br /&gt;13. Remember that inheritance refers to "is-a" relationship (permanent) therefore easy to understand. Whereas Composition refers to "has-a" relationship and gives more flexibility.&lt;br /&gt;&lt;br /&gt;14. Interface provides great extend for polymerphism&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-571984810137687923?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/571984810137687923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/09/notes-about-inheritance-corejava.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/571984810137687923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/571984810137687923'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/09/notes-about-inheritance-corejava.html' title='Notes about Inheritance - CoreJava'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-1654333551504094140</id><published>2009-06-12T21:54:00.000-07:00</published><updated>2009-06-12T21:59:10.761-07:00</updated><title type='text'>Useful Conference - Hava a look.</title><content type='html'>&lt;a href="http://www.infoq.com/presentations/SpringOne-Keynote-Rod-Johnson"&gt;The Future of Java Innovation -  http://www.infoq.com/presentations/SpringOne-Keynote-Rod-Johnson&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-1654333551504094140?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/1654333551504094140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/06/useful-conference-hava-look.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/1654333551504094140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/1654333551504094140'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/06/useful-conference-hava-look.html' title='Useful Conference - Hava a look.'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-1496409060934666587</id><published>2009-06-12T21:02:00.000-07:00</published><updated>2009-06-16T19:51:10.785-07:00</updated><title type='text'>SCRUM - Agile Framework - Pointers / Collections - In Progress</title><content type='html'>&lt;div&gt;The Scrum Development Process - &lt;a href="http://www.mountaingoatsoftware.com/scrum"&gt;http://www.mountaingoatsoftware.com/scrum&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Popular Blog - &lt;a href="http://blog.mountaingoatsoftware.com/"&gt;http://blog.mountaingoatsoftware.com/&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Scrum Alliance - &lt;a href="http://www.scrumalliance.org/pages/what_is_scrum"&gt;http://www.scrumalliance.org/pages/what_is_scrum&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The Essence of Scrum - &lt;a href="http://agilethinking.net/essence-of-scrum"&gt;http://agilethinking.net/essence-of-scrum&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Planning and Tracking on Agile Projects - &lt;a href="http://www.mountaingoatsoftware.com/presentations/51"&gt;http://www.mountaingoatsoftware.com/presentations/51&lt;/a&gt;&lt;/div&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/4034650153155250265-1496409060934666587?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/1496409060934666587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/06/scrum-agile-framework-pointers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/1496409060934666587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/1496409060934666587'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/06/scrum-agile-framework-pointers.html' title='SCRUM - Agile Framework - Pointers / Collections - In Progress'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-3693976409893064497</id><published>2009-06-11T22:33:00.000-07:00</published><updated>2009-06-11T23:02:22.177-07:00</updated><title type='text'>HTTP 1.0 VS HTTP 1.1 - Pointers</title><content type='html'>Easy to understand - &lt;a href="http://www.jmarshall.com/easy/http/"&gt;http://www.jmarshall.com/easy/http/&lt;/a&gt;&lt;br /&gt;Research Paper - &lt;a href="http://www.research.att.com/~bala/papers/h0vh1.html"&gt;http://www.research.att.com/~bala/papers/h0vh1.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-3693976409893064497?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/3693976409893064497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/06/http-10-vs-http-11-pointers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3693976409893064497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3693976409893064497'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/06/http-10-vs-http-11-pointers.html' title='HTTP 1.0 VS HTTP 1.1 - Pointers'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-3107666440277452370</id><published>2009-06-10T08:08:00.000-07:00</published><updated>2009-06-16T19:51:09.250-07:00</updated><title type='text'>Java Performance Tunning - Compiled</title><content type='html'>&lt;strong&gt;&lt;span style="color:#000099;"&gt;&lt;hr /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#000099;"&gt;Core Java:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. &lt;span style="color:#000099;"&gt;&lt;strong&gt;StringBuilder&lt;/strong&gt;&lt;/span&gt; is better than &lt;span style="color:#000099;"&gt;&lt;strong&gt;StringBuffer&lt;/strong&gt;&lt;/span&gt;, though both are usually better than using string concatenation to build strings (when performing extensive String manipulation, replacing &lt;strong&gt;&lt;span style="font-size:130%;color:#ff0000;"&gt;+&lt;/span&gt;&lt;/strong&gt; with &lt;span style="color:#000099;"&gt;&lt;strong&gt;StringBuilder.append&lt;/strong&gt;&lt;/span&gt; is likely recommended)&lt;br /&gt;&lt;br /&gt;2. Declare method arguments &lt;strong&gt;&lt;span style="color:#000099;"&gt;final&lt;/span&gt;&lt;/strong&gt; if they are not modified in the method. In general declare all variables final if they are not modified after being initialized or set to some value.&lt;br /&gt;&lt;br /&gt;3. Declare methods &lt;strong&gt;&lt;span style="color:#000099;"&gt;private and/or final&lt;/span&gt;&lt;/strong&gt; whenever that makes sense.&lt;br /&gt;&lt;br /&gt;4. Use&lt;span style="color:#000099;"&gt;&lt;strong&gt; static final&lt;/strong&gt;&lt;/span&gt; when creating constants&lt;br /&gt;&lt;br /&gt;5. Use &lt;strong&gt;&lt;span style="color:#000099;"&gt;zero-length&lt;/span&gt;&lt;/strong&gt; arrays instead of &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;null&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;6. &lt;strong&gt;&lt;span style="color:#000099;"&gt;HashMap&lt;/span&gt;&lt;/strong&gt; has slightly better performance than &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;LinkedHashMap&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;7. &lt;strong&gt;&lt;span style="color:#000099;"&gt;HashSet&lt;/span&gt;&lt;/strong&gt; has slightly better performance than &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;LinkedHashSet&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;8. Replace &lt;strong&gt;&lt;span style="color:#ff0000;"&gt;strings&lt;/span&gt;&lt;/strong&gt; and other objects with &lt;span style="color:#000099;"&gt;&lt;strong&gt;integer&lt;/strong&gt;&lt;/span&gt; constants. Compare these integers by identity.&lt;br /&gt;&lt;br /&gt;9. Use &lt;strong&gt;&lt;span style="color:#000099;"&gt;primitive data types&lt;/span&gt;&lt;/strong&gt; instead of objects as &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;instance variables&lt;/strong&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;10. Overwrite &lt;strong&gt;&lt;span style="color:#000099;"&gt;compareTo() &lt;/span&gt;&lt;/strong&gt;method for object comparision rather &lt;span style="color:#ff0000;"&gt;&lt;strong&gt;comparing in the loop&lt;/strong&gt;&lt;/span&gt;. ( Implementing compareTo/hashCode&lt;br /&gt;&lt;a href="http://www.javapractices.com/topic/TopicAction.do?Id=10"&gt;http://www.javapractices.com/topic/TopicAction.do?Id=10&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.javapractices.com/topic/TopicAction.do?Id=28"&gt;http://www.javapractices.com/topic/TopicAction.do?Id=28&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;11. Logging the contents of a Collection is simple (JDK 1.5 onwards)&lt;br /&gt;&lt;br /&gt;Arrays.toString(myArray);&lt;br /&gt;Arrays.deepToString(myObjectArray); //recursive&lt;br /&gt;Arrays.asList(myArray).toString();&lt;br /&gt;&lt;br /&gt;12. To determine if two String objects match exactly, you should almost always use the &lt;strong&gt;&lt;span style="color:#000099;"&gt;equals&lt;/span&gt;&lt;/strong&gt; method, and not the &lt;strong&gt;&lt;span style="color:#ff0000;"&gt;==&lt;/span&gt;&lt;/strong&gt; operator&lt;br /&gt;&lt;br /&gt;13.Follow naming convention for distinguishing between local variables, arguments, and fields strictly. (Code review would be very productivity)&lt;br /&gt;&lt;br /&gt;14. Good example on ArrayList vs Linked List&lt;br /&gt;&lt;br /&gt;14.1 Appending elements to the end of a list has a fixed averaged cost for both ArrayList and LinkedList. For ArrayList, appending typically involves setting an internal array location to the element reference, but occasionally results in the array being reallocated. For LinkedList, the cost is uniform and involves allocating an internal Entry object.&lt;br /&gt;&lt;br /&gt;14.2 Inserting or deleting elements in the middle of an ArrayList implies that the rest of the list must be moved. Inserting or deleting elements in the middle of a LinkedList has fixed cost.&lt;br /&gt;&lt;br /&gt;14.3 A LinkedList does not support efficient random access&lt;br /&gt;&lt;br /&gt;14.4 An ArrayList has space overhead in the form of reserve capacity at the end of the list. A LinkedList has significant space overhead per element.&lt;br /&gt;&lt;br /&gt;14.5 Sometimes a Map structure is a better choice than a List.&lt;br /&gt;&lt;br /&gt;Get some more good stuff in the following URL: &lt;a href="http://java.sun.com/developer/JDCTechTips/2002/tt0910.html"&gt;http://java.sun.com/developer/JDCTechTips/2002/tt0910.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.pankaj-k.net/archives/2004/06/arraylist_versu.html"&gt;http://www.pankaj-k.net/archives/2004/06/arraylist_versu.html&lt;/a&gt; &lt;a href="http://www.informit.com/guides/content.aspx?g=java&amp;amp;seqNum=95"&gt;http://www.informit.com/guides/content.aspx?g=java&amp;amp;seqNum=95&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.javapractices.com/topic/TopicAction.do?Id=65"&gt;http://www.javapractices.com/topic/TopicAction.do?Id=65&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;b&gt;Database:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Stay away from the database as much as possible.&lt;br /&gt;&lt;br /&gt;2. Cache as much as feasible - an in-memory cache is better than an on-disk one, which in turn is better than a remote or a relational database.&lt;br /&gt;&lt;br /&gt;3. Caching coarse-grained objects is better than caching fine-grained ones.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Project Health:&lt;/b&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;1. Load testing can provide the basis for: Comparing varying architectural approaches; Performance tuning; Capacity planning. (TBS)&lt;br /&gt;&lt;br /&gt;2. Initially you should identify the probable performance and scalability based on the requirements. You should be asking about: numbers of users/components; component interactions; throughput and transaction rates; performance requirements. (TBS)&lt;br /&gt;&lt;br /&gt;3.Performance measurements should be from presentation start to presentation completion, i.e. user clicks button (start) and information is displayed (completion). (TBS)&lt;br /&gt;&lt;br /&gt;4. Select performance benchmarks and use them to quantify the scalability and determine performance targets and future performance improvements or degradations. Include all user types such as "information-gathering" visitors or "transaction" visitors in your benchmarks.&lt;br /&gt;&lt;br /&gt;5.  Technical Problem - Different Source For Tooling, Build Solution, RAD Solution, Framework Lib, Server and more important No One owns the whole productivity Experience if project is developed using many open source project / lib.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt;Java Web Tech:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Excessive use of custom tags may create unnecessary processing overhead.&lt;br /&gt;&lt;br /&gt;2. Use the include directive where possible, as this is a compile-time directive as it is faster than the include action&lt;br /&gt;&lt;br /&gt;3. Logging is more important than the performance saved by not logging.&lt;br /&gt;&lt;br /&gt;4. There is little performance penalty to using an MVC architecture.&lt;br /&gt;&lt;br /&gt;5. To ensure good performance use experienced J2EE builders and use proven design patterns.&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-3107666440277452370?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/3107666440277452370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/06/java-performance-tunning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3107666440277452370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3107666440277452370'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/06/java-performance-tunning.html' title='Java Performance Tunning - Compiled'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-1787281094051122482</id><published>2009-05-29T09:04:00.000-07:00</published><updated>2009-06-16T19:51:09.282-07:00</updated><title type='text'>New Features in Java 5.0 onwards version</title><content type='html'>&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;New Features in Java 7.0 - Part 1 - &lt;a href="http://www.javabeat.net/articles/120-new-features-in-java-70-part-1-2.html"&gt;http://www.javabeat.net/articles/120-new-features-in-java-70-part-1-2.html&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;li&gt;New Features in Java EE 6.0 - &lt;a href="http://www.javabeat.net/articles/99-new-features-in-java-ee-60-1.html"&gt;http://www.javabeat.net/articles/99-new-features-in-java-ee-60-1.html&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Introduction to Java Module System in Java 7.0 - &lt;a href="http://www.javabeat.net/articles/101-introduction-to-java-module-system-in-java-70-1.html"&gt;http://www.javabeat.net/articles/101-introduction-to-java-module-system-in-java-70-1.html&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;What is new in Java 6.0 Collections API? - &lt;a href="http://www.javabeat.net/articles/4-what-is-new-in-java-60-collections-api-1.html"&gt;http://www.javabeat.net/articles/4-what-is-new-in-java-60-collections-api-1.html&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-1787281094051122482?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/1787281094051122482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/new-features-in-java-70.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/1787281094051122482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/1787281094051122482'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/new-features-in-java-70.html' title='New Features in Java 5.0 onwards version'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-4404811639518492167</id><published>2009-05-28T22:10:00.000-07:00</published><updated>2009-05-31T02:01:11.247-07:00</updated><title type='text'>Pointer To Spring Stuff</title><content type='html'>&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Introduction to Spring Web Framework - &lt;/strong&gt;&lt;a href="http://www.javabeat.net/articles/71-introduction-to-spring-web-framework-1.html"&gt;http://www.javabeat.net/articles/71-introduction-to-spring-web-framework-1.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Life Cycle Management of a Spring Bean -&lt;/strong&gt; &lt;a href="http://www.javabeat.net/articles/49-life-cycle-management-of-a-spring-bean-1.html"&gt;http://www.javabeat.net/articles/49-life-cycle-management-of-a-spring-bean-1.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;How to Trace method execution Time -&lt;/strong&gt; &lt;a href="http://www.unicon.net/node/765"&gt;http://www.unicon.net/node/765&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;PerformanceMonitorInterceptor Example -&lt;/strong&gt; &lt;a href="http://forum.springsource.org/showthread.php?t=29920"&gt;http://forum.springsource.org/showthread.php?t=29920&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Aspect-Oriented Refactoring Series -&lt;/strong&gt; &lt;a href="http://www.theserverside.com/tt/articles/article.tss?l=AspectOrientedRefactoringPart1"&gt;http://www.theserverside.com/tt/articles/article.tss?l=AspectOrientedRefactoringPart1&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Quickly Exposing Spring Beans as JMX MBeans -&lt;/strong&gt; &lt;a href="http://www.unicon.net/node/614"&gt;http://www.unicon.net/node/614&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Spring: A Quick Journey Through Spring AOP -&lt;/strong&gt; &lt;a href="http://www.javalobby.org/java/forums/t44746.html"&gt;http://www.javalobby.org/java/forums/t44746.html&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;An Introduction to Aspect-Oriented Programming with the Spring Framework, Part 1 - &lt;/strong&gt;&lt;a href="http://www.onjava.com/pub/a/onjava/2004/07/14/springaop.html?page=1"&gt;http://www.onjava.com/pub/a/onjava/2004/07/14/springaop.html?page=1&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;POJO Aspects in Spring 2.0: A Simple Example -&lt;/strong&gt; &lt;a href="http://blog.springsource.com/2006/03/22/pojo-aspects-in-spring-20-a-simple-example/"&gt;http://blog.springsource.com/2006/03/22/pojo-aspects-in-spring-20-a-simple-example/&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Good Example Stuff -&lt;/strong&gt; &lt;a href="http://www.java2s.com/Code/Java/Spring/ProfilingExample.htm"&gt;http://www.java2s.com/Code/Java/Spring/ProfilingExample.htm&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-4404811639518492167?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/4404811639518492167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/pointer-to-spring-stuff.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/4404811639518492167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/4404811639518492167'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/pointer-to-spring-stuff.html' title='Pointer To Spring Stuff'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-4111371898639802736</id><published>2009-05-27T23:46:00.000-07:00</published><updated>2009-05-29T20:42:55.902-07:00</updated><title type='text'>How to fill VARRAY/TABLETYPE object in iBatis</title><content type='html'>&lt;hr/&gt;&lt;br /&gt;&lt;strong&gt;Sample:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;Create DEMO_TABLE_TYPE as the following structure:&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;create or replace TYPE DEMO_TABLE_TYPE AS OBJECT&lt;br /&gt;(&lt;br /&gt;id NUMBER, name NVARCHAR2(35)&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;Write demoProcedure as the following structure: &lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;demoProcedure(&lt;br /&gt;demoTType&lt;br /&gt;) IS&lt;br /&gt;BEGIN&lt;br /&gt;INSERT INTO DEMOTABLE( ID, NAME) VALUES ( demoTType.ID,demoTType.NAME); END demoProcudre;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; &lt;strong&gt;&lt;em&gt;create a sql map id in sql-map-xxx.xml like as follows:&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&amp;lt;procedure id="demoProc" parameterClass="map"&amp;gt;&lt;br /&gt;&amp;lt;![CDATA[{call&lt;br /&gt;DECLARE&lt;br /&gt;demoTType DEMO_TABLE_TYPE := DEMO_TABLE_TYPE();&lt;br /&gt;idx BINARY_INTEGER := 1;&lt;br /&gt;BEGIN&lt;br /&gt;]]&amp;gt;&lt;br /&gt;&amp;lt;iterate property="list"&amp;gt;&lt;br /&gt;&amp;lt;![CDATA[&lt;br /&gt;demoTType .extend(1);&lt;br /&gt;demoTType (idxLF) := DEMO_TABLE_TYPE(&lt;br /&gt;#demoTType[].id:NUMERIC#,&lt;br /&gt;#demoTType[].name:VARCHAR#&lt;br /&gt;);&lt;br /&gt;idx := idx + 1;&lt;br /&gt;]]&amp;gt;&lt;br /&gt;&amp;lt;/iterate&amp;gt;&lt;br /&gt;&amp;lt;![CDATA[&lt;br /&gt;demoProcedure(&lt;br /&gt;demoTType&lt;br /&gt;);&lt;br /&gt;END}&lt;br /&gt;]]&amp;gt;&lt;br /&gt;&amp;lt;/procedure&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-4111371898639802736?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/4111371898639802736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/how-to-fill-varraytabletype-object-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/4111371898639802736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/4111371898639802736'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/how-to-fill-varraytabletype-object-in.html' title='How to fill VARRAY/TABLETYPE object in iBatis'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-8087876363345130095</id><published>2009-05-27T22:32:00.000-07:00</published><updated>2009-05-27T23:45:43.581-07:00</updated><title type='text'>Generic iBatis Error in Huge Volume Cetric Data</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;Error&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;com.ibatis.common.jdbc.exception.NestedSQLException:&lt;br /&gt;--- The error occurred while applying a parameter map.&lt;br /&gt;--- Check the BillIe.insertBillIssuingEntityOnEditCycle-InlineParameterMap.&lt;br /&gt;--- Check the statement (update procedure failed).&lt;br /&gt;--- Cause: java.sql.SQLException: ORA-06550: line 1, column 1:&lt;br /&gt;PLS-00123: program too large (Diana nodes)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Solution:&lt;/span&gt;&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3366ff;"&gt;Step 1: Create a store procedure which would insert/delete record from table&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3366ff;"&gt;Step 2: Define some threshold value (Note: you must be ensure that threshold value won't encounter Diana nodes kind of problem) in java.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3366ff;"&gt;Step 3: Push records in batch mode&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3366ff;"&gt;Pseudo Code Snippet&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;getSqlMapClient().startTransaction()&lt;br /&gt;getSqlMapClient().startBatch()&lt;/p&gt;&lt;p&gt;//Check out how many records are there in the modelMap or List&lt;/p&gt;&lt;p&gt;totalRecord = modelList.size&lt;/p&gt;&lt;p&gt;toIndex = modelList.size&lt;/p&gt;&lt;p&gt;fromIndex =0&lt;/p&gt;&lt;p&gt;numberOfLoops = new Double(Math.ceil(totalRecord / THRESHOLD_VALUE)).intValue()&lt;/p&gt;&lt;p&gt;if(THRESHOLD_VALUE &lt;= toIndex){&lt;br /&gt;toIndex = new Double(THRESHOLD_VALUE).intValue()&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;for(int i = 0; i &lt;&gt;&lt;p&gt;modelSubList = modelList.subList(fromIndex , toIndex)&lt;/p&gt;&lt;p&gt;getSqlMapClient().insert("sql-map-id", modelSubList )&lt;/p&gt;&lt;p&gt;modelList.subList(fromIndex, toIndex).clear()&lt;/p&gt;&lt;p&gt;if(modelList.size() &lt; THRESHOLD_VALUE){&lt;br /&gt;toIndex = modelList.size();&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;getSqlMapClient().executeBatch()&lt;br /&gt;getSqlMapClient().commitTransaction()&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-8087876363345130095?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/8087876363345130095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/generic-ibatis-error-in-huge-volume.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/8087876363345130095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/8087876363345130095'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/generic-ibatis-error-in-huge-volume.html' title='Generic iBatis Error in Huge Volume Cetric Data'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-5573489165125124630</id><published>2009-05-27T22:00:00.000-07:00</published><updated>2009-05-27T22:23:26.744-07:00</updated><title type='text'>Quotation</title><content type='html'>&lt;hr /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; FAIL FORWARD - FAILURE IS THE ONLY OPPORTUNITY TO BEGIN AGAIN MORE INTELLIGENTLY.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;hr /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-5573489165125124630?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/5573489165125124630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/quotation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/5573489165125124630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/5573489165125124630'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/quotation.html' title='Quotation'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-3262128803614359922</id><published>2009-05-27T20:40:00.001-07:00</published><updated>2009-05-27T20:40:41.311-07:00</updated><title type='text'>How to use Lucene Search in Struts 2.0</title><content type='html'>In Progress...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-3262128803614359922?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/3262128803614359922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/how-to-use-lucene-search-in-struts-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3262128803614359922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3262128803614359922'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/how-to-use-lucene-search-in-struts-20.html' title='How to use Lucene Search in Struts 2.0'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-6580867367028976744</id><published>2009-05-26T23:37:00.000-07:00</published><updated>2010-01-11T23:09:32.256-08:00</updated><title type='text'>Free Java/J2EE e-Book</title><content type='html'>1. &lt;a href="http://www.onlinecomputerbooks.com/free-j2ee-books.php"&gt;http://www.onlinecomputerbooks.com/free-j2ee-books.php&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://www.onlinecomputerbooks.com/free-java-books.php"&gt;http://www.onlinecomputerbooks.com/free-java-books.php&lt;/a&gt;&lt;br /&gt;3. &lt;a href="http://www.greenteapress.com/thinkapjava/thinkapjava.pdf"&gt; http://www.greenteapress.com/thinkapjava/thinkapjava.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-6580867367028976744?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/6580867367028976744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/free-javaj2ee-e-book.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/6580867367028976744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/6580867367028976744'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/free-javaj2ee-e-book.html' title='Free Java/J2EE e-Book'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-1717165908134775818</id><published>2009-05-26T22:59:00.000-07:00</published><updated>2009-06-12T08:57:11.263-07:00</updated><title type='text'>SCDJWS - Preparation In Progress</title><content type='html'>Some Useful URL:&lt;br /&gt;1. Certificate Details - &lt;a href="http://sg.sun.com/training/certification/java/scdjws.xml"&gt;http://sg.sun.com/training/certification/java/scdjws.xml&lt;/a&gt;&lt;br /&gt;2. &lt;a onclick="javascript:window.open('http://java.boot.by/wsd-guide/');"&gt;SCDJWS Study notes&lt;/a&gt; (By Mikalai Zaikin) - &lt;a href="http://java.boot.by/wsd-guide/"&gt;http://java.boot.by/wsd-guide/&lt;/a&gt;&lt;br /&gt;3. &lt;a href="http://www.xyzws.com/scdjws/"&gt;http://www.xyzws.com/scdjws/&lt;/a&gt;&lt;br /&gt;4. &lt;a href="http://en.wikibooks.org/wiki/Certification:SCDJWS"&gt;http://en.wikibooks.org/wiki/Certification:SCDJWS&lt;/a&gt;&lt;br /&gt;5. &lt;a href="http://www.scdjws.com/index.php"&gt;http://www.scdjws.com/index.php&lt;/a&gt; - Provide good pointer&lt;br /&gt;6. &lt;a href="http://www.theserverside.com/tt/articles/article.tss?l=Systinet-web-services-part-1"&gt;http://www.theserverside.com/tt/articles/article.tss?l=Systinet-web-services-part-1&lt;/a&gt;&lt;br /&gt;7. Example Stuff - &lt;a href="https://metro.dev.java.net/guide/index.html#wsit_tutorial"&gt;https://metro.dev.java.net/guide/index.html#wsit_tutorial&lt;/a&gt;&lt;br /&gt;8.  The Java Web Service Tutorial - &lt;a href="http://java.sun.com/webservices/docs/1.6/tutorial/doc/"&gt;http://java.sun.com/webservices/docs/1.6/tutorial/doc/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-1717165908134775818?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/1717165908134775818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/scdjws.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/1717165908134775818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/1717165908134775818'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/scdjws.html' title='SCDJWS - Preparation In Progress'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-8223734591876325389</id><published>2009-05-26T03:35:00.001-07:00</published><updated>2009-05-27T03:38:30.159-07:00</updated><title type='text'>Code Quality Tools in Java</title><content type='html'>1. &lt;a href="http://java.dzone.com/articles/code-quality-tools-java"&gt;http://java.dzone.com/articles/code-quality-tools-java&lt;/a&gt;&lt;br /&gt;2. Automated Code Reviews with Checkstyle -&lt;br /&gt;&lt;br /&gt; Part 1 - &lt;a href="http://www.javaworld.com/javaworld/jw-11-2008/jw-11-checkstyle1.html"&gt;http://www.javaworld.com/javaworld/jw-11-2008/jw-11-checkstyle1.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; Part 2 -  &lt;a href="http://www.javaworld.com/javaworld/jw-11-2008/jw-11-checkstyle2.html"&gt;http://www.javaworld.com/javaworld/jw-11-2008/jw-11-checkstyle2.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-8223734591876325389?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/8223734591876325389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/code-quality-tools-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/8223734591876325389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/8223734591876325389'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/code-quality-tools-in-java.html' title='Code Quality Tools in Java'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-5550367838608812174</id><published>2009-05-25T22:32:00.000-07:00</published><updated>2009-06-16T19:51:09.283-07:00</updated><title type='text'>URLs About Servlet 3.0 Specification</title><content type='html'>1. Specification - &lt;a href="http://jcp.org/en/jsr/detail?id=315"&gt;http://jcp.org/en/jsr/detail?id=315&lt;/a&gt;&lt;br /&gt;2. Good explanation in briefly - &lt;a href="http://www.infoq.com/news/2007/06/servlet3"&gt;http://www.infoq.com/news/2007/06/servlet3&lt;/a&gt;&lt;br /&gt;3. Good Presentation by Mark - &lt;a href="http://people.apache.org/~markt/presentations/2009-04-01-Tomcat7Servlet3.pdf"&gt;http://people.apache.org/~markt/presentations/2009-04-01-Tomcat7Servlet3.pdf&lt;/a&gt;&lt;br /&gt;4. &lt;a href="http://today.java.net/pub/a/today/2008/10/14/introduction-to-servlet-3.html"&gt;http://today.java.net/pub/a/today/2008/10/14/introduction-to-servlet-3.html&lt;/a&gt;&lt;br /&gt;5. &lt;a href="http://blogs.sun.com/swchan/entry/servlet_3_0_annotations"&gt;http://blogs.sun.com/swchan/entry/servlet_3_0_annotations&lt;/a&gt;&lt;br /&gt;6. &lt;a href="http://blogs.sun.com/jluehe/"&gt;http://blogs.sun.com/jluehe/&lt;/a&gt;&lt;br /&gt;7. &lt;a href="http://blogs.sun.com/swchan/"&gt;http://blogs.sun.com/swchan/&lt;/a&gt;&lt;br /&gt;8. &lt;a href="http://techtracer.com/2007/07/23/servlet-30-the-journey-begins-now/"&gt;http://techtracer.com/2007/07/23/servlet-30-the-journey-begins-now/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-5550367838608812174?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/5550367838608812174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/urls-about-servlet-30-specification.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/5550367838608812174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/5550367838608812174'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/urls-about-servlet-30-specification.html' title='URLs About Servlet 3.0 Specification'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-3494074927500252058</id><published>2009-05-25T00:40:00.000-07:00</published><updated>2009-06-16T19:51:09.330-07:00</updated><title type='text'>Framework Stuff URL</title><content type='html'>&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="4"&gt;Spring :&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;1. &lt;a href="http://static.springframework.org/spring/docs/2.5.x/reference/orm.html"&gt;http://static.springframework.org/spring/docs/2.5.x/reference/orm.html&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://book.javanb.com/Professional-Java-Development-with-the-Spring-Framework/BBL0021.html"&gt;http://book.javanb.com/Professional-Java-Development-with-the-Spring-Framework/BBL0021.html&lt;/a&gt;&lt;br /&gt;3. &lt;a href="http://www.javalobby.org/java/forums/t44746.html"&gt;http://www.javalobby.org/java/forums/t44746.html&lt;/a&gt; - &lt;em&gt;&lt;font size="2"&gt;A Quick Journey Through Spring&lt;/font&gt; AOP&lt;/em&gt;&lt;br /&gt;4. &lt;a href="http://www.mularien.com/blog/2008/07/07/5-minute-guide-to-spring-security/"&gt;http://www.mularien.com/blog/2008/07/07/5-minute-guide-to-spring-security/&lt;/a&gt; - &lt;em&gt;&lt;font size="2"&gt;5 Minute Guide To Spring Security&lt;br /&gt;&lt;/font&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="4"&gt;OGNL:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://www.ognl.org/2.6.9/Documentation/pdf/LanguageGuide.pdf"&gt;http://www.ognl.org/2.6.9/Documentation/pdf/LanguageGuide.pdf&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://struts.apache.org/2.0.14/docs/ognl-basics.html"&gt;http://struts.apache.org/2.0.14/docs/ognl-basics.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="4"&gt;Struts 2.0:&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;1. &lt;a href="http://struts.apache.org/2.0.6/docs/ui-tag-reference.html"&gt;http://struts.apache.org/2.0.6/docs/ui-tag-reference.html&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://struts.apache.org/2.x/docs/other-resources.html"&gt;http://struts.apache.org/2.x/docs/other-resources.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="4"&gt;iBatis :&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;1. &lt;a href="http://ibatisnet.sourceforge.net/DevGuide.html"&gt;http://ibatisnet.sourceforge.net/DevGuide.html&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://www.javalobby.org/java/forums/t75161.html"&gt;http://www.javalobby.org/java/forums/t75161.html&lt;/a&gt;&lt;br /&gt;3. &lt;a href="http://ibatisnet.sourceforge.net/DevGuide/ar01s04.html"&gt;http://ibatisnet.sourceforge.net/DevGuide/ar01s04.html&lt;/a&gt;&lt;br /&gt;4. &lt;a href="http://opensource.atlassian.com/confluence/oss/display/IBATIS/Index"&gt;http://opensource.atlassian.com/confluence/oss/display/IBATIS/Index&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="4"&gt;Sitemesh:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://www.rkcole.com/articles/other/SiteMeshDecorators.html"&gt;http://www.rkcole.com/articles/other/SiteMeshDecorators.html&lt;/a&gt; - Demo App&lt;br /&gt;2. &lt;a href="http://www.onjava.com/pub/a/onjava/2004/09/22/sitemesh.html"&gt;http://www.onjava.com/pub/a/onjava/2004/09/22/sitemesh.html&lt;/a&gt; - Article&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="4"&gt;Hibernate 3:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://www.hibernate.org/hib_docs/reference/en/html/index.html"&gt;http://www.hibernate.org/hib_docs/reference/en/html/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font size="4"&gt;Freemarker:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://freemarker.sourceforge.net/docs"&gt;http://freemarker.sourceforge.net/docs&lt;/a&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-3494074927500252058?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/3494074927500252058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/framework-stuff-url.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3494074927500252058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/3494074927500252058'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/framework-stuff-url.html' title='Framework Stuff URL'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-12837309802631609</id><published>2009-05-24T19:46:00.000-07:00</published><updated>2009-05-24T20:03:39.676-07:00</updated><title type='text'>Eclipse Startup Error</title><content type='html'>&lt;hr /&gt;&lt;br /&gt; &lt;br /&gt;When I start eclipse, sometimes it does not start and throws error message like "An error has occured. See the log file ..\workspace\.metadata\.log".&lt;br /&gt;&lt;br /&gt;&lt;b&gt;.log&lt;/b&gt;&lt;br /&gt;!ENTRY org.eclipse.core.resources 2 10035 2009-05-25 10:49:07.164!MESSAGE A workspace crash was detected. The previous session did not exit normally.&lt;br /&gt;!ENTRY org.eclipse.osgi 4 0 2009-05-25 10:49:07.383!MESSAGE An error occurred while automatically activating bundle org.eclipse.core.resources (39).!STACK 0org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.compatibility.PluginActivator.start() of bundle org.eclipse.core.resources. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1010)&lt;br /&gt;.....&lt;br /&gt;Caused by: org.eclipse.core.internal.dtree.ObjectNotFoundException: Tree element /Test/Person.class not found. at org.eclipse.core.internal.dtree.AbstractDataTree.handleNotFound(AbstractDataTree.java:257) at org.eclipse.core.internal.dtree.DeltaDataTree.getData(DeltaDataTree.java:585) at org.eclipse.core.internal.dtree.DataDeltaNode.asBackwardDelta(DataDeltaNode.java:50) at org.eclipse.core.internal.dtree.NoDataDeltaNode.asBackwardDelta(NoDataDeltaNode.java:59) at org.eclipse.core.internal.dtree.DataDeltaNode.asBackwardDelta(DataDeltaNode.java:47) at org.eclipse.core.internal.dtree.DeltaDataTree.asBackwardDelta(DeltaDataTree.java:88)&lt;br /&gt;..........&lt;br /&gt;at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:985) ... 28 moreRoot exception:org.eclipse.core.internal.dtree.ObjectNotFoundException: Tree element /Test/Person.class not found. at org.eclipse.core.internal.dtree.AbstractDataTree.handleNotFound(AbstractDataTree.java:257) at org.eclipse.core.internal.dtree.DeltaDataTree.getData(DeltaDataTree.java:585)&lt;br /&gt;.........&lt;br /&gt;at org.eclipse.core.launcher.Main.main(Main.java:952)&lt;br /&gt;!ENTRY org.eclipse.osgi 4 0 2009-05-25 10:49:07.383!MESSAGE Application error!STACK 1java.lang.NoClassDefFoundError: org/eclipse/core/resources/IContainer at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)&lt;br /&gt;..........&lt;br /&gt;!ENTRY org.eclipse.osgi 2 0 2009-05-25 10:49:07.493!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:!&lt;br /&gt;SUBENTRY 1 org.eclipse.osgi 2 0 2009-05-25 10:49:07.493!MESSAGE Bundle &lt;a href="mailto:update@plugins/org.eclipse.core.filesystem.linux.x86_1.0.0.v20060603.jar"&gt;update@plugins/org.eclipse.core.filesystem.linux.x86_1.0.0.v20060603.jar&lt;/a&gt; [32] was not resolved.&lt;br /&gt;!SUBENTRY 1 org.eclipse.osgi 2 0 2009-05-25 10:49:07.493!MESSAGE Bundle &lt;a href="mailto:update@plugins/org.eclipse.core.filesystem.macosx_1.0.0.v20060603.jar"&gt;update@plugins/org.eclipse.core.filesystem.macosx_1.0.0.v20060603.jar&lt;/a&gt; [33] was not resolved.&lt;br /&gt;!SUBENTRY 1 org.eclipse.osgi 2 0 2009-05-25 10:49:07.493!MESSAGE Bundle &lt;a href="mailto:update@plugins/org.eclipse.jdt.launching.macosx_3.1.100.v20060605.jar"&gt;update@plugins/org.eclipse.jdt.launching.macosx_3.1.100.v20060605.jar&lt;/a&gt; [95] was not resolved.!&lt;br /&gt;SUBENTRY 1 org.eclipse.osgi 2 0 2009-05-25 10:49:07.493!MESSAGE Bundle &lt;a href="mailto:update@plugins/org.eclipse.swt.carbon.macosx_3.2.2.v3236.jar"&gt;update@plugins/org.eclipse.swt.carbon.macosx_3.2.2.v3236.jar&lt;/a&gt; [179] was not resolved.!&lt;br /&gt;SUBENTRY 1 org.eclipse.osgi 2 0 2009-05-25 10:49:07.493!MESSAGE Bundle &lt;a href="mailto:update@plugins/org.eclipse.swt.gtk.linux.x86_3.2.2.v3236.jar"&gt;update@plugins/org.eclipse.swt.gtk.linux.x86_3.2.2.v3236.jar&lt;/a&gt; [180] was not resolved.!&lt;br /&gt;SUBENTRY 1 org.eclipse.osgi 2 0 2009-05-25 10:49:07.493!MESSAGE Bundle &lt;a href="mailto:update@plugins/org.eclipse.ui.carbon_3.2.0.I20060605-1400.jar"&gt;update@plugins/org.eclipse.ui.carbon_3.2.0.I20060605-1400.jar&lt;/a&gt; [192] was not resolved.!&lt;br /&gt;SUBENTRY 1 org.eclipse.osgi 2 0 2009-05-25 10:49:07.493!MESSAGE Bundle &lt;a href="mailto:update@plugins/org.eclipse.update.core.linux_3.2.0.v20060605.jar"&gt;update@plugins/org.eclipse.update.core.linux_3.2.0.v20060605.jar&lt;/a&gt; [212] was not resolved.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to Resolve&lt;/b&gt;&lt;br /&gt;Delete the following files/folders:&lt;br /&gt;1. \workspace\.metadata\.plugins\org.eclipse.core.resources\.snap&lt;br /&gt;2. \workspace\.metadata\.plugins\org.eclipse.core.resources\.root\.markers.snap&lt;br /&gt;&lt;br /&gt;Now start eclipse. It should start else problem is something else. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-12837309802631609?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/12837309802631609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/eclipse-startup-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/12837309802631609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/12837309802631609'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/eclipse-startup-error.html' title='Eclipse Startup Error'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4034650153155250265.post-6074676521962312577</id><published>2009-05-22T21:56:00.000-07:00</published><updated>2009-05-23T00:01:38.221-07:00</updated><title type='text'>How to integrate: Struts 2+Spring+iBatis (NetBeans 6.5)</title><content type='html'>&lt;div&gt;&lt;strong&gt;&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Assignment:&lt;/strong&gt; Use Struts2/Spring/Hibernate framework to Authenticate user credential i.e. username and password. If Authentication is success then render result like “User &lt;username&gt;logged successfully.” else remain in the same Login Input form.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Solution:&lt;/strong&gt; To achieve the above assignment, I am using NetBeans 6.5 IDE and other mentioned framework and supporting libraries.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Framework:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;MVC - Struts 2&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Bussiness Layer - Spring 2.5&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Persistance - iBatis&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;IDE - Netbeans 6.5&lt;br /&gt;Plug-ins - Struts 2 – spring - plugin &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Create Project and Add supporting Libraries:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Step 1:&lt;br /&gt;&lt;/strong&gt;Open NetBeans 6.5&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2: &lt;/strong&gt;&lt;br /&gt;Select File &gt; New Project &gt; Select the following Options&lt;br /&gt;Categories: Java Web&lt;br /&gt;Projects: Web Application&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 3: &lt;/strong&gt;&lt;br /&gt;Once Java Web and Web Application are selected then Select Next (Ref. Figure 1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a href="http://1.bp.blogspot.com/_nrgl1ONMLxc/SheMRP139hI/AAAAAAAAABA/ZUULpj_b2lg/s1600-h/CreateProject.gif"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 320px; DISPLAY: block; HEIGHT: 218px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5338890111209174546" border="0" alt="" src="http://1.bp.blogspot.com/_nrgl1ONMLxc/SheMRP139hI/AAAAAAAAABA/ZUULpj_b2lg/s320/CreateProject.gif" /&gt;&lt;/a&gt; Figure 1 &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; &lt;/p&gt;&lt;p&gt;Provide the following details in Name and Location Screen:&lt;br /&gt;Project Name:&lt;br /&gt;Project Location:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; &lt;/p&gt;&lt;p&gt;Select the following options in Server and Settings Screen:&lt;br /&gt;Server : Tomcat 6.0 (For me it’s Tomcat 6.0)&lt;br /&gt;Java EE Version : Java EE 5&lt;br /&gt;Context Path : ssidemo &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Step 6: &lt;/strong&gt;Tick the check box for the following Frameworks:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_nrgl1ONMLxc/Shed4r0ZOEI/AAAAAAAAABQ/h6wDzh3ncdc/s1600-h/Framework.gif"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 320px; DISPLAY: block; HEIGHT: 258px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5338909480431728706" border="0" alt="" src="http://1.bp.blogspot.com/_nrgl1ONMLxc/Shed4r0ZOEI/AAAAAAAAABQ/h6wDzh3ncdc/s320/Framework.gif" /&gt;&lt;/a&gt; &lt;p align="center"&gt;Figure 2&lt;br /&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;strong&gt;Step 7: &lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p align="left"&gt;IDE will add couple of jar files related spring/struts 2. Apart from that Add the following jar files in the Libraries:&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;em&gt;1. struts2-spring-plugin-2.0.12.jar&lt;br /&gt;2. commons-dbcp-1.2.1.jar&lt;br /&gt;3. commons-pool-1.2.jar&lt;br /&gt;4. commons-collections-3.0.jar&lt;br /&gt;5. Java DB Driver - derby.jar&lt;br /&gt;6. Java DB Driver - derbyclient.jar&lt;br /&gt;7. Java DB Driver - derbynet.jar&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;(You can get 1….4 jar files by a quick search and download and 5, 6, 7 jar files is available in JDK/NetBeans)&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note:&lt;br /&gt;Select Library folder and right click on it or other way and select “Add Library” and select “Java DB Driver” library to add To add jar files select “Add Jar/Folder” and select the jar files (1….4) to add&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;Configure Framework and Create Project Folder structure for the Assignment:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Project Folder Structure created by IDE: &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Web Pages - &lt;/strong&gt;It stores the entire files/resourced required for web app deployment&lt;br /&gt;&lt;strong&gt;Configuration Files -&lt;/strong&gt; All the config (.xml) files&lt;br /&gt;&lt;strong&gt;Server Resources -&lt;/strong&gt; Not in use for this exercise&lt;br /&gt;&lt;strong&gt;Source Packages -&lt;/strong&gt; Java Source Code&lt;br /&gt;&lt;strong&gt;Test Packages -&lt;/strong&gt; Not in use for this exercise&lt;br /&gt;&lt;strong&gt;Libraries -&lt;/strong&gt; All the jar/zip files&lt;br /&gt;&lt;strong&gt;Test Libraries -&lt;/strong&gt; Not in use for this exercise&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Development Folder Structure used for this Assignment:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Struts Action -&lt;/strong&gt; com.hcl.action&lt;br /&gt;&lt;strong&gt;DAO -&lt;/strong&gt; com.hcl.dao&lt;br /&gt;&lt;strong&gt;Service -&lt;/strong&gt; com.hcl.service&lt;br /&gt;&lt;strong&gt;Model -&lt;/strong&gt; com.hcl.model&lt;br /&gt;&lt;strong&gt;JSP Pages -&lt;/strong&gt; WEB-INF/jsp&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Register Spring Details in web.xml:&lt;/strong&gt; &lt;/p&gt;&lt;p&gt;&lt;context-param&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&amp;gt;&lt;br /&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;&amp;lt;param-name&amp;gt;contextConfigLocation&amp;lt;/param-name&amp;gt;&lt;br /&gt;&amp;lt;param-value&amp;gt;/WEB-INF/applicationContext.xml&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/context-param&amp;gt;&lt;br /&gt;&amp;lt;filter&amp;gt;&lt;br /&gt;&amp;lt;filter-name&amp;gt;struts2&amp;lt;/filter-name&amp;gt;&lt;br /&gt;&amp;lt;filter-class&amp;gt;org.apache.struts2.dispatcher.FilterDispatcher&amp;lt;/filter-class&amp;gt;&lt;br /&gt;&amp;lt;/filter&amp;gt;&lt;br /&gt;&amp;lt;filter-mapping&amp;gt;&lt;br /&gt;&amp;lt;filter-name&amp;gt;struts2&amp;lt;/filter-name&amp;gt;&lt;br /&gt;&amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/filter-mapping&amp;gt;&lt;br /&gt;&amp;lt;listener&amp;gt;&lt;br /&gt;&amp;lt;listener-class&amp;gt;org.springframework.web.context.ContextLoaderListener&amp;lt;/listener-class&amp;gt;&lt;br /&gt;&amp;lt;/listener&amp;gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;/listener&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;/ ns xml java.sun.com javaee:web-app&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Do not worry about this web.xml; our IDE is smart enough to create it. But ensure that these are not missing.&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Configure Hibernate / Datasource / Transaction / Struts Action with spring&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"&amp;gt;&lt;br /&gt;&amp;lt;!—REGISTER STRUTS ACTION --&amp;gt;&lt;br /&gt;&amp;lt;bean id="action.Login" class="com.hcl.action.Login" scope="prototype"&amp;gt;&lt;br /&gt;&amp;lt;property name="daoService" ref="service.DAOServiceBean"/&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;!—REGISTER IBATIS FACTORY BEAN --&amp;gt;&lt;br /&gt;&amp;lt;bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"&amp;gt;&lt;br /&gt;&amp;lt;property name="configLocation"&lt;br /&gt;value="classpath:/sql-map-config.xml" /&amp;gt;&lt;br /&gt;&amp;lt;property name="dataSource" ref="dataSource" /&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;!—REGISTER DATASOURCE --&amp;gt;&lt;br /&gt;&amp;lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&amp;gt;&lt;br /&gt;&amp;lt;property name="driverClassName" value="org.apache.derby.jdbc.ClientDriver" /&amp;gt;&lt;br /&gt;&amp;lt;property name="url" value="jdbc:derby://localhost:1527/DEMODB" /&amp;gt;&lt;br /&gt;&amp;lt;property name="username" value="DEMODB" /&amp;gt;&lt;br /&gt;&amp;lt;property name="password" value="DEMODB" /&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;!—REGISTER DATASOURCE WITH IBATIS--&amp;gt;&lt;br /&gt;&amp;lt;bean id="sqlMap" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"&amp;gt;&lt;br /&gt;&amp;lt;property name="configLocation" value="classpath:/sql-map-config.xml"/&amp;gt;&lt;br /&gt;&amp;lt;property name="dataSource" ref="dataSource" /&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;　&lt;br /&gt;&amp;lt;!—REGISTER DATASOURCE WITH TRANSACTION MANAGER --&amp;gt;&lt;br /&gt;&amp;lt;bean id="txManager"&lt;br /&gt;class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&amp;gt;&lt;br /&gt;&amp;lt;property name="dataSource" ref="dataSource" /&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;alias name="txManager" alias="transactionManager" /&amp;gt;&lt;br /&gt;&amp;lt;bean id="DAOIntfBean" class="com.hcl.dao.DAOImpl"&amp;gt;&lt;br /&gt;&amp;lt;property name="sqlMapClient" ref="sqlMapClient" /&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;bean id="service.DAOServiceBean" class="com.hcl.service.DAOServiceImpl"&amp;gt;&lt;br /&gt;&amp;lt;property name="daoInft" ref="DAOIntfBean"/&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Little big than web.xml but logically very memorable.&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Struts configuration &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!DOCTYPE struts PUBLIC&lt;br /&gt;"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"&lt;br /&gt;"http://struts.apache.org/dtds/struts-2.0.dtd"&amp;gt;&lt;br /&gt;&amp;lt;struts&amp;gt;&lt;br /&gt;&amp;lt;constant name="struts.devMode" value="true" /&amp;gt;&lt;br /&gt;&amp;lt;constant name="struts.action.extension" value="action"/&amp;gt;&lt;br /&gt;&amp;lt;include file="example.xml"/&amp;gt; &amp;lt;!—ADDED BY IDE NOT IN USE FOR THIS--&amp;gt;&lt;br /&gt;&amp;lt;!-- Configuration for the default package. --&amp;gt;&lt;br /&gt;&amp;lt;package name="default" extends="struts-default"&amp;gt;&lt;br /&gt;&amp;lt;action name="Login" class="action.Login" method="doLogin"&amp;gt;&lt;br /&gt;&amp;lt;result name="login"&amp;gt;/jsp/Login.jsp&amp;lt;/result&amp;gt;&lt;br /&gt;&amp;lt;result name="input"&amp;gt;/jsp/Login.jsp&amp;lt;/result&amp;gt;&lt;br /&gt;&amp;lt;result name="error"&amp;gt;/jsp/Login.jsp&amp;lt;/result&amp;gt;&lt;br /&gt;&amp;lt;result name="success"&amp;gt;/jsp/Success.jsp&amp;lt;/result&amp;gt;&lt;br /&gt;&amp;lt;/action&amp;gt;&lt;br /&gt;&amp;lt;/package&amp;gt;&lt;br /&gt;&amp;lt;/struts&amp;gt;&lt;/p&gt;&lt;action class="action.Login" name="Login" method="doLogin"&gt;&lt;br /&gt;&lt;p&gt;Here “action.Login” is a bean defined in ApplicationContext.xml&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configure SQL Queries with iBatis&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE sqlMapConfig&lt;br /&gt;PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"&lt;br /&gt;"http://www.ibatis.com/dtd/sql-map-config-2.dtd"&amp;gt;&lt;br /&gt;&amp;lt;sqlMapConfig&amp;gt;&lt;br /&gt;&amp;lt;settings&lt;br /&gt;cacheModelsEnabled="true"&lt;br /&gt;enhancementEnabled="true"&lt;br /&gt;maxSessions="64"&lt;br /&gt;maxTransactions="8"&lt;br /&gt;maxRequests="128"&lt;br /&gt;/&amp;gt;&lt;br /&gt;&amp;lt;sqlMap resource="UserDetails.xml"/&amp;gt;&lt;br /&gt;&amp;lt;/sqlMapConfig&amp;gt;&lt;/sqlmap&gt;&lt;br /&gt;&lt;br /&gt;Here UserDetails.xml contains the queries used for my purpose.&lt;br /&gt;&lt;sqlmap&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"&lt;br /&gt;"http://www.ibatis.com/dtd/sql-map-2.dtd"&amp;gt;&lt;br /&gt;&amp;lt;sqlMap&amp;gt;&lt;br /&gt;&amp;lt;resultMap id="model.UserInfo" class="com.hcl.model.UserInfo"&amp;gt;&lt;br /&gt;&amp;lt;result property="userName" column="USER_NAME"/&amp;gt;&lt;br /&gt;&amp;lt;result property="password" column="PASSWORD"/&amp;gt;&lt;br /&gt;&amp;lt;/resultMap&amp;gt;&lt;br /&gt;&amp;lt;select id="isUserExists" parameterClass="com.hcl.model.UserInfo" resultClass="Integer"&amp;gt;&lt;br /&gt;SELECT count(*)&lt;br /&gt;FROM USER_INFO&lt;br /&gt;WHERE USER_NAME=#userName# AND PASSWORD = #password#&lt;br /&gt;&amp;lt;/select&amp;gt;&lt;br /&gt;&amp;lt;/sqlMap&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It is not a best way to do; you have better way to do it. But for demo there is no problem.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Java Code&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Login.java&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;package com.hcl.action;&lt;br /&gt;&lt;br /&gt;import com.hcl.model.UserInfo;&lt;br /&gt;import com.hcl.service.DAOServiceIntf;&lt;br /&gt;import com.opensymphony.xwork2.ActionSupport;&lt;br /&gt;&lt;br /&gt;public class Login extends ActionSupport {&lt;br /&gt;&lt;br /&gt;private DAOServiceIntf DaoService;&lt;br /&gt;private String userName;&lt;br /&gt;private String password;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public Login() {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String doLogin() throws Exception {&lt;br /&gt;UserInfo userInfo = new UserInfo();&lt;br /&gt;userInfo.setPassword(password);&lt;br /&gt;userInfo.setUserName(userName);&lt;br /&gt;if(DaoService.isUserExists(userInfo)){&lt;br /&gt;return ActionSupport.SUCCESS;&lt;br /&gt;}else{&lt;br /&gt;return ActionSupport.INPUT;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String getUserName() {&lt;br /&gt;return userName;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setUserName(String userName) {&lt;br /&gt;this.userName = userName;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String getPassword() {&lt;br /&gt;return password;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setPassword(String password) {&lt;br /&gt;this.password = password;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public DAOServiceIntf getDaoService() {&lt;br /&gt;return DaoService;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setDaoService(DAOServiceIntf DaoService) {&lt;br /&gt;this.DaoService = DaoService;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Login-validation.xml – Way to do Validation in Struts 2&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;validators&gt;&lt;field name="userName"&gt;&lt;field-validator type="requiredstring"&gt;&lt;param name="trim"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE validators PUBLIC&lt;br /&gt;"-//OpenSymphony Group//XWork Validator 1.0.2//EN"&lt;br /&gt;"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"&amp;gt;&lt;br /&gt;&amp;lt;validators&amp;gt;&lt;br /&gt;&amp;lt;field name="userName"&amp;gt;&lt;br /&gt;&amp;lt;field-validator type="requiredstring"&amp;gt;&lt;br /&gt;&amp;lt;param name="trim"&amp;gt;true&amp;lt;/param&amp;gt;&lt;br /&gt;&amp;lt;message&amp;gt;Login name is required&amp;lt;/message&amp;gt;&lt;br /&gt;&amp;lt;/field-validator&amp;gt;&lt;br /&gt;&amp;lt;/field&amp;gt;&lt;br /&gt;&amp;lt;field name="password"&amp;gt;&lt;br /&gt;&amp;lt;field-validator type="requiredstring"&amp;gt;&lt;br /&gt;&amp;lt;param name="trim"&amp;gt;true&amp;lt;/param&amp;gt;&lt;br /&gt;&amp;lt;message&amp;gt;Password is required&amp;lt;/message&amp;gt;&lt;br /&gt;&amp;lt;/field-validator&amp;gt;&lt;br /&gt;&amp;lt;/field&amp;gt;&lt;br /&gt;&amp;lt;/validators&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;UserInfo.java&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;package com.hcl.model;&lt;br /&gt;&lt;br /&gt;public class UserInfo {&lt;br /&gt;&lt;br /&gt;private String userName;&lt;br /&gt;private String password;&lt;br /&gt;&lt;br /&gt;public String getPassword() {&lt;br /&gt;return password;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setPassword(String password) {&lt;br /&gt;this.password = password;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String getUserName() {&lt;br /&gt;return userName;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setUserName(String userName) {&lt;br /&gt;this.userName = userName;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DAOIntf.java (DAO Interface)&lt;br /&gt;&lt;br /&gt;package com.hcl.dao;&lt;br /&gt;&lt;br /&gt;import com.hcl.model.UserInfo;&lt;br /&gt;&lt;br /&gt;public interface DAOIntf {&lt;br /&gt;public boolean isUserExists(UserInfo userInfo);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DAOImpl.java (DAO Implementation)&lt;br /&gt;&lt;br /&gt;package com.hcl.dao;&lt;br /&gt;import com.hcl.model.UserInfo;&lt;br /&gt;import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;&lt;br /&gt;&lt;br /&gt;public class DAOImpl extends SqlMapClientDaoSupport implements DAOIntf {&lt;br /&gt;&lt;br /&gt;public boolean isUserExists(UserInfo userInfo) {&lt;br /&gt;Integer userCount;&lt;br /&gt;boolean result = false;&lt;br /&gt;try{&lt;br /&gt;userCount =(Integer) getSqlMapClientTemplate().queryForObject("isUserExists",userInfo);&lt;br /&gt;}&lt;br /&gt;catch(Exception ex){&lt;br /&gt;ex.printStackTrace();&lt;br /&gt;System.out.println(ex);&lt;br /&gt;return false;&lt;br /&gt;}&lt;br /&gt;if (userCount != null &amp;amp;&amp;amp; userCount &gt; 0) {&lt;br /&gt;result = true;&lt;br /&gt;} else{&lt;br /&gt;result = false;&lt;br /&gt;}&lt;br /&gt;return result;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DAOServiceIntf.java (Service Interface)&lt;br /&gt;&lt;br /&gt;package com.hcl.service;&lt;br /&gt;&lt;br /&gt;import com.hcl.model.UserInfo;&lt;br /&gt;&lt;br /&gt;public interface DAOServiceIntf {&lt;br /&gt;public boolean isUserExists(UserInfo userInfo);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DAOServiceImpl.java (Service Implementation)&lt;br /&gt;&lt;br /&gt;package com.hcl.service;&lt;br /&gt;&lt;br /&gt;import com.hcl.dao.DAOIntf;&lt;br /&gt;import com.hcl.model.UserInfo;&lt;br /&gt;&lt;br /&gt;public class DAOServiceImpl implements DAOServiceIntf {&lt;br /&gt;&lt;br /&gt;private DAOIntf daoInft;&lt;br /&gt;&lt;br /&gt;public boolean isUserExists(UserInfo userInfo){&lt;br /&gt;return daoInft.isUserExists(userInfo);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public DAOIntf getDaoInft() {&lt;br /&gt;return daoInft;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setDaoInft(DAOIntf daoInft) {&lt;br /&gt;this.daoInft = daoInft;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Result (JSP) Pages&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Login.jsp&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@page contentType="text/html" pageEncoding="UTF-8"%&amp;gt;&lt;br /&gt;&amp;lt;%@taglib prefix="s" uri="/struts-tags" %&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&lt;br /&gt;"http://www.w3.org/TR/html4/loose.dtd"&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;s:form name="LoginForm" action="Login" method="post" &amp;gt;&lt;br /&gt;&amp;lt;table&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;s:text name="User Name :"/&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;s:textfield name="userName" /&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;s:text name="Password :"/&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;s:password name="password"/&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td colspan="2" align="center"&amp;gt;&lt;br /&gt;&amp;lt;s:submit name="Login" value="Login" align="center"/&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/s:form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Success.jsp&lt;br /&gt;&lt;/strong&gt;&lt;?xml:namespace prefix = s /&gt;&lt;s:property value="userName"&gt;&lt;/s:property&gt;&lt;/p&gt;&lt;p&gt;&lt;s:property value="userName"&gt;&amp;lt;%@page contentType="text/html" pageEncoding="UTF-8"%&amp;gt;&lt;br /&gt;&amp;lt;%@taglib prefix="s" uri="/struts-tags" %&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&lt;br /&gt;"http://www.w3.org/TR/html4/loose.dtd"&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;User &amp;lt;s:property value="userName"/&amp;gt; logged successfully.&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/s:property&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;s:property value="userName"&gt;&lt;p&gt;&lt;strong&gt;Deployment Folder Structure (&lt;/strong&gt;&lt;em&gt; NetBeans 6.5 IDE takes care most of the file location. &lt;/em&gt;)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Java Source Code:&lt;/strong&gt; No need to place class/jar files in WEB-INF/classes or WEB-INF/lib. IDE takes care about it.&lt;br /&gt;&lt;strong&gt;xml Files:&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_nrgl1ONMLxc/ShedcYFhNdI/AAAAAAAAABI/0cNVH37mnMc/s1600-h/FolderStructure.gif"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 294px; DISPLAY: block; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5338908994098509266" border="0" alt="" src="http://4.bp.blogspot.com/_nrgl1ONMLxc/ShedcYFhNdI/AAAAAAAAABI/0cNVH37mnMc/s320/FolderStructure.gif" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;If everything goes fine then: URL To Access web Application:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://localhost:8080/ssi/jsp/Login.jsp"&gt;http://localhost:8080/ssi/jsp/Login.jsp&lt;/a&gt; &lt;/s:property&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4034650153155250265-6074676521962312577?l=javatales.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javatales.blogspot.com/feeds/6074676521962312577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javatales.blogspot.com/2009/05/how-to-integrate-struts-2springibatis.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/6074676521962312577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4034650153155250265/posts/default/6074676521962312577'/><link rel='alternate' type='text/html' href='http://javatales.blogspot.com/2009/05/how-to-integrate-struts-2springibatis.html' title='How to integrate: Struts 2+Spring+iBatis (NetBeans 6.5)'/><author><name>Badal</name><uri>http://www.blogger.com/profile/02123343870010628157</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_nrgl1ONMLxc/ShdQWxVHOvI/AAAAAAAAAAU/U3A2YFQzZ0g/S220/DSC01937.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_nrgl1ONMLxc/SheMRP139hI/AAAAAAAAABA/ZUULpj_b2lg/s72-c/CreateProject.gif' height='72' width='72'/><thr:total>1</thr:total></entry></feed>
