<?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-2617556537834513341</id><updated>2012-09-19T00:04:43.000+05:30</updated><category term='Tomcat'/><category term='SSL'/><category term='BIRT'/><title type='text'>Technotes</title><subtitle type='html'>knowing the things arround me ....</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vijay-technotes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2617556537834513341/posts/default'/><link rel='alternate' type='text/html' href='http://vijay-technotes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Vijay</name><uri>http://www.blogger.com/profile/10096672439944872575</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_NvjdUs4atl8/SehpI532H0I/AAAAAAAAAEQ/hQ2b__MC6HA/S220/SDC11118.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2617556537834513341.post-7166624833640860295</id><published>2012-09-18T23:48:00.001+05:30</published><updated>2012-09-19T00:04:43.030+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BIRT'/><title type='text'>Using log4j logging in BIRT Viewer</title><content type='html'>&lt;pre&gt;&lt;br /&gt;Here i am discussing about how to add/initialize log4j logger when BIRT Viewer is invoked.&lt;br /&gt;&lt;br /&gt;Here is the clue...&lt;br /&gt;As we know BIRT provides the frameset servlet via which we can run BIRT reports.&lt;br /&gt;&lt;br /&gt;By now you might have already guessed it...did you ? if not here is the deal...&lt;br /&gt;&lt;br /&gt;Define your own servelet say MyBIRTServlet and instead of extending it from HttpServerlet extend it from frameset servlet , and the define two obvious methods goGet() and doPost() along with init() method.&lt;br /&gt;&lt;br /&gt;Now initialize your logger object with some name inside init() method and after that you would need to call super.init() to allow framset-init() to execute..&lt;br /&gt;&lt;br /&gt;Also redirect the call of doGet(…) and doPost(…) to frameset doGet(…) and doPost(..)&lt;br /&gt;MyBIRTServlet doGet(..) -&gt; Call super.doGet(…) similarly for doPost(…)&lt;br /&gt;&lt;br /&gt;Last thing that we need to do is update the web.xml (which is present under birt-viewer/WEB-INF directory) for newly created servlet mapping with frameset.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2617556537834513341-7166624833640860295?l=vijay-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vijay-technotes.blogspot.com/feeds/7166624833640860295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vijay-technotes.blogspot.com/2012/09/using-log4j-logging-in-birt-viewer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2617556537834513341/posts/default/7166624833640860295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2617556537834513341/posts/default/7166624833640860295'/><link rel='alternate' type='text/html' href='http://vijay-technotes.blogspot.com/2012/09/using-log4j-logging-in-birt-viewer.html' title='Using log4j logging in BIRT Viewer'/><author><name>Vijay</name><uri>http://www.blogger.com/profile/10096672439944872575</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_NvjdUs4atl8/SehpI532H0I/AAAAAAAAAEQ/hQ2b__MC6HA/S220/SDC11118.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2617556537834513341.post-5016542671804413742</id><published>2012-09-13T23:53:00.003+05:30</published><updated>2012-09-15T16:49:38.170+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSL'/><title type='text'>Managing multiple entries in java (custom) truststore </title><content type='html'>&lt;pre&gt;&lt;br /&gt;Here is the scenario:&lt;br /&gt;&lt;br /&gt;Say i have got two End Point Reference (EPR) to which i have to make web method/API calls and these EPR's has given me their keystore file. Now i got to create self-signed certificate (out of each keystore file) and finally import these certificates as part of truststore [Which will finally used for server verification].&lt;br /&gt;&lt;br /&gt;1)Create a self-signed certificate with name "cert_EPR1.cert" from keystore keystore_epr1.jks&lt;br /&gt;&lt;br /&gt;$JAVA_HOME/bin/keytool -export -rfc -file cert_EPR1.cert -alias EPR1 -storetype JKS -storepass changeit -keypass changeit -keystore keystore_epr1.jks&lt;br /&gt;&lt;br /&gt;2)See how cert_EPR1.cert looks&lt;br /&gt;&lt;br /&gt;/usr/java/default/bin/keytool -printcert -file cert_EPR1.cert&lt;br /&gt;Owner: CN=*.mycomp.com&lt;br /&gt;Issuer: CN=*.mycomp.com&lt;br /&gt;Serial number: 5040ccbe&lt;br /&gt;Valid from: Fri Aug 31 08:39:58 MDT 2012 until: Thu Nov 29 07:39:58 MST 2012&lt;br /&gt;Certificate fingerprints:&lt;br /&gt;         MD5:  D1:73:70:9C:2D:34:9F:85:8A:93:01:71:49:7A:0C:6D&lt;br /&gt;         SHA1: F5:E5:DB:BD:76:D6:B2:4E:C7:C5:5C:45:1E:E5:94:6D:48:A5:16:B8&lt;br /&gt;         Signature algorithm name: SHA1withRSA&lt;br /&gt;         Version: 3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3)Create a self-signed certificate with name "cert_EPR2.cert" from keystore keystore_epr2.jks&lt;br /&gt;&lt;br /&gt;$JAVA_HOME/bin/keytool -export -rfc -file cert_EPR2.cert -alias EPR2 -storetype JKS -storepass changeit -keypass changeit -keystore keystore_epr2.jks&lt;br /&gt;Certificate stored in file &lt;cert_EPR2.cert&gt;&lt;br /&gt;&lt;br /&gt;4) See how cert_EPR2.cert looks&lt;br /&gt;&lt;br /&gt;/usr/java/default/bin/keytool -printcert -file cert_EPR2.cert&lt;br /&gt;Owner: CN=*.mycomp.com&lt;br /&gt;Issuer: CN=*.mycomp.com&lt;br /&gt;Serial number: 502a52d6&lt;br /&gt;Valid from: Tue Aug 14 07:29:58 MDT 2012 until: Mon Nov 12 06:29:58 MST 2012&lt;br /&gt;Certificate fingerprints:&lt;br /&gt;         MD5:  E9:F5:82:4B:CB:A2:5A:A0:17:E2:61:9E:E8:B7:17:64&lt;br /&gt;         SHA1: 5C:95:B6:4F:76:0E:4B:ED:56:79:F5:CC:1E:CA:B6:8D:7E:E6:38:5A&lt;br /&gt;         Signature algorithm name: SHA1withRSA&lt;br /&gt;         Version: 3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5)make cert_EPR1.cert as part of one truststore who's password is trustStorePassword&lt;br /&gt;&lt;br /&gt;$JAVA_HOME/bin/keytool -import -alias EPR1 -keystore truststore -file cert_EPR1.cert -storepass trustStorePassword&lt;br /&gt;&lt;br /&gt;Owner: CN=*.mycomp.com&lt;br /&gt;Issuer: CN=*.mycomp.com&lt;br /&gt;Serial number: 5040ccbe&lt;br /&gt;Valid from: Fri Aug 31 08:39:58 MDT 2012 until: Thu Nov 29 07:39:58 MST 2012&lt;br /&gt;Certificate fingerprints:&lt;br /&gt;         MD5:  D1:73:70:9C:2D:34:9F:85:8A:93:01:71:49:7A:0C:6D&lt;br /&gt;         SHA1: F5:E5:DB:BD:76:D6:B2:4E:C7:C5:5C:45:1E:E5:94:6D:48:A5:16:B8&lt;br /&gt;         Signature algorithm name: SHA1withRSA&lt;br /&gt;         Version: 3&lt;br /&gt;Trust this certificate? [no]:  y&lt;br /&gt;Certificate was added to keystore&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6)make cert_EPR2.cert as part of same truststore (who's password is trustStorePassword)&lt;br /&gt;&lt;br /&gt;$JAVA_HOME/bin/keytool -import -alias EPR2 -keystore truststore -file cert_EPR2.cert -storepass trustStorePassword&lt;br /&gt;&lt;br /&gt;Owner: CN=*.mycomp.com&lt;br /&gt;Issuer: CN=*.mycomp.com&lt;br /&gt;Serial number: 502a52d6&lt;br /&gt;Valid from: Tue Aug 14 07:29:58 MDT 2012 until: Mon Nov 12 06:29:58 MST 2012&lt;br /&gt;Certificate fingerprints:&lt;br /&gt;         MD5:  E9:F5:82:4B:CB:A2:5A:A0:17:E2:61:9E:E8:B7:17:64&lt;br /&gt;         SHA1: 5C:95:B6:4F:76:0E:4B:ED:56:79:F5:CC:1E:CA:B6:8D:7E:E6:38:5A&lt;br /&gt;         Signature algorithm name: SHA1withRSA&lt;br /&gt;         Version: 3&lt;br /&gt;Trust this certificate? [no]:  y&lt;br /&gt;Certificate was added to keystore&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7)Lets see what actually created trusstore has :&lt;br /&gt;&lt;br /&gt;/usr/java/default/bin/keytool -list -keystore truststore -storepass trustStorePassword&lt;br /&gt;&lt;br /&gt;Keystore type: JKS&lt;br /&gt;Keystore provider: SUN&lt;br /&gt;&lt;br /&gt;Your keystore contains 2 entries&lt;br /&gt;&lt;br /&gt;EPR1, Sep 13, 2012, trustedCertEntry,&lt;br /&gt;Certificate fingerprint (MD5): D1:73:70:9C:2D:34:9F:85:8A:93:01:71:49:7A:0C:6D&lt;br /&gt;EPR2, Sep 13, 2012, trustedCertEntry,&lt;br /&gt;Certificate fingerprint (MD5): E9:F5:82:4B:CB:A2:5A:A0:17:E2:61:9E:E8:B7:17:64&lt;br /&gt;&lt;br /&gt;so all good .. We are done here&lt;br /&gt;&lt;br /&gt;Use above create trustStore in your webservice client..&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2617556537834513341-5016542671804413742?l=vijay-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vijay-technotes.blogspot.com/feeds/5016542671804413742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vijay-technotes.blogspot.com/2012/09/managing-java-trustore-for-multipe-end.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2617556537834513341/posts/default/5016542671804413742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2617556537834513341/posts/default/5016542671804413742'/><link rel='alternate' type='text/html' href='http://vijay-technotes.blogspot.com/2012/09/managing-java-trustore-for-multipe-end.html' title='Managing multiple entries in java (custom) truststore '/><author><name>Vijay</name><uri>http://www.blogger.com/profile/10096672439944872575</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_NvjdUs4atl8/SehpI532H0I/AAAAAAAAAEQ/hQ2b__MC6HA/S220/SDC11118.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2617556537834513341.post-8939904687538908902</id><published>2012-09-10T00:01:00.000+05:30</published><updated>2012-09-15T16:48:42.766+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSL'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><title type='text'>Tomcat and https/ssl settings</title><content type='html'>&lt;pre&gt;&lt;br /&gt;I came across this topic when i was asked to deploy one of the web applications over ssl/https &lt;br /&gt;under the tomcat web container.&lt;br /&gt;&lt;br /&gt;As we all know there is one port reserved in tomcat to server the http request&lt;br /&gt;[which is defined in server.xml (tomcat&lt;version&gt;/conf/server.xml) and there is one commented port &lt;br /&gt;entry for https which looks like below:&lt;br /&gt;    &lt;!--&lt;br /&gt;    &lt;connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"&lt;br /&gt;               maxThreads="150" scheme="https" secure="true"&lt;br /&gt;               clientAuth="false" sslProtocol="TLS" /&gt;&lt;br /&gt;    --&gt;&lt;br /&gt;&lt;br /&gt;We need to uncomment this line,&lt;br /&gt;Note here:&lt;br /&gt;8443 is the default port reserved for https.clientAuth is default set to false - &lt;br /&gt;which means you do not want to authenticate the client request. Apart from this attributes you also &lt;br /&gt;need to add two more attributes named "keyStoreFile" and "keyStorePass"&lt;br /&gt;&lt;br /&gt;Where do i get the value for keyStoreFile and what it is ?&lt;br /&gt;Value is the name of the file which has keys generated at server/host to validate.&lt;br /&gt;&lt;br /&gt;To create this file make use of keytool utility provided by java.&lt;br /&gt;&lt;br /&gt;$JAVA_HOME/bin/keytool -genkey -keystore ${tomcat_dir}/conf/my_keystore.jks -alias someNameforAlias -keyalg RSA -keysize 2048 -dname CN=$host -storepass $password -keypass changeit&lt;br /&gt;&lt;br /&gt;This will give you a file with name my_keystore.jks,to view the content of this file&lt;br /&gt;&lt;br /&gt;$JAVA_HOME/bin/keytool -list -keystore my_keystore.jks -storepass changeit&lt;br /&gt;&lt;br /&gt;so we got the required value to be populated:&lt;br /&gt;&lt;br /&gt;lets uncomment the entry in server.xml : it will look like below:&lt;br /&gt;&lt;br /&gt; &lt;connector clientauth="false" keystorefile="conf/my_keystore.jks" keystorepass="changeit" maxthreads="150" port="8443" protocol="HTTP/1.1" scheme="https" secure="true" sslenabled="true" sslprotocol="TLS"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now make sure you have my_keystore.jks file in conf directory of tomcat and &lt;br /&gt;bounce (Stop and start) the tomcat.&lt;br /&gt;&lt;br /&gt;You should be able to accee it via https://myhost:8443/myapp&lt;/connector&gt;&lt;/version&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2617556537834513341-8939904687538908902?l=vijay-technotes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vijay-technotes.blogspot.com/feeds/8939904687538908902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vijay-technotes.blogspot.com/2012/09/tomcat-and-httpsssl-settings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2617556537834513341/posts/default/8939904687538908902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2617556537834513341/posts/default/8939904687538908902'/><link rel='alternate' type='text/html' href='http://vijay-technotes.blogspot.com/2012/09/tomcat-and-httpsssl-settings.html' title='Tomcat and https/ssl settings'/><author><name>Vijay</name><uri>http://www.blogger.com/profile/10096672439944872575</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_NvjdUs4atl8/SehpI532H0I/AAAAAAAAAEQ/hQ2b__MC6HA/S220/SDC11118.jpg'/></author><thr:total>0</thr:total></entry></feed>