<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David&#039;s technobabble &#187; JAVA</title>
	<atom:link href="http://bable.cybermarshall.com/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://bable.cybermarshall.com</link>
	<description>David&#039;s thoughts about this and that</description>
	<lastBuildDate>Fri, 22 Jan 2010 18:29:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Browser and wiki workflow independence with Liferay the open source &#8220;SharePoint&#8221;</title>
		<link>http://bable.cybermarshall.com/2009/07/04/browser-and-wiki-workflow-independence-with-liferay-the-open-source-sharepoint/</link>
		<comments>http://bable.cybermarshall.com/2009/07/04/browser-and-wiki-workflow-independence-with-liferay-the-open-source-sharepoint/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 04:44:06 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[JAVA]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[liferay]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://bable.cybermarshall.com/?p=775</guid>
		<description><![CDATA[July 4th, 2009; today is the US independence day. This has put me in a reflective mood. As I was thinking about the current projects that I&#8217;m working on, I thought about this&#8230;
SharePoint 2007 is a great improvement over its ancestors: SharePoint 2003 and SharePoint 2001. The capabilities in document management make the old shared [...]]]></description>
			<content:encoded><![CDATA[<p>July 4<sup>th</sup>, 2009; today is the US independence day. This has put me in a reflective mood. As I was thinking about the current projects that I&#8217;m working on, I thought about this&#8230;</p>
<hr />SharePoint 2007 is a great improvement over its ancestors: SharePoint 2003 and SharePoint 2001. The capabilities in document management make the old shared file systems obsolete. This is especially true for Microsoft Office products that integrate with SharePoint. I&#8217;m waiting for SharePoint 2010 to hopefully resolve some of the issues that the blog and wiki tools have. In the meantime, we have wiki and blog requirements that need to be met. In our search for a top flight wiki that was easy to learn and use by users; we discovered <a href="http://www.liferay.com" onclick="pageTracker._trackPageview('/outgoing/www.liferay.com?referer=');">Liferay</a>.<span id="more-775"></span></p>
<ul><em>Actually we rediscovered it <img src='http://bable.cybermarshall.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . I had looked at Liferay in August 2008, to establish a community for another company; however they decided, that they could not provide the resources to host an &#8220;active&#8221; community. Part of providing a community is the nurturing and feeding of the community by providing content on a &#8220;regular&#8221; basis and responding to comments.</em></ul>
<p>From 100,000 feet, Liferay is essentially an open source version of SharePoint written in Java. Liferay embraces document collaboration, Web 2.0 and social collaboration. A Liferay portal provides one or more organizations with one or more communities. Each community and user has public and private pages.  Users can be assigned roles within multiple organizations and communities. Liferay plugins, portlets, can be added to any page by any user based on their &#8220;scoped&#8221; role. Liferay themes and layouts can be established at the community level or applied to each page.</p>
<p>Liferay provides wiki and blogging editors that can be configured to support either the FCKeditor or TinyMCE.  This allows users that are already familiar with other Social media tools to be immediately productive. One of our litmus tests for wiki and blog usability is: <em>can a user &#8220;easily&#8221; learn to how create an attractive blog or wiki that is media and content rich without having to result to editing raw HTML?</em> This should be possible without formal training. Yeah, I expect the user would read some documentation and view some training videos; however, since more and more users are using social media sites, they are looking for their corporate tools to resemble their other tools. The workflow in these tools should allow the user to work top-down as they are thinking. Although not perfect, we find that Liferay passes this test.</p>
<ul><em>One of the disruptive behaviors of internet-based systems and web 2.0 is that corporate systems and vendor applications lag many internet applications in technological advances. This means that users are often waiting for the applications that they use at work to catch up with the ones they use personally.</em></ul>
<p>Liferay allows the use of existing content or the dynamic upload of content while you are are writing. SharePoint 2007 only supports use of previously stored content while editing.</p>
<ul><em>Okay, I know that you can open another browser window; upload some content; and then switch back to your wiki/blog window to complete the wiki or blog entry. However you cannot imagine how many users do not think of this or understand this. I been around long enough to realize that means that there is likely a disconnect between the user&#8217;s desired workflow and the product workflow.</em></ul>
<p>The Liferay wiki and blog editors work equally as well with Internet Explorer,IE, and FireFox. SharePoint 2007 provides a more robust experience to IE users. With SharePoint, in my opinion, wiki and blog editing in FireFox feels like an &#8220;unwanted disease&#8221;. This is unfortunate. There are standard JavaScript libraries that abstract browser dependencies. There is simply no technical reason that SharePoint can&#8217;t provide a first class experience to most browsers.  The Liferay content portlet can contain javascript, this allows easy integration with a plethora of other social media and web-based applications. Ironically, I placed my Windows Live status with a button into a Liferay content portlet and it behaves correctly. I could not do this with SharePoint. The SharePoint editors deleted the javascript code. The Liferay Wiki can be configured to support Creole or Camel-case wiki editing.</p>
<p>You know, SharePoint could learn a lot from Liferay.</p>
]]></content:encoded>
			<wfw:commentRss>http://bable.cybermarshall.com/2009/07/04/browser-and-wiki-workflow-independence-with-liferay-the-open-source-sharepoint/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Updating a Java web publishing application to communite via SSL to a site that uses a Go Daddy certificate</title>
		<link>http://bable.cybermarshall.com/2008/11/25/updating-a-java-web-publishing-application-to-communite-via-ssl-to-a-site-that-uses-a-go-daddy-certificate/</link>
		<comments>http://bable.cybermarshall.com/2008/11/25/updating-a-java-web-publishing-application-to-communite-via-ssl-to-a-site-that-uses-a-go-daddy-certificate/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 18:19:34 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[JAVA]]></category>
		<category><![CDATA[SSL Certificates]]></category>
		<category><![CDATA[Godaddy]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://bable.cybermarshall.com/?p=24</guid>
		<description><![CDATA[At my company we have an online portal where the content is published from an java application over an ssl connection. For several years the online portal used SSL certificates from Verisign, however, this year in order to save some $$$ we decided to switch all of our certificates to Go Daddy. It took a [...]]]></description>
			<content:encoded><![CDATA[<p>At my company we have an online portal where the content is published from an java application over an ssl connection. For several years the online portal used SSL certificates from Verisign, however, this year in order to save some $$$ we decided to switch all of our certificates to Go Daddy. It took a few additional steps this year to make the java publishing application trust the SSL certificate from the online portal</p>
<p><span id="more-24"></span></p>
<p><strong>A little background on Java and certificates.</strong></p>
<p>Java manages certificates in 2 groups:</p>
<ul>
<li>Root certificates and code signing certificates</li>
<li>Individual site certificates</li>
</ul>
<p>Root certificates and code signing certificates are stored in the cacerts file that is a part of the jre. Typically this is in:</p>
<ul>
<li>$JAVA_HOME/jre/lib/security/cacerts for Unix/Linux or</li>
<li>%JAVA_HOME%/jre/lib/security/cacerts for Windows</li>
</ul>
<p>Individual site certificates are typically stored in a &#8220;truststore&#8221; that you create and maintain.<br />
When you start your java program you reference the truststore using the appropriate Java -D options</p>
<ul>
<li>&#8220;-Djavax.net.ssl.trustStore=&#8221;</li>
<li>&#8220;-Djavax.net.ssl.trustStorePassword=&#8221;</li>
</ul>
<p>All groups of certificates are managed by the java keytool program.</p>
<p>Unlike Web Browsers and their automatic SSL certificate acceptance of certificates signed by trusted entities, a certificate must be registered with java before it will be trusted. To do this you manually enroll the site&#8217;s public ssl certificate into the &#8220;truststore&#8221; and any missing root/signing certificates into the JVM&#8217;s cacerts file.</p>
<p><strong>Updating the cacerts</strong></p>
<p>Currently, Go Gaddy has 2 valid Certificate chains; &#8220;ValCert Legacy Certificate Chain&#8221; and &#8220;New Go Daddy Certificate Chain&#8221;. Our new certificate used the &#8220;New Go Daddy Certificate Chain&#8221;. I downloaded the &#8220;Go Daddy Class 2 Certification Authority Root Certificate &#8212; DER Format&#8221; and the &#8220;Go Daddy Secure Server Certifcate (Intermediate Certificate)&#8221; from the site https://certs.godaddy.com/Repository.go. I installed these into my cacerts file</p>
<p>This is my script to update the cacerts</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?" onclick="pageTracker._trackPageview('/outgoing/www.ericbess.com/ericblog/2008/03/03/wp-codebox/_examples?referer=');"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p24code3'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p243"><td class="code" id="p24code3"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">TOD</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d_<span style="color: #000000; font-weight: bold;">%</span>H<span style="color: #000000; font-weight: bold;">%</span>M<span style="color: #000000; font-weight: bold;">%</span>S<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">JAVA_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>java<span style="color: #000000; font-weight: bold;">/</span>jdk1.5.0_11
<span style="color: #007800;">CACERT_STORE</span>=<span style="color: #800000;">${JAVA_HOME}</span><span style="color: #000000; font-weight: bold;">/</span>jre<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>security<span style="color: #000000; font-weight: bold;">/</span>cacerts
<span style="color: #007800;">CERT_FILE1</span>=gd-class2-root.cer
<span style="color: #007800;">CERT_ALIAS1</span>=godaddyclass2ca
<span style="color: #007800;">CERT_FILE2</span>=gd_intermediate.crt
<span style="color: #007800;">CERT_ALIAS2</span>=godaddy-intermediate-cert
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #800000;">${CACERT_STORE}</span> <span style="color: #800000;">${CACERT_STORE}</span>_<span style="color: #800000;">${TOD}</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #800000;">${CACERT_STORE}</span>_<span style="color: #800000;">${TOD}</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
    keytool <span style="color: #660033;">-import</span> <span style="color: #660033;">-trustcacerts</span> <span style="color: #660033;">-keystore</span> <span style="color: #800000;">${CACERT_STORE}</span> <span style="color: #660033;">-file</span> <span style="color: #800000;">${CERT_FILE1}</span> <span style="color: #660033;">-alias</span> <span style="color: #800000;">${CERT_ALIAS1}</span>
    keytool <span style="color: #660033;">-import</span> <span style="color: #660033;">-trustcacerts</span> <span style="color: #660033;">-keystore</span> <span style="color: #800000;">${CACERT_STORE}</span> <span style="color: #660033;">-file</span> <span style="color: #800000;">${CERT_FILE2}</span> <span style="color: #660033;">-alias</span> <span style="color: #800000;">${CERT_ALIAS2}</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

<p>You will be prompted to enter the password of the cacerts file. If you have not changed it, then it will be &#8220;changeit&#8221;</p>
<p><strong>Updating your truststore</strong></p>
<p>Now you are ready to enroll the public SSL certificate. In my case, the site was an IIS site and I used the Windows certificate export and picked format DER. <strong><em>Do not export your private key! </em></strong>I then downloaded the certificate to the system where the Java code was going to run and enrolled it using a script similar to the one below</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?" onclick="pageTracker._trackPageview('/outgoing/www.ericbess.com/ericblog/2008/03/03/wp-codebox/_examples?referer=');"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p24code4'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p244"><td class="code" id="p24code4"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">TOD</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>y<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #000000; font-weight: bold;">%</span>d_<span style="color: #000000; font-weight: bold;">%</span>H<span style="color: #000000; font-weight: bold;">%</span>M<span style="color: #000000; font-weight: bold;">%</span>S<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">JAVA_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>java<span style="color: #000000; font-weight: bold;">/</span>jdk1.5.0_11
<span style="color: #007800;">HOST</span>=www.yoursite.com
<span style="color: #007800;">CERT</span>=www.yoursite.com_export_DER_x509.cer
<span style="color: #007800;">KEYSTORE</span>=mytruststore
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #800000;">${KEYSTORE}</span> <span style="color: #800000;">${KEYSTORE}</span>_<span style="color: #800000;">${TOD}</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #800000;">${KEYSTORE}</span>_<span style="color: #800000;">${TOD}</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">$JAVA_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>keytool <span style="color: #660033;">-delete</span> <span style="color: #660033;">-keystore</span> <span style="color: #800000;">${KEYSTORE}</span> <span style="color: #660033;">-alias</span> <span style="color: #800000;">${HOST}</span>
    <span style="color: #007800;">$JAVA_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>keytool <span style="color: #660033;">-import</span> <span style="color: #660033;">-keystore</span> <span style="color: #800000;">${KEYSTORE}</span> <span style="color: #660033;">-alias</span> <span style="color: #800000;">${HOST}</span> <span style="color: #660033;">-file</span> <span style="color: #800000;">${CERT}</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>

<p>You will be prompted to enter the password of the &#8220;mytruststore&#8221; file. This is the value that you set when you created the truststore</p>
<p><strong>To use your truststore when you run your java program</strong></p>
<p>I add the ssl -D options to my JAVA_OPTS variable that I use when I run java. An example is shown below</p>
<ol>TSTORE_OPT=&#8221;-Djavax.net.ssl.trustStore=&#8221;yourpath&#8221;/mytruststore<br />
TPASS_OPT=&#8221;-Djavax.net.ssl.trustStorePassword=mypassword&#8221;<br />
JAVA_OPTS=&#8221;${TSTORE_OPT} ${TPASS_OPT}&#8221;<br />
java ${JAVA_OPTS} MyJavaProgram</ol>
<p>In production I always store variables like these in a protected configuration file <img src='http://bable.cybermarshall.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I&#8217;ve used this approach successfully with stand-alone java applications, Tomcat, WebLogic and Jboss</p>
<p><center><script type="text/javascript"><!--
google_ad_client = "pub-5633552336244805";
google_ad_slot = "2598014404";
google_ad_width = 336;
google_ad_height = 280;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</center></p>
]]></content:encoded>
			<wfw:commentRss>http://bable.cybermarshall.com/2008/11/25/updating-a-java-web-publishing-application-to-communite-via-ssl-to-a-site-that-uses-a-go-daddy-certificate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
