<?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-6261147517378835063</id><updated>2011-07-30T16:22:16.939-07:00</updated><category term='Tomcat'/><category term='decimal to unicode'/><category term='drop down'/><category term='ibatis time java'/><category term='mod_headers'/><category term='unicode'/><category term='MS Office 2007'/><category term='hexadecimal'/><category term='Apache'/><category term='gzip'/><category term='YUI Paginator skin customize controls javascript css'/><category term='decimal'/><category term='zip'/><title type='text'>Little tech thoughts</title><subtitle type='html'>The realization that I have been receiving too much from the community, but contributing nothing, made me start this blog, to share the little knowledge I have with others. I would be happy if at least one person benefits from this blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://littletechthoughts.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://littletechthoughts.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dandy</name><uri>http://www.blogger.com/profile/16538475596851241121</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6261147517378835063.post-7038870709384825398</id><published>2010-08-19T01:36:00.000-07:00</published><updated>2010-08-19T01:36:30.265-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='YUI Paginator skin customize controls javascript css'/><title type='text'>Customize YUI 2 Paginator</title><content type='html'>By default, YUI 2 Paginator renders the control elements as shown below - &lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_vD5N0nVlbQg/TGzmyb4pO-I/AAAAAAAAD2Y/CRz2z4N-tkg/s1600/paginator.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" ox="true" src="http://1.bp.blogspot.com/_vD5N0nVlbQg/TGzmyb4pO-I/AAAAAAAAD2Y/CRz2z4N-tkg/s320/paginator.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You may want to use images for the control elements instead of the text like "first", "last". &lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_vD5N0nVlbQg/TGzoAjVvQoI/AAAAAAAAD2g/He1ZiOupl1M/s1600/new+paginator.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" ox="true" src="http://4.bp.blogspot.com/_vD5N0nVlbQg/TGzoAjVvQoI/AAAAAAAAD2g/He1ZiOupl1M/s320/new+paginator.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This can be achieved in the following way.&lt;br /&gt;&lt;br /&gt;While creating the paginator, provide some additional parameters (shown in red font below).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;var paginator = new YAHOO.widget.Paginator({ rowsPerPage:ROWS_PER_PAGE, &lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;firstPageLinkLabel: "&amp;nbsp;", &lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;nextPageLinkLabel: "&amp;nbsp;", &lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;lastPageLinkLabel: "&amp;nbsp;", &lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;previousPageLinkLabel: "&amp;nbsp;", &lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;template : "{FirstPageLink} {PreviousPageLink} Page {CurrentPageReport} {NextPageLink} {LastPageLink}",&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;containers : ['pagingDiv', 'pagingDiv2'] })&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;You should have image icons for&amp;nbsp;First, Previous, Next and Last. You need to have one set of icons for Active controls and another set for Disabled controls.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_vD5N0nVlbQg/TGzso0tJIhI/AAAAAAAAD2o/2DZzxcOyZJg/s1600/icons.gif" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" ox="true" src="http://3.bp.blogspot.com/_vD5N0nVlbQg/TGzso0tJIhI/AAAAAAAAD2o/2DZzxcOyZJg/s320/icons.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then you need to use the following CSS styles - &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;.yui-pg-first{background: transparent url(first_ico.gif) no-repeat; width:19px}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;.yui-pg-last{background: transparent url(last_ico.gif) no-repeat; width:19px}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;.yui-pg-next{background: transparent url(next.gif) no-repeat; width:19px}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;.yui-pg-previous{background: transparent url(prev.gif) no-repeat; width:19px}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;.yui-skin-sam span.yui-pg-first {background: transparent url(firstfade_ico.gif) no-repeat; width:19px}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;.yui-skin-sam span.yui-pg-last {background: transparent url(lastfade_ico.gif) no-repeat; width:19px}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;.yui-skin-sam span.yui-pg-next {background: transparent url(nextfade.gif) no-repeat; width:19px}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;.yui-skin-sam span.yui-pg-previous {background: transparent url(prevfade_ico.gif) no-repeat; width:19px}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;.yui-skin-sam a.yui-pg-first:link, .yui-skin-sam a.yui-pg-first:visited, .yui-skin-sam a.yui-pg-first:active, .yui-skin-sam a.yui-pg-first:hover, .yui-skin-sam a.yui-pg-previous:link, .yui-skin-sam a.yui-pg-previous:visited, .yui-skin-sam a.yui-pg-previous:active, .yui-skin-sam a.yui-pg-previous:hover, .yui-skin-sam a.yui-pg-next:link, .yui-skin-sam a.yui-pg-next:visited, .yui-skin-sam a.yui-pg-next:active, .yui-skin-sam a.yui-pg-next:hover, .yui-skin-sam a.yui-pg-last:link, .yui-skin-sam a.yui-pg-last:visited, .yui-skin-sam a.yui-pg-last:active, .yui-skin-sam a.yui-pg-last:hover, .yui-skin-sam a.yui-pg-page:link, .yui-skin-sam a.yui-pg-page:visited, .yui-skin-sam a.yui-pg-page:active, .yui-skin-sam a.yui-pg-page:hover&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;{text-decoration: none}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Courier New;"&gt;Make sure that you give the correct image name for each element.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6261147517378835063-7038870709384825398?l=littletechthoughts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littletechthoughts.blogspot.com/feeds/7038870709384825398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://littletechthoughts.blogspot.com/2010/08/customize-yui-2-paginator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/7038870709384825398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/7038870709384825398'/><link rel='alternate' type='text/html' href='http://littletechthoughts.blogspot.com/2010/08/customize-yui-2-paginator.html' title='Customize YUI 2 Paginator'/><author><name>Dandy</name><uri>http://www.blogger.com/profile/16538475596851241121</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_vD5N0nVlbQg/TGzmyb4pO-I/AAAAAAAAD2Y/CRz2z4N-tkg/s72-c/paginator.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6261147517378835063.post-5649288177466705538</id><published>2010-03-26T10:06:00.000-07:00</published><updated>2010-03-26T10:14:03.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ibatis time java'/><title type='text'>IBATIS does not insert TIME component</title><content type='html'>&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;I found that IBATIS was not inserting the TIME component of the date field into the Oracle database. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;I had the following configuration in the SqlMap. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Under &lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;resultMap&lt;/span&gt;&lt;resultmap&gt;, the column was mapped as given below - &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;lt;result column="DATE_OF_CREATION" jdbcType="TIMESTAMP" property="dateOfCreation"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;The insert statement was as below -&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;insert id="person_insert" parameterclass="Person"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;insert id="person_insert" parameterclass="Person"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;/insert&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;lt;insert id="person_insert" parameterClass="Person"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;insert into PERSON (NAME, DOB)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;values (#name:VARCHAR#, #dateOfCreation:DATE#)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;lt;/insert&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;After a lot of debugging, I found that the problem was because of using "DATE" as the jdbcType. The JDBC "DATE" data type stores only the year, month and day.&lt;/span&gt; &lt;br /&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;&lt;span style="font-family: Arial; font-size: x-small;"&gt;I changed "DATE" to "TIMESTAMP" in both the places and it started working.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6261147517378835063-5649288177466705538?l=littletechthoughts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littletechthoughts.blogspot.com/feeds/5649288177466705538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://littletechthoughts.blogspot.com/2010/03/ibatis-does-not-insert-time-component.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/5649288177466705538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/5649288177466705538'/><link rel='alternate' type='text/html' href='http://littletechthoughts.blogspot.com/2010/03/ibatis-does-not-insert-time-component.html' title='IBATIS does not insert TIME component'/><author><name>Dandy</name><uri>http://www.blogger.com/profile/16538475596851241121</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6261147517378835063.post-3513734805822750174</id><published>2009-02-19T22:30:00.000-08:00</published><updated>2009-02-20T01:43:59.490-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='decimal to unicode'/><category scheme='http://www.blogger.com/atom/ns#' term='decimal'/><category scheme='http://www.blogger.com/atom/ns#' term='drop down'/><category scheme='http://www.blogger.com/atom/ns#' term='unicode'/><category scheme='http://www.blogger.com/atom/ns#' term='hexadecimal'/><title type='text'>Unicode character to decimal and Hexadecimal conversions, and rendering decimal using javascript</title><content type='html'>&lt;span style="font-size:+0;"&gt;If you need to develop web pages in languages which cannot be represented by ASCII characters alone (like Arabic language), you have use encodings like UTF-8. The HTML page can be set the correct encoding using the META tag -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the charset is set correctly, advanced editors lets you directly type in the contents in the language you want. Otherwise the language contents will appear as question marks or squares. If for some reason you cannot change the charset of your HTML, you will have to enter the language content in the decimal or hexadecimal notation. While rendering the page, the browser will display the content correctly.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Unicode to Decimal/Hexadecimal&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The conversion of a string from a language to the decimal or hexadecimal format can be done in a few ways -&lt;br /&gt;&lt;br /&gt;1) Create/Paste the language contents in Microsoft Word or Excel. Save the page as "Web page (*.htm, *.html)". Now view the saved page in notepad. You can see the language contents in decimal format. (A sample decimal format is &amp;amp;#1575;&amp;amp;#1604;&amp;amp;#1605;&amp;amp;#1585;&amp;amp;#1575;&amp;amp;#1576;&amp;amp;#1593;)&lt;br /&gt;&lt;br /&gt;2) Use dreamweaver for editing the page. It automatically does the conversion to decimal.&lt;br /&gt;&lt;br /&gt;3) Use this page - http://code.cside.com/3rdpage/us/unicode/converter.html. (This page can do the reverse also)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Decimal/Hex rendering problem while using javascript&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In some scenarios, the browsers will not render the Decimal/Hexadecimal correctly to display in the language we want. Instead the browsers display the content as Decimal/Hexadecimal itself.&lt;br /&gt;&lt;br /&gt;E.g. You want to populate a drop down using a javascript function. The function looks like this -&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:+0;"&gt;&lt;span style="font-family:courier new;"&gt;function populateCombo(values){ &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:+0;"&gt;&lt;span style="font-family:courier new;"&gt;for(i=0;i&lt;values.length;i++){&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:+0;"&gt;&lt;span style="font-family:courier new;"&gt;myCombo.options[i] = new Option(values[i], values[i]); &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:+0;"&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:+0;"&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where "values" is a string array. If "values" contained Decimal/Hexadecimal characters, then the browser displays the Decimal/Hexadecimal itself instead of the actual string.&lt;br /&gt;&lt;br /&gt;e.g.&lt;br /&gt;values= new Array('&amp;amp;#1575;&amp;amp;#1604;&amp;amp;#1605;&amp;amp;#1585;&amp;amp;#1575;&amp;amp;#1576;&amp;amp;#1593;',&lt;br /&gt;'&amp;amp;#1575;&amp;amp;#1604;&amp;amp;#1593;&amp;amp;#1585;&amp;amp;#1576;&amp;amp;#1610;&amp;amp;#1577;');&lt;br /&gt;&lt;br /&gt;To overcome this problem we need a small javascript method -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;function decimal2Unicode(decimalValue){&lt;br /&gt;var elem = document.createElement("div");&lt;br /&gt;elem.innerHTML = str;&lt;br /&gt;return elem.firstChild.data;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now, the drop down can be populated like -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;myCombo.options[i] = new Option(decimal2Unicode(values[i]), decimal2Unicode(values[i]));&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The drop down would display the string correctly now. &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:+0;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6261147517378835063-3513734805822750174?l=littletechthoughts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littletechthoughts.blogspot.com/feeds/3513734805822750174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://littletechthoughts.blogspot.com/2009/02/unicode-character-to-decimal-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/3513734805822750174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/3513734805822750174'/><link rel='alternate' type='text/html' href='http://littletechthoughts.blogspot.com/2009/02/unicode-character-to-decimal-and.html' title='Unicode character to decimal and Hexadecimal conversions, and rendering decimal using javascript'/><author><name>Dandy</name><uri>http://www.blogger.com/profile/16538475596851241121</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6261147517378835063.post-8884314500781900243</id><published>2009-02-03T07:01:00.000-08:00</published><updated>2009-02-03T07:11:29.620-08:00</updated><title type='text'>/usr/lib/libexpat.so: could not read symbols: File in wrong format</title><content type='html'>I was trying to compile Apache in CentOS 4.2, 64 bit machine and the "make" command failed with the error message - &lt;span style="font-family:courier new;"&gt;/usr/lib/libexpat.so: could not read symbols: File in wrong format. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The problem was the &lt;span style="font-family:courier new;"&gt;/usr/lib/libexpat.so&lt;/span&gt; was meant for 32 bit machines and my machine was 64 bit. The correct&lt;span style="font-family:courier new;"&gt; libexpat.so&lt;/span&gt; was present in&lt;span style="font-family:courier new;"&gt; /usr/&lt;strong&gt;lib64&lt;/strong&gt;/libexpat.so&lt;/span&gt;. So I backed up the &lt;span style="font-family:courier new;"&gt;/usr/lib/libexpat.so&lt;/span&gt; and created a symbolic link to point to the 64 bit libexpat.so -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;ln -s /usr/lib64/libexpat.so /usr/lib/libexpat.so&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That did the trick.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6261147517378835063-8884314500781900243?l=littletechthoughts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littletechthoughts.blogspot.com/feeds/8884314500781900243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://littletechthoughts.blogspot.com/2009/02/usrliblibexpatso-could-not-read-symbols.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/8884314500781900243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/8884314500781900243'/><link rel='alternate' type='text/html' href='http://littletechthoughts.blogspot.com/2009/02/usrliblibexpatso-could-not-read-symbols.html' title='/usr/lib/libexpat.so: could not read symbols: File in wrong format'/><author><name>Dandy</name><uri>http://www.blogger.com/profile/16538475596851241121</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6261147517378835063.post-7049100573087731668</id><published>2009-02-03T05:37:00.000-08:00</published><updated>2009-02-03T06:06:33.367-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mod_headers'/><category scheme='http://www.blogger.com/atom/ns#' term='gzip'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration</title><content type='html'>I was trying to enable gzip compression in apache with the help from the link &lt;a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html"&gt;http://httpd.apache.org/docs/2.0/mod/mod_deflate.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The apache I had was compiled from source. So I had to recompile Apache with the extra configuration parameter "--&lt;span style="font-family:courier new;"&gt;enable-deflate&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;After modifying the httpd.conf as mentioned in the above link, I restarted Apache and got this error - "&lt;span style="font-family:courier new;"&gt;Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration&lt;/span&gt;". When I commented the line "&lt;span style="font-family:courier new;"&gt;Header append Vary User-Agent env=!dont-vary&lt;/span&gt;" and restarted Apache, it worked. The gzip compression in Apache worked fine.&lt;br /&gt;&lt;br /&gt;But I wanted to enable "&lt;span style="font-family:courier new;"&gt;Header append Vary User-Agent env=!dont-vary&lt;/span&gt;" because that would make sure that proxies don't deliver the wrong content.&lt;br /&gt;&lt;br /&gt;The error message "&lt;span style="font-family:courier new;"&gt;Invalid command 'Header'&lt;/span&gt;" appeared because the Apache module &lt;span style="font-family:courier new;"&gt;mod_headers&lt;/span&gt; was not enabled. To enable mod_headers, I had to recompile Apache with the configuration parameter "&lt;span style="font-family:courier new;"&gt;--enable-headers&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;If you installed Apache from a build, then you will have to add the line&lt;br /&gt;&lt;strong&gt;&lt;span style="font-family:courier new;"&gt;LoadModule headers_module modules/mod_headers.so&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;in httpd.conf.&lt;br /&gt;&lt;br /&gt;The list of configuration parameters can be seen at &lt;a href="http://httpd.apache.org/docs/2.0/programs/configure.html"&gt;http://httpd.apache.org/docs/2.0/programs/configure.html&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6261147517378835063-7049100573087731668?l=littletechthoughts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littletechthoughts.blogspot.com/feeds/7049100573087731668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://littletechthoughts.blogspot.com/2009/02/invalid-command-header-perhaps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/7049100573087731668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/7049100573087731668'/><link rel='alternate' type='text/html' href='http://littletechthoughts.blogspot.com/2009/02/invalid-command-header-perhaps.html' title='Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration'/><author><name>Dandy</name><uri>http://www.blogger.com/profile/16538475596851241121</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6261147517378835063.post-7680107342683291080</id><published>2009-01-21T00:10:00.000-08:00</published><updated>2009-01-21T22:23:13.436-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MS Office 2007'/><category scheme='http://www.blogger.com/atom/ns#' term='zip'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><title type='text'>IE changes docx, xlsx, pptx to zip while downloading</title><content type='html'>Microsoft Office 2007 has introduced some new file formats like docx, xlsx, pptx etc. One docx/xlsx/pptx file is actually a collection of many files, stored in an archive (zip-file).&lt;br /&gt;&lt;br /&gt;When these files are downloaded by the Internet Explorer from a webserver, the extension of the file may be changed to "zip". (To open this file, you just need to change the extension to the correct one)&lt;br /&gt;&lt;br /&gt;This problem can be fixed at the webserver level by adding the MIME type of the new extensions.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;For Tomcat, add the MIME types in the conf/web.xml file, as given below.&lt;/b&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&amp;#60;mime-mapping&amp;#62;&lt;br /&gt; &amp;#60;extension&amp;#62;docx&amp;#60;/extension&amp;#62;&lt;br /&gt; &amp;#60;mime-type&amp;#62;application/vnd.openxmlformats-officedocument.wordprocessingml.document&amp;#60;/mime-type&amp;#62;&lt;br /&gt;&amp;#60;/mime-mapping&amp;#62;&lt;br /&gt;&lt;br /&gt;&amp;#60;mime-mapping&amp;#62;&lt;br /&gt; &amp;#60;extension&amp;#62;xlsx&amp;#60;/extension&amp;#62;&lt;br /&gt; &amp;#60;mime-type&amp;#62;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&amp;#60;/mime-type&amp;#62;&lt;br /&gt;&amp;#60;/mime-mapping&amp;#62;&lt;br /&gt;&lt;br /&gt;&amp;#60;mime-mapping&amp;#62;&lt;br /&gt; &amp;#60;extension&amp;#62;pptx&amp;#60;/extension&amp;#62;&lt;br /&gt; &amp;#60;mime-type&amp;#62;application/vnd.openxmlformats-officedocument.presentationml.presentation&amp;#60;/mime-type&amp;#62;&lt;br /&gt;&amp;#60;/mime-mapping&amp;#62;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For Apache, add the MIME types in the conf/httpd.conf file, as given below -&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx&lt;br /&gt;AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx&lt;br /&gt;AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6261147517378835063-7680107342683291080?l=littletechthoughts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://littletechthoughts.blogspot.com/feeds/7680107342683291080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://littletechthoughts.blogspot.com/2009/01/ie-changes-docx-xlsx-pptx-to-zip-while.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/7680107342683291080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6261147517378835063/posts/default/7680107342683291080'/><link rel='alternate' type='text/html' href='http://littletechthoughts.blogspot.com/2009/01/ie-changes-docx-xlsx-pptx-to-zip-while.html' title='IE changes docx, xlsx, pptx to zip while downloading'/><author><name>Dandy</name><uri>http://www.blogger.com/profile/16538475596851241121</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
