<?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:blogger='http://schemas.google.com/blogger/2008' 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-898219774729135305</id><updated>2024-09-09T17:01:46.394-07:00</updated><title type='text'>Hidden Faces</title><subtitle type='html'>Discussed the hidden aspects of computer programming and enterprise application development.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mohitag80.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mohitag80.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mohit Agrawal</name><uri>http://www.blogger.com/profile/13865939734904527853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbHKPmR7YemBpnwoEIdOjzuneg_KxsidP5TRfFT71hhvx-Nse68JbDSXZ8D7GZYZ7N6lWzj2coAU7ZtlfSlLGWkn5AhPEtfxmrqGLdRJERuKjaxgNKj3LWdjnFFeyHQG4/s113/profile_pic.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-898219774729135305.post-5911748302367783421</id><published>2012-02-07T06:29:00.000-08:00</published><updated>2012-02-18T06:28:53.140-08:00</updated><title type='text'>Enabling certificate based authentication for web application in GlassFish Server</title><content type='html'>&lt;span style=&quot;font-family:arial;&quot;&gt;Authentication is a process which allows application servers to identify the users through various modes like asking for userid-password, or user certificates etc. In this article I will discuss the steps to follow to enable Certificate based client authentication for a web application. It is one of the most complicated way of authentication therefore I have split the whole process of enabling it into several steps and discussed each of them in detail.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;CLIENT-CERT authentication transmits the login information in an extremely secure form, using Public Key Certificates(PKC). A certificate is a digital document that at a minimum includes a Distinguished Name (DN) and an associated public key. The certificate is digitally signed by a trusted third party known as Certificate Authority (CA). CA vouches for authenticity of the certificate holder. Each principal in the transaction presents a certificate as its credentials. The recipient then validates the certificate&#39;s signature against its cache of known and trusted CA certificates. Two kinds of certificates associated in mutual authentication, a &quot;personal certificate&quot; identifies an end user in transaction and a &quot;server certificate&quot; identifies the service provider ie. server.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;br /&gt;In this article, I will discuss the steps to create digital certificate for client, storing it in  server truststore, and storing it in browser certificates list. Also will discuss the steps require to enable certificate based client authentication in IBM Websphere Application Server and deploying the  sample web application on server.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;font-size:100%;&quot; &gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Creating Self-Signed Certificates&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;br /&gt;We can create self-signed certificates with little effort using the keytool utility included with the Java Development Kit. Generating a self-signed certificate can be accomplished by typing the following command in the command line:&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 102);font-size:100%;&quot; &gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 51);font-size:100%;&quot; &gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;keytool -genkey -v -alias {aliasname} -keyalg RSA -storetype PKCS12 -keystore client_keystore.p12 -storepass {anypassword} -keypass {anypassword}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above command assumes that the keytool utility is in system PATH. This tool can be found under the &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;bin &lt;/span&gt;directory, under the directory where Java Development Kit is installed.&lt;br /&gt;&lt;br /&gt;Substitute the values for the &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;{anypassword}&lt;/span&gt; with your own password; both of these passwords must be same in order to successfully use the certificate to authenticate the client. You may choose any value for the &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;{aliasname}&lt;/span&gt; parameter. You may also choose any value for the -keystore parameter; however, the value must end with &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;.p12 &lt;/span&gt;, as this command generates a file that needs to be imported into web browser, and this file won&#39;t be recognized unless it has the &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;.p12&lt;/span&gt; extension.&lt;br /&gt;&lt;br /&gt;After entering this command from the command line, keytool will prompt for some information.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;  What is your first and last name?&lt;br /&gt;[Unknown]:  Mohit&lt;br /&gt;What is the name of your organizational unit?&lt;br /&gt;[Unknown]:  ISL&lt;br /&gt;What is the name of your organization?&lt;br /&gt;[Unknown]:  IBM&lt;br /&gt;What is the name of your City or Locality?&lt;br /&gt;[Unknown]:  Pune&lt;br /&gt;What is the name of your State or Province?&lt;br /&gt;[Unknown]:  Mah&lt;br /&gt;What is the two-letter country code for this unit?&lt;br /&gt;[Unknown]:  IN&lt;br /&gt;Is CN=Mohit Agrawal, OU=ISL, O=IBM, L=Pune, ST=Mah, C=IN correct?  (type &quot;yes&quot; or &quot;no&quot;)&lt;br /&gt;[no]:  yes&lt;br /&gt;&lt;br /&gt;Generating 1,024 bit RSA key pair and self-signed certificate (MD5WithRSA)&lt;br /&gt;for: CN=Mohit Agrawal, OU=ISL, O=IBM, L=Pune, ST=Mah, C=IN&lt;br /&gt;[Storing client_keystore.p12]&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;After you enter the data for each prompt, keytool will generate the certificate; it will be stored in the current directory. The name of the file will be value we used for the &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;-keystore&lt;/span&gt; parameter (&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;client_keystore.p12&lt;/span&gt; in this example).&lt;br /&gt;&lt;br /&gt;To be able to use this certificate to authenticate ourselves, we need to import it into the browser. The procedure, although similar, varies from browser to browser. In Firefox, this can be accomplished by going to &lt;span style=&quot;font-weight: bold;&quot;&gt;Tools-&amp;gt;Options-&amp;gt;Encryption-&amp;gt;View Certificates &lt;/span&gt;, click import and give the path of the PKCS12 keystore and corresponding password.&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicINgWLmb2-YQbfehjnTXhDJw7WP9c42a10bssVRV4PufYyOarKKxqrAMSZDbBg0NKjKt06aT_ryRfkFs6jm-9H7dkLg5khyKek5q2XjKxsxWte4vzlEDnzSR2QRR87g0slTB4s2Znn4c/s1600/cert_in_browser.jpg&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-style: italic;font-size:100%;&quot; &gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Importing Certificate in GlassFish trust store&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;The certificate we created in the previous step needs to be exported into a format that GlassFish can understand:&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 102, 102);font-size:100%;&quot; &gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 51);font-size:100%;&quot; &gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;keytool -export -alias myselfsigned -keystore client_keystore.p12 -storetype PKCS12 -storepass changeit -rfc -file selfsigned.cer&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;The values for the &lt;span style=&quot;font-family:Courier New;&quot;&gt;-alias,-keystore&lt;/span&gt;, and &lt;span style=&quot;font-family:Courier New;&quot;&gt;-storepass&lt;/span&gt; parameters must match the values used in the previous command. You may choose any value for the &lt;span style=&quot;font-family:Courier New;&quot;&gt;-file&lt;/span&gt; parameter, but it is recommended for the value to end in the &lt;span style=&quot;font-family:Courier New;&quot;&gt;.cer &lt;/span&gt;extension.&lt;br /&gt;&lt;br /&gt;As our certificate was not issued by a certificate authority, GlassFish by default will not recognize it as a valid certificate. GlassFish knows what certificates to trust based on the certificate authority that created them. The way this is implemented is that certificates for these various authorities are stored in a keystore names &lt;span style=&quot;font-family:Courier New;&quot;&gt;cacerts.jks&lt;/span&gt;. The keystore can be found in the following location:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;[glassfish installation directory]/glassfish/domains/domain1/config/cacerts.jks&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;In order for GlassFish to accept our certificate, we need to import it into the cacerts keytsore. This can be accomplished by issuing the following command from the command line:&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 102, 102);font-size:100%;&quot; &gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 51);font-size:100%;&quot; &gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;keytool -import -file selfsigned.cer -keystore &quot;C:\Program Files\glassfish-3.1.1\glassfish\domains\domain1\config\cacerts.jks&quot; -alias myselfsigned -storepass changeit&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;At this point, keytool will display the certificate information in the command line and ask us if we want to trust it:&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 102, 102);font-size:100%;&quot; &gt;&lt;span style=&quot;color: rgb(51, 51, 51);font-size:100%;&quot; &gt;&lt;span style=&quot;font-family:Courier New;&quot;&gt;&lt;br /&gt;   Owner: CN=Mohit, OU=IBM, O=IBM India, L=Pune, ST=Mah, C=IN&lt;br /&gt;   Issuer: CN=Mohit, OU=IBM, O=IBM India, L=Pune, ST=Mah, C=IN&lt;br /&gt;   Serial number: 4f2a86ca&lt;br /&gt;   Valid from: 2/2/12 6:21 PM until: 5/2/12 6:21 PM&lt;br /&gt;   Certificate fingerprints:&lt;br /&gt;   MD5:  3B:83:AF:7F:58:EC:D9:89:03:F7:FE:38:EF:C6:3A:73&lt;br /&gt;   SHA1: 6C:CD:02:78:0B:78:CB:0B:DD:C2:D3:DF:CA:85:49:79:52:0C:2A:38&lt;br /&gt;   Trust this certificate? [no]:  yes&lt;br /&gt;   Certificate was added to keystore&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Once we add the certificate to the &lt;span style=&quot;font-family:Courier New;&quot;&gt;cacerts.jks&lt;/span&gt; keystore, we need to restart the domain for the change to take effect.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-style: italic;font-size:100%;&quot; &gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Configuring Applications to Use the Certificate Realm&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;As we are taking advantage of Java EE 5 security features, we don&#39;t need to modify any code at all in order to use the certificate realm. All we need to do is modify the application&#39;s configuration in its deployment descriptors,&lt;span style=&quot;font-family:Courier New;&quot;&gt; web.xml&lt;/span&gt; and &lt;span style=&quot;font-family:Courier New;&quot;&gt;sun-web.xml&lt;/span&gt; .&lt;br /&gt;&lt;div style=&quot;font-family: Courier New;&quot;&gt;&lt;br /&gt;&amp;lt;security-constraint&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;display-name&amp;gt;Constraint1&amp;lt;/display-name&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;web-resource-collection&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;web-resource-name&amp;gt;ClientCertWebApp&amp;lt;/web-resource-name&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;auth-constraint&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;role-name&amp;gt;master&amp;lt;/role-name&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/auth-constraint&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;user-data-constraint&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;transport-guarantee&amp;gt;CONFIDENTIAL&amp;lt;/transport-guarantee&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/user-data-constraint&amp;gt;&lt;br /&gt;&amp;lt;/security-constraint&amp;gt;&lt;br /&gt;&amp;lt;login-config&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;auth-method&amp;gt;CLIENT-CERT&amp;lt;/auth-method&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;realm-name&amp;gt;certificate&amp;lt;/realm-name&amp;gt;&lt;br /&gt;&amp;lt;/login-config&amp;gt;&lt;br /&gt;&amp;lt;security-role&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;role-name&amp;gt;master&amp;lt;/role-name&amp;gt;&lt;br /&gt;&amp;lt;/security-role&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;In this case, we declared &lt;span style=&quot;font-weight: bold;font-family:arial;&quot; &gt;CLIENT-CERT&lt;/span&gt; as the authorization method and &lt;span style=&quot;font-family:courier new;&quot;&gt;certificate&lt;/span&gt; as the realm to use to authenticate. This will have effect of GlassFish asking the browser for a client certificate before allowing user into the application.&lt;br /&gt;&lt;br /&gt;When using client-certificate authentication, the request must always be done via HTTPS, therefore; it is a good idea to add the &lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;transport-guarantee&gt;&lt;/transport-guarantee&gt;&lt;/span&gt; element with a value of &lt;span style=&quot;font-family:courier new;&quot;&gt;CONFIDENTIAL&lt;/span&gt; to the &lt;span style=&quot;font-family:courier new;&quot;&gt;web.xml&lt;/span&gt; deployment descriptor.&lt;br /&gt;&lt;br /&gt;Notice that we declared that only users in the role of &lt;span style=&quot;font-family:courier new;&quot;&gt;master&lt;/span&gt; can access any page in the system; we did this by adding the role of master to the &lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;role-name&gt;&lt;/role-name&gt;&lt;/span&gt; element nested inside the &lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;auth-constraint&gt;&lt;/auth-constraint&gt;&lt;/span&gt; element of the &lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;security-constraint&gt;&lt;/security-constraint&gt;&lt;/span&gt; element in &lt;span style=&quot;font-family:courier new;&quot;&gt;web.xml&lt;/span&gt; deployment descriptor. In order to allow access to authorized users, we need to add them to this role. This is done in the &lt;span style=&quot;font-family:courier new;&quot;&gt;sun-web.xml&lt;/span&gt; deployment descriptor.&lt;br /&gt;&lt;br /&gt;&amp;lt;sun-web-app&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;context-root&amp;gt;/ClientCertWebApp&amp;lt;/context-root&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;security-role-mapping&amp;gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;role-name&amp;gt;master&amp;lt;/role-name&amp;gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;principal-name&amp;gt;CN=Mohit,OU=ISL,O=IBM,L=Pune,ST=Mah,C=IN&amp;lt;/principal-name&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/security-role-mapping&amp;gt;&lt;br /&gt;&amp;lt;/sun-web-app&amp;gt;&lt;br /&gt;&lt;br /&gt;We are now ready to test our application; after we deploy it on GlassFish server and point the browser to any page in the application we should see a pop-up screen which will ask to select certificate from the available certificates in browser.</content><link rel='replies' type='application/atom+xml' href='http://mohitag80.blogspot.com/feeds/5911748302367783421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/898219774729135305/5911748302367783421' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/5911748302367783421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/5911748302367783421'/><link rel='alternate' type='text/html' href='http://mohitag80.blogspot.com/2012/02/enabling-certificate-based.html' title='Enabling certificate based authentication for web application in GlassFish Server'/><author><name>Mohit Agrawal</name><uri>http://www.blogger.com/profile/13865939734904527853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbHKPmR7YemBpnwoEIdOjzuneg_KxsidP5TRfFT71hhvx-Nse68JbDSXZ8D7GZYZ7N6lWzj2coAU7ZtlfSlLGWkn5AhPEtfxmrqGLdRJERuKjaxgNKj3LWdjnFFeyHQG4/s113/profile_pic.jpg'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898219774729135305.post-7656695353284051282</id><published>2009-04-17T06:26:00.000-07:00</published><updated>2012-02-08T01:02:51.376-08:00</updated><title type='text'>Configuring Log4j in Junit TestCases</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;As a developer we often have to test our business codes through different kinds of test cases. For my java objects I prefer Apache&#39;s JUnit Test cases. At many points in our code we have to log messages on output consoles or files. There are many logging API&#39;s are available but &lt;a href=&quot;http://logging.apache.org/log4j/&quot;&gt;Apache&#39;s Log4j&lt;/a&gt; is widely used these days. One of the most important feature of Lo4j is that we can even log our messages to different files based on the java objects i.e based on there fully qualified package names.&lt;br /&gt;&lt;br /&gt;Well, but the topic I am going to discuss here is how to configure our test cases to show our log messages on our standard output? Following are the steps we should keep in mind for successful configuration.&lt;br /&gt;&lt;/div&gt;&lt;ol style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;If our test-cases has to be executed through &lt;a href=&quot;http://ant.apache.org/&quot;&gt;Ant&lt;/a&gt; target then first let us create a target in our build.xml&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1kDqxPsqKVJ8aDD7oUicyqeTpDYJp7SzFmaE0xBnFdHtiDAbrcDwvDRDkdV8_JKHnhh5M06EgeULV-qGEdekNVq3pwUo4H-WajuhgK1Wz3CUcUpbvhlBY7kavaxl9xJWZXwgzloQRQZc/s1600-h/target.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 189px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1kDqxPsqKVJ8aDD7oUicyqeTpDYJp7SzFmaE0xBnFdHtiDAbrcDwvDRDkdV8_JKHnhh5M06EgeULV-qGEdekNVq3pwUo4H-WajuhgK1Wz3CUcUpbvhlBY7kavaxl9xJWZXwgzloQRQZc/s400/target.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5350159561223212882&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Log4j.properties file at specified location contains all the configurations required for log4j loggers and apenders. &lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH7VntbJDGPFEXc1R3dscxiGJxWZyWSFkfOdDoVm02R5OyHCpw5cqKFidyzEaYllnWSZvjx4gWK1bLFyyinjnQnQXh1eAxzO2pqq5lVkBN7qwGEnt2C6Yayq1zWV2Rm8HkBnFeNZ2P2wE/s1600-h/log4j.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 89px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH7VntbJDGPFEXc1R3dscxiGJxWZyWSFkfOdDoVm02R5OyHCpw5cqKFidyzEaYllnWSZvjx4gWK1bLFyyinjnQnQXh1eAxzO2pqq5lVkBN7qwGEnt2C6Yayq1zWV2Rm8HkBnFeNZ2P2wE/s400/log4j.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5350161686611935026&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;In our test cases we have to create and initialize our logger before we can use it to log our information. Here I have created a test case named &lt;span style=&quot;font-weight: bold;&quot;&gt;SampleTest&lt;/span&gt; in package &lt;span style=&quot;font-weight: bold;&quot;&gt;com.tests.project&lt;/span&gt;. The most essential point to remember that in constructor or inside init() method we have to call &lt;span style=&quot;font-weight: bold;&quot;&gt;configure()&lt;/span&gt; method of &lt;span style=&quot;font-weight: bold;&quot;&gt;BasicConfigurator&lt;/span&gt; object else it won&#39;t read the properties of Log4j.properties file.&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQNHnA1XiL7CKFHSGFkTPNoYMX0oj8bE3rM4CJAswexvKTPepMIMkeEWqErCudfJjexrTzJboP73gv80ArziU5FX56LNOIYoWGfpP_KWQY5JGfO8X8btJx99iRE_hVl1cGfcNTAQIBWs/s1600-h/java.JPG&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 219px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFQNHnA1XiL7CKFHSGFkTPNoYMX0oj8bE3rM4CJAswexvKTPepMIMkeEWqErCudfJjexrTzJboP73gv80ArziU5FX56LNOIYoWGfpP_KWQY5JGfO8X8btJx99iRE_hVl1cGfcNTAQIBWs/s400/java.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5350167772216238802&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;We can add any method named test***() which will get execute when we call ant target from command line as folows:&lt;div style=&quot;background-color: pink; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;&quot;&gt;D:\Workspace\Blog&amp;gt;ant _unittest -Dtest.class=com.tests.project.SampleTest&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;   Following all the mentioned steps give  your logger informations into standard console. Note: Don&#39;t forget to call BasicConfigurator.configure() mentioned in step 3.&lt;br /&gt;&lt;style&gt;!--  /* Font Definitions */  @font-face  {font-family:&quot;Cambria Math&quot;;  panose-1:2 4 5 3 5 4 6 3 2 4;  mso-font-charset:1;  mso-generic-font-family:roman;  mso-font-format:other;  mso-font-pitch:variable;  mso-font-signature:0 0 0 0 0 0;} @font-face  {font-family:Calibri;  panose-1:2 15 5 2 2 2 4 3 2 4;  mso-font-charset:0;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face  {font-family:Tahoma;  panose-1:2 11 6 4 3 5 4 4 2 4;  mso-font-charset:0;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:1627400839 -2147483648 8 0 66047 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-unhide:no;  mso-style-qformat:yes;  mso-style-parent:&quot;&quot;;  margin-top:0in;  margin-right:0in;  margin-bottom:10.0pt;  margin-left:0in;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:&quot;Times New Roman&quot;;  mso-bidi-theme-font:minor-bidi;} .MsoChpDefault  {mso-style-type:export-only;  mso-default-props:yes;  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:&quot;Times New Roman&quot;;  mso-bidi-theme-font:minor-bidi;} .MsoPapDefault  {mso-style-type:export-only;  margin-bottom:10.0pt;  line-height:115%;} @page Section1  {size:8.5in 11.0in;  margin:1.0in 1.0in 1.0in 1.0in;  mso-header-margin:.5in;  mso-footer-margin:.5in;  mso-paper-source:0;} div.Section1  {page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:&quot;Table Normal&quot;;  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-priority:99;  mso-style-qformat:yes;  mso-style-parent:&quot;&quot;;  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin-top:0in;  mso-para-margin-right:0in;  mso-para-margin-bottom:10.0pt;  mso-para-margin-left:0in;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:&quot;Times New Roman&quot;;  mso-fareast-theme-font:minor-fareast;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;} &lt;/style&gt; &lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:shapedefaults ext=&quot;edit&quot; spidmax=&quot;1026&quot;&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:shapelayout ext=&quot;edit&quot;&gt;   &lt;o:idmap ext=&quot;edit&quot; data=&quot;1&quot;&gt;  &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;  &lt;/div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt; line-height: normal; text-align: justify;&quot;&gt;&lt;b style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:8;color:navy;&quot;   &gt;   &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;input id=&quot;gwProxy&quot; type=&quot;hidden&quot;&gt;&lt;!--Session data--&gt;&lt;input onclick=&quot;jsCall();&quot; id=&quot;jsProxy&quot; type=&quot;hidden&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot; id=&quot;refHTML&quot;&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohitag80.blogspot.com/feeds/7656695353284051282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/898219774729135305/7656695353284051282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/7656695353284051282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/7656695353284051282'/><link rel='alternate' type='text/html' href='http://mohitag80.blogspot.com/2009/04/configuring-log4j-in-junit-testcases.html' title='Configuring Log4j in Junit TestCases'/><author><name>Mohit Agrawal</name><uri>http://www.blogger.com/profile/13865939734904527853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbHKPmR7YemBpnwoEIdOjzuneg_KxsidP5TRfFT71hhvx-Nse68JbDSXZ8D7GZYZ7N6lWzj2coAU7ZtlfSlLGWkn5AhPEtfxmrqGLdRJERuKjaxgNKj3LWdjnFFeyHQG4/s113/profile_pic.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1kDqxPsqKVJ8aDD7oUicyqeTpDYJp7SzFmaE0xBnFdHtiDAbrcDwvDRDkdV8_JKHnhh5M06EgeULV-qGEdekNVq3pwUo4H-WajuhgK1Wz3CUcUpbvhlBY7kavaxl9xJWZXwgzloQRQZc/s72-c/target.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898219774729135305.post-9036614847963124369</id><published>2008-02-23T04:24:00.000-08:00</published><updated>2012-02-08T01:05:04.679-08:00</updated><title type='text'>Htm Truncator Lucene Analyzer</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;On my recent SpellChecker project I had a module, in which I required spelling dictionary (i.e. Lucene Index) based on lucene NGramAnalyzers, reading from 1000&#39;s of .htm files we had in our repository. For this I have taken an advantage of lucene&#39;s extension capabilities by creating my own Analyzer to truncate the html tags since it was not required to store them in  spelling dictionary. An Analyzer is an encapsulation of the analysis process.&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;Creating lucene Analyzer is very simple and easy task as we just have to &lt;span style=&quot;color: rgb(204, 102, 0); font-style: italic;&quot;&gt;extend Analyzer&lt;/span&gt; class which also have have only one method to override i.e.&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;center&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;&lt;span style=&quot;color: rgb(204, 102, 0); font-weight: bold;font-family:arial;&quot; &gt;public TokenStream tokenStream( String fieldName, Reader reader){}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/center&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;TokenStream comes in two flavour i.e. &lt;span style=&quot;color: rgb(204, 102, 0); font-weight: bold;&quot;&gt;Tokenizer&lt;/span&gt; and &lt;span style=&quot;color: rgb(204, 102, 0); font-weight: bold;&quot;&gt;TokenFilter&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt; . &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 102, 0);&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;Distinction is that Tokenizer deals with individual characters whereas TokenFilter deals with words.  One important aspect is that we can create chain of these tokenstreams so that output of one object  can be used as input for another object. In Tokenizer, the input should be in the form of  &lt;span style=&quot;color: rgb(204, 102, 0); font-weight: bold;&quot;&gt;Reader&lt;/span&gt;&lt;span style=&quot;color: rgb(204, 102, 0);&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt; class. So what I have done that created a analyzer similar to StandardAnalyzer and supplied a new Reader object, which will truncate any words between &#39;&amp;lt;&#39; &#39;&amp;gt;&#39; characters from .htm files.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: rgb(204, 102, 0);&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;span style=&quot;color: rgb(204, 102, 0);&quot;&gt;&lt;span style=&quot;color: rgb(51, 51, 51);&quot;&gt;Following is the code of my HtmTagTruncatorAnalyzer class&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;pre&gt;public class MyStandardAnalyzer extends Analyzer{&lt;br /&gt;private Set stopWords;&lt;br /&gt;public MyStandardAnalyzer(){&lt;br /&gt;  stopWords = StopFilter.makeStopSet(StopAnalyzer.ENGLISH_STOP_WORDS);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public MyStandardAnalyzer(String[] stopWords){&lt;br /&gt;     this.stopWords = StopFilter.makeStopSet(StopAnalyzer.ENGLISH_STOP_WORDS);&lt;br /&gt;     this.stopWords.addAll(StopFilter.makeStopSet(stopWords));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public TokenStream tokenStream(String fieldName,Reader reader) {&lt;br /&gt;   return new StopFilter(new LowerCaseFilter(new StandardFilter&lt;br /&gt;         (new StandardTokenizer(getNewReader(reader)))),stopWords);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private Reader getNewReader(Reader reader){&lt;br /&gt;StringBuffer tempBuffer = new StringBuffer();&lt;br /&gt;try{&lt;br /&gt;  boolean result = true;&lt;br /&gt;  int length = 0;&lt;br /&gt;  loop1:while(true){&lt;br /&gt;  int character = reader.read();&lt;br /&gt;  char c = (char)character;&lt;br /&gt;  if(character == -1) {&lt;br /&gt;     break;&lt;br /&gt;  }&lt;br /&gt;  if(c == &#39;&amp;lt;&#39;){&lt;br /&gt;       result = false;&lt;br /&gt;  }&lt;br /&gt;  if(result == true){&lt;br /&gt;      if(c == &#39;.&#39; ){&lt;br /&gt;           tempBuffer.append(&#39; &#39;);&lt;br /&gt;           continue loop1;&lt;br /&gt;      }    &lt;br /&gt;      if(c == &#39;0&#39; ||c == &#39;1&#39; ||c == &#39;2&#39; ||c == &#39;3&#39;||c == &#39;4&#39; ||&lt;br /&gt;         c == &#39;5&#39;||c == &#39;6&#39;||c == &#39;7&#39;||c == &#39;8&#39;||c == &#39;9&#39;||c == &#39;&amp;amp;&#39;||&lt;br /&gt;         c == &#39;,&#39;||c == &#39;-&#39;||c == &#39;_&#39;||c == &#39;@&#39;){&lt;br /&gt;         tempBuffer.append(&#39; &#39;);&lt;br /&gt;         continue loop1;&lt;br /&gt;      }&lt;br /&gt;      tempBuffer.append(c);&lt;br /&gt; }else if(result == false &amp;amp;&amp;amp; c == &#39;&amp;gt;&#39;){&lt;br /&gt;     result = true;&lt;br /&gt;     tempBuffer.append(&#39; &#39;);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;}catch(Exception e){&lt;br /&gt;e.printStackTrace();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;String text = tempBuffer.toString();&lt;br /&gt;return new StringReader(text);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohitag80.blogspot.com/feeds/9036614847963124369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/898219774729135305/9036614847963124369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/9036614847963124369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/9036614847963124369'/><link rel='alternate' type='text/html' href='http://mohitag80.blogspot.com/2008/02/htm-truncator-lucene-analyzer.html' title='Htm Truncator Lucene Analyzer'/><author><name>Mohit Agrawal</name><uri>http://www.blogger.com/profile/13865939734904527853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbHKPmR7YemBpnwoEIdOjzuneg_KxsidP5TRfFT71hhvx-Nse68JbDSXZ8D7GZYZ7N6lWzj2coAU7ZtlfSlLGWkn5AhPEtfxmrqGLdRJERuKjaxgNKj3LWdjnFFeyHQG4/s113/profile_pic.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898219774729135305.post-594444227902382941</id><published>2008-02-23T03:55:00.000-08:00</published><updated>2008-06-12T05:48:44.295-07:00</updated><title type='text'>Hibernate&#39;s Solution for org.hibernate.hql.ast.QuerySyntaxException.</title><content type='html'>It take a more then 2 hours to me to solve this exception. I am sharing it with you guys so that new comers won&#39;t face it.&lt;br /&gt;&lt;br /&gt;Suppose I have persistent object named &#39;User&#39; mapped to Database table &#39;USER_DETAILS&#39; in my User.hbm.xml file. When I tried to get object through HQL query ie&lt;span style=&quot;background-color:pink;&quot;&gt;&lt;br /&gt;User user = session.createQuery(&quot;from User_Details where User_Id=1 ).uniqueResult();&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I got &quot; org.hibernate.hql.ast.QuerySyntaxExcepti&lt;div class=&quot;para&quot;&gt;&lt;wbr&gt;on: User_Details is not mapped [from &lt;span style=&quot;color: rgb(0, 204, 204);&quot;&gt;User_Details&lt;/span&gt; where USER_ID=1&quot;.&lt;br /&gt;&lt;br /&gt;Solution : I found that in HQL we have to supply persistent Object class name instead of DB table name in queries to retrieve object. i.e.&lt;span style=&quot;background-color:pink;&quot;&gt;&lt;br /&gt;User user = session.createQuery(&quot;from &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;User&lt;/span&gt; where User_Id=1 ).uniqueResult();&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Regards&lt;br /&gt;&lt;br /&gt;Mohit Agrawal&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohitag80.blogspot.com/feeds/594444227902382941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/898219774729135305/594444227902382941' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/594444227902382941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/594444227902382941'/><link rel='alternate' type='text/html' href='http://mohitag80.blogspot.com/2008/02/hibernates-solution-for.html' title='Hibernate&#39;s Solution for org.hibernate.hql.ast.QuerySyntaxException.'/><author><name>Mohit Agrawal</name><uri>http://www.blogger.com/profile/13865939734904527853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbHKPmR7YemBpnwoEIdOjzuneg_KxsidP5TRfFT71hhvx-Nse68JbDSXZ8D7GZYZ7N6lWzj2coAU7ZtlfSlLGWkn5AhPEtfxmrqGLdRJERuKjaxgNKj3LWdjnFFeyHQG4/s113/profile_pic.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898219774729135305.post-8549584728171499271</id><published>2008-01-01T02:12:00.000-08:00</published><updated>2008-02-23T04:04:23.538-08:00</updated><title type='text'>Introduction</title><content type='html'>&lt;span style=&quot;font-weight: bold; color: rgb(0, 153, 0);&quot;&gt;H&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 153, 0);&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;i,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is my first acquaintance with writing blogs. Still much not aware what to write but writing to see something in my blogs. One of the reason for writing blog is to get used to working with for Blog Server technology. At same time i am also going through reading a book on Blog sever technology i.e  &lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;RSS and Atom in Action&lt;/span&gt;.&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/8549584728171499271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898219774729135305/posts/default/8549584728171499271'/><link rel='alternate' type='text/html' href='http://mohitag80.blogspot.com/2008/01/introduction.html' title='Introduction'/><author><name>Mohit Agrawal</name><uri>http://www.blogger.com/profile/13865939734904527853</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbHKPmR7YemBpnwoEIdOjzuneg_KxsidP5TRfFT71hhvx-Nse68JbDSXZ8D7GZYZ7N6lWzj2coAU7ZtlfSlLGWkn5AhPEtfxmrqGLdRJERuKjaxgNKj3LWdjnFFeyHQG4/s113/profile_pic.jpg'/></author></entry></feed>