<?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-9109912314086109474</id><updated>2011-11-27T16:21:56.443-08:00</updated><title type='text'>My old Blog</title><subtitle type='html'>In passion4java blog you may expect the following content:
Hello World Program for New Java API,

Updates on Productivity Tools for Java Developers,

Refresh on Basic Algorithms with simple examples,

Refresh on Data Structure, with simple examples,

Finally we help users of this blog, if they want to know any information or tutorials about Java Concepts or any New Java API's.


We are here to share our Knowledge and to help our Open Source Community.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9109912314086109474.post-1834855053760277117</id><published>2009-10-08T05:30:00.000-07:00</published><updated>2009-10-08T05:32:24.616-07:00</updated><title type='text'>Easy way to keep your Blog and Twitter up-to-date.</title><content type='html'>I was thinking how can I keep my blog and my twitter up-to-date, if I add any new post in my blog and I have to come back to twitter to do the same.&lt;br /&gt;This is a redundant work which I have to do. Today when I was searching in the net found a cool web application which will update your twitter accounts if any update is made in your blogs.&lt;br /&gt;The way it works is it takes your RSS feeds of your blog and understands the updates based on that it updates your twitter account.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://twitterfeed.com"&gt; twitterfeed&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Then I added follow me on twitter in blog ;)&lt;br /&gt;Try if you like it :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9109912314086109474-1834855053760277117?l=passionsoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/1834855053760277117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9109912314086109474&amp;postID=1834855053760277117' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/1834855053760277117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/1834855053760277117'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/2009/10/easy-way-to-keep-your-blog-and-twitter.html' title='Easy way to keep your Blog and Twitter up-to-date.'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9109912314086109474.post-4646952367110190602</id><published>2009-10-07T05:28:00.000-07:00</published><updated>2009-10-07T05:29:17.483-07:00</updated><title type='text'>How can we track from where user started to access your Web Application?</title><content type='html'>&lt;em&gt;Most of the time we want to know from where the user started to trigger our URL, most of the time it will via of google.com. It terms of marketing a product its very important to know how the URL was triggered...I was think the only way is to add the reference as a request parameter, but there is also another option is available in HTTP header fields.&lt;br /&gt;&lt;br /&gt;Referer Header Field:&lt;br /&gt;&lt;br /&gt;This field in the header object will give you the web page URL from which you application was triggered.&lt;br /&gt;Below code in java will give you the reference URL.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;String refUrl = request.getHeader("referer");&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9109912314086109474-4646952367110190602?l=passionsoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/4646952367110190602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9109912314086109474&amp;postID=4646952367110190602' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/4646952367110190602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/4646952367110190602'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/2009/10/how-can-we-track-from-where-user.html' title='How can we track from where user started to access your Web Application?'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9109912314086109474.post-2864769510285641726</id><published>2009-10-06T04:44:00.001-07:00</published><updated>2009-10-06T04:45:05.834-07:00</updated><title type='text'>Is there any difference between java.lang.NoClassDefFoundError and  java.lang.ClassNotFoundException ?</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#00B050"&gt;When we started learning java most of time we may come across java.lang.ClassNotFoundException when we try to run some simple programs. Later we found that this error was throwing due to the class was not in the jvm class-path.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#00B050; mso-bidi-font-weight:bold"&gt;java.lang.NoClassDefFoundError will be thrown when the class was loaded and it cannot be initialized properly. As JVM can find the classes in the class-path and it cannot create a Class object of the class which is loaded.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#00B050"&gt;Below are few scenarios where the class initializing may throw exception.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpFirst" style="text-indent:-.25in;mso-list:l0 level1 lfo1"&gt;&lt;span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol;color:black"&gt;&lt;span style="mso-list:Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#00B050"&gt;When a exception was thrown inside the static block of the class.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="margin-left:1.0in;mso-add-space: auto;text-indent:-.25in;mso-list:l0 level2 lfo1"&gt;&lt;span style="font-family:&amp;quot;Courier New&amp;quot;;mso-fareast-font-family:&amp;quot;Courier New&amp;quot;; color:#00B050"&gt;&lt;span style="mso-list:Ignore"&gt;o&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#00B050"&gt;The reason is the static block is executed when the Class object is getting loaded, if any error occurs it can't be initialized.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="text-indent:-.25in;mso-list:l0 level1 lfo1"&gt;&lt;span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family: Symbol;color:black"&gt;&lt;span style="mso-list:Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#00B050"&gt;Any Exception was thrown when initialing a static variable of the class.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpLast" style="margin-left:1.0in;mso-add-space:auto; text-indent:-.25in;mso-list:l0 level2 lfo1"&gt;&lt;span style="font-family:&amp;quot;Courier New&amp;quot;;mso-fareast-font-family:&amp;quot;Courier New&amp;quot;; color:#00B050"&gt;&lt;span style="mso-list:Ignore"&gt;o&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#00B050"&gt;The reason remains same as static block. It also getting executed during Class load.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#00B050"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#00B050"&gt;Then the morel of the story is when the class was not properly initialized then we will get &lt;span style="mso-bidi-font-weight:bold"&gt;java.lang.NoClassDefFoundError, mainly due the static blocks and static variables.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;u&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#00B050;mso-bidi-font-weight:bold"&gt;Simple Example which will throw java.lang.NoClassDefFoundError..&lt;/span&gt;&lt;/u&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050; mso-bidi-font-weight:bold"&gt;package&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt; &lt;a href="http://passionsoft.bloggerspot.com"&gt;passionsoft.bloggerspot.com&lt;/a&gt;;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050; mso-bidi-font-weight:bold"&gt;public&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt; &lt;span style="mso-bidi-font-weight: bold"&gt;class&lt;/span&gt; AnotherClass {&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;static&lt;/span&gt; &lt;span style="background:silver;mso-highlight:silver"&gt;String&lt;/span&gt; &lt;i&gt;test&lt;/i&gt; = &amp;quot;new&amp;quot;;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;static&lt;/span&gt; AnotherClass &lt;i&gt;staticObject&lt;/i&gt; = &lt;span style="mso-bidi-font-weight: bold"&gt;new&lt;/span&gt; AnotherClass();&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;public&lt;/span&gt; AnotherClass() {&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:2"&gt;                   &lt;/span&gt;&lt;span style="background:silver; mso-highlight:silver"&gt;String&lt;/span&gt; a = &lt;span style="mso-bidi-font-weight:bold"&gt;null&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:2"&gt;                   &lt;/span&gt;a.length();&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family: &amp;quot;Courier New&amp;quot;;color:#00B050"&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050; mso-bidi-font-weight:bold"&gt;package&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt; &lt;a href="http://passionsoft.bloggerspot.com"&gt;passionsoft.bloggerspot.com&lt;/a&gt;;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050; mso-bidi-font-weight:bold"&gt;public&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt; &lt;span style="mso-bidi-font-weight: bold"&gt;class&lt;/span&gt; SimpleTest {&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;public&lt;/span&gt; &lt;span style="mso-bidi-font-weight:bold"&gt;static&lt;/span&gt; &lt;span style="mso-bidi-font-weight:bold"&gt;void&lt;/span&gt; main(String[] args) {&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:2"&gt;                   &lt;/span&gt;AnotherClass a= &lt;span style="mso-bidi-font-weight:bold"&gt;null&lt;/span&gt;;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:2"&gt;                   &lt;/span&gt;&lt;span style="mso-bidi-font-weight: bold"&gt;try&lt;/span&gt; {&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:3"&gt;                             &lt;/span&gt;a = AnotherClass.&lt;i&gt;staticObject&lt;/i&gt;;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:2"&gt;                   &lt;/span&gt;} &lt;span style="mso-bidi-font-weight: bold"&gt;catch&lt;/span&gt; (Error e) {&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:3"&gt;                             &lt;/span&gt;e.printStackTrace();&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:2"&gt;                   &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:2"&gt;                   &lt;/span&gt;System.&lt;i&gt;out&lt;/i&gt;.println(AnotherClass.&lt;i&gt;test&lt;/i&gt;);&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:#00B050"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family: &amp;quot;Courier New&amp;quot;;color:#00B050"&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family: &amp;quot;Courier New&amp;quot;;color:#00B050"&gt;When SimpleTest calles the "AnotherClass.staticObject" the class get loaded and the static variable staticObject calles the constructor where the initialization failes… below is the error trace&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:red"&gt;java.lang.ExceptionInInitializerError&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:red"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;at passionsoft.bloggerspot.com.SimpleTest.main(&lt;u&gt;SimpleTest.java:11&lt;/u&gt;)&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:red"&gt;Caused by: &lt;u&gt;java.lang.NullPointerException&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:red"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;at passionsoft.bloggerspot.com.AnotherClass.&amp;lt;init&amp;gt;(&lt;u&gt;AnotherClass.java:12&lt;/u&gt;)&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:red"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;at passionsoft.bloggerspot.com.AnotherClass.&amp;lt;clinit&amp;gt;(&lt;u&gt;AnotherClass.java:7&lt;/u&gt;)&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:red"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;... 1 more&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:red"&gt;Exception in thread &amp;quot;main&amp;quot; java.lang.NoClassDefFoundError&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;;color:red"&gt;&lt;span style="mso-tab-count:1"&gt;          &lt;/span&gt;at passionsoft.bloggerspot.com.SimpleTest.main(&lt;u&gt;SimpleTest.java:19&lt;/u&gt;)&lt;/span&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family:&amp;quot;Courier New&amp;quot;; color:#00B050"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-bidi-font-family: &amp;quot;Courier New&amp;quot;;color:#00B050"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;u&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black;mso-themecolor:text1; background:yellow;mso-highlight:yellow"&gt;As per my understanding I can think only two scenarios when the &lt;span style="mso-bidi-font-weight:bold"&gt;java.lang.NoClassDefFoundError was thrown if you guys know some more scenarios please update the comments.:)&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;b&gt;&lt;u&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black;mso-themecolor:text1"&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#00B050; mso-bidi-font-weight:bold"&gt; &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9109912314086109474-2864769510285641726?l=passionsoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/2864769510285641726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9109912314086109474&amp;postID=2864769510285641726' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/2864769510285641726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/2864769510285641726'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/2009/10/is-there-any-difference-between_5539.html' title='Is there any difference between java.lang.NoClassDefFoundError and  java.lang.ClassNotFoundException ?'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9109912314086109474.post-7330606737868103526</id><published>2009-10-05T01:00:00.001-07:00</published><updated>2009-10-05T01:00:48.526-07:00</updated><title type='text'>Great Add-ons for Mobile Testing</title><content type='html'>&lt;p class="MsoNormal"&gt;When you want to change your User-Agent name of your Browser (its nothing but your browser name which sent to the server on every request) you can use the &amp;quot;&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/59"&gt;User Agent Switcher&lt;/a&gt;&amp;quot; Add-ons of Fire fox to change your user-agent....&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;u&gt;What is the Special about Changing User-Agent?&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The &amp;quot;User-Agent&amp;quot; is the only way (as of I know) the server come to know from which browser the user was triggered this request, based on that server may change its display logic...&lt;/p&gt;  &lt;p class="MsoNormal"&gt;If you try &lt;a href="http://google.com"&gt;google.com&lt;/a&gt; from your mobile, you will see a different version as compared to your &lt;a href="http://google.com"&gt;google.com&lt;/a&gt; from your web browser (IE or Mozilla), that difference. If you are a mobile developer want to know how the data are displayed for a Specific model you can give the user agent string of that Mobile then trigger the request.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;For Example when you change your user-agent as "&lt;span class="apple-style-span"&gt;&lt;span style="font-size:8.5pt;line-height:115%; font-family:&amp;quot;Courier New&amp;quot;;color:#333333"&gt;BlackBerry8800/4.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/100&lt;/span&gt;&lt;/span&gt;" and hit from you Fire-fox browser, the content will be displayed as it was seen in Blackberry 8800 Mobile…&lt;/p&gt;  &lt;p class="MsoNormal"&gt;These Very good Add-ons if you need to test with different mobile devices (as I do right now)…&lt;span style="font-family:Wingdings; mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;mso-hansi-font-family: Calibri;mso-hansi-theme-font:minor-latin;mso-char-type:symbol;mso-symbol-font-family: Wingdings"&gt;&lt;span style="mso-char-type:symbol;mso-symbol-font-family:Wingdings"&gt;J&lt;/span&gt;&lt;/span&gt;.. Please feel free to add your comments ….&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9109912314086109474-7330606737868103526?l=passionsoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/7330606737868103526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9109912314086109474&amp;postID=7330606737868103526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/7330606737868103526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/7330606737868103526'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/2009/10/great-add-ons-for-mobile-testing.html' title='Great Add-ons for Mobile Testing'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9109912314086109474.post-3880183565602089103</id><published>2009-09-07T04:49:00.001-07:00</published><updated>2009-09-07T04:49:50.476-07:00</updated><title type='text'>http://freelancefolder.com/</title><content type='html'>If you are looking to start freelancing as i do, then &lt;a href="http://freelancefolder.com/"&gt;http://freelancefolder.com/&lt;/a&gt; will help you. Lots of article about freelancing and their + and -.... Check this out if you have time :) &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9109912314086109474-3880183565602089103?l=passionsoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/3880183565602089103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9109912314086109474&amp;postID=3880183565602089103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/3880183565602089103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/3880183565602089103'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/2009/09/httpfreelancefoldercom.html' title='http://freelancefolder.com/'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9109912314086109474.post-8348106789438411467</id><published>2009-09-06T04:46:00.000-07:00</published><updated>2009-09-06T04:52:00.373-07:00</updated><title type='text'>Eclipse is here to Help You.</title><content type='html'>I came across a website where they are refering about the increasing the productivity by using eclipse tools. i really felt good in reading ......Most of the time we do redoing things without knowing is there any better way to do that..... I hope this Article willl decrease atleast a 5 min of your time during debugging&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.certpal.com/blogs/2009/08/better-productivity-with-eclipse-part-1/"&gt;Better productivity with eclipse Part 01&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;a href="http://www.certpal.com/blogs/2009/09/better-productivity-with-eclipse-%e2%80%93-part-2/"&gt;Better productivity with eclipse Part 02&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please give your comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9109912314086109474-8348106789438411467?l=passionsoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/8348106789438411467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9109912314086109474&amp;postID=8348106789438411467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/8348106789438411467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/8348106789438411467'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/2009/09/eclipse-is-here-to-help-you.html' title='Eclipse is here to Help You.'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9109912314086109474.post-1659299300734939661</id><published>2009-08-28T00:39:00.001-07:00</published><updated>2009-08-28T00:39:45.513-07:00</updated><title type='text'>JavaRanch.com</title><content type='html'>&lt;div&gt;If you have not tried &amp;quot;&lt;a href="http://javaranch.com"&gt;javaranch.com&lt;/a&gt;&amp;quot;, then you reallly miss some great help in your java learnings. This is a forum site where you will find the best people who will help you in your problems which you are facing day to day. i was loving this site and i was using it from last 3 years. Try it you fell worth :)&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9109912314086109474-1659299300734939661?l=passionsoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/1659299300734939661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9109912314086109474&amp;postID=1659299300734939661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/1659299300734939661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/1659299300734939661'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/2009/08/javaranchcom.html' title='JavaRanch.com'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9109912314086109474.post-8717099955886741726</id><published>2009-08-11T06:54:00.000-07:00</published><updated>2009-08-11T06:59:02.951-07:00</updated><title type='text'>Try HTML2ASCII convector Utility</title><content type='html'>I was trying post some HTML content in my blog and found that blogger does't allow me if i add some HTML tags directly in the "Edit HTML" Section.. &lt;br /&gt;&lt;br /&gt;Then i searched google and found a online HTML2ASCII convector Utility which really helped me :)&lt;br /&gt;&lt;br /&gt;http://www.dynamicguru.com/tools/html.php&lt;br /&gt;&lt;br /&gt;Try it you really find useful when you needed and bookmark it if you like...&lt;br /&gt;&lt;br /&gt;Thanks a lot guys who was created this online tool :)&lt;br /&gt;&lt;br /&gt;see you later&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9109912314086109474-8717099955886741726?l=passionsoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/8717099955886741726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9109912314086109474&amp;postID=8717099955886741726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/8717099955886741726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/8717099955886741726'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/2009/08/try-html2ascii-convector-utility.html' title='Try HTML2ASCII convector Utility'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9109912314086109474.post-6009711268973141857</id><published>2009-08-11T06:41:00.000-07:00</published><updated>2009-08-11T06:54:03.594-07:00</updated><title type='text'>JSP Page encoding can’t be Dynamic?</title><content type='html'>Yesterday I had a interesting problem, I want to send page encoding as a dynamic attribute to the JSP pages. Currently all jsp’s we are using “UTF-8” encoding as hard coded string, but we want this to be dynamic and it should come from Server (or anywhere from java class ).&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ page language=&amp;quot;java&amp;quot; import=&amp;quot;java.text.*&amp;quot; pageEncoding=&amp;quot;UTF-8&amp;quot;%&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In above code snippets I was trying to inject the pageEncoding value as dynamic value (by using the evil Scriptlets) as below.&lt;br /&gt;&lt;br /&gt;&amp;lt;%@ page language=&amp;quot;java&amp;quot; import=&amp;quot;java.text.*&amp;quot; pageEncoding=&amp;quot;&amp;lt;%=pageEncodingString%&amp;gt;&amp;quot;%&amp;gt;&lt;br /&gt;&lt;br /&gt;But Eclipse was shouting that it was not valid pageEncoding value.Then I realized that in @page attribute you can’t give a Scriptlets value… I am not sure is there any other way we can achieve this ? ….&lt;br /&gt;&lt;br /&gt;I came to another way by searching google (as usual) , that nothing but adding a jsp-property-group attribute in &lt;jsp-config&gt; section (in web.xml file).&lt;br /&gt;&lt;br /&gt;&amp;lt;jsp-config&amp;gt; &amp;lt;jsp-property-group&amp;gt; &amp;lt;url-pattern&amp;gt;*.jsp&amp;lt;/url-pattern&amp;gt; &amp;lt;page-encoding&amp;gt;UTF-8&amp;lt;/page-encoding&amp;gt; &amp;lt;/jsp-property-group&amp;gt; &amp;lt;/jsp-config&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You know how above code snippets work? It’s quite simple . You don’t need to add the pageEncoding="UTF-8" attributes in @page directive for all your Jsp files. If you make changes here it will affect all you jsp’s (based on your url-pattern).&lt;br /&gt;Class : org.apache.jasper.compiler.JspConfig&lt;br /&gt;&lt;br /&gt;But this also doen’t serve my purpose, the reason I have to change the encoding value which coming the Backend layer. I gone little bit further and found that there is some apache API to get the values of jsp-config in java class. When I saw that API I can find only the get methods and not the set methods. So again that doesn’t serve my purpose.&lt;br /&gt;I still feel there should be some way to achieve this. If you guys have any thoughts please feel free post your replies here.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Finally welcome to my blog :)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9109912314086109474-6009711268973141857?l=passionsoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://passionsoft.blogspot.com/feeds/6009711268973141857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9109912314086109474&amp;postID=6009711268973141857' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/6009711268973141857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9109912314086109474/posts/default/6009711268973141857'/><link rel='alternate' type='text/html' href='http://passionsoft.blogspot.com/2009/08/jsp-page-encoding-cant-be-dynamic.html' title='JSP Page encoding can’t be Dynamic?'/><author><name>Mohammed Yousuff</name><uri>http://www.blogger.com/profile/14526931183353140286</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Kkk1D39CuX8/SVYX4yrILfI/AAAAAAAABMw/pJ7V4Drk-HY/S220/Yousuff+Face.jpg'/></author><thr:total>1</thr:total></entry></feed>
