<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="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" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-36773632</atom:id><lastBuildDate>Sun, 05 Oct 2025 17:07:55 +0000</lastBuildDate><category>example</category><category>Netbeans</category><category>tutorial</category><category>JavaEE</category><category>Java</category><category>JSF</category><category>glassfish</category><category>JEE6</category><category>Mojarra</category><category>Programming</category><category>JSR-314</category><category>JEE5</category><category>JEE7</category><category>Web</category><category>JSR-311</category><category>article</category><category>JAX-RS</category><category>JDK7</category><category>Jersey</category><category>REST</category><category>Visual JSF</category><category>Apache</category><category>woodstock</category><category>frameworks</category><category>AJAX</category><category>books</category><category>maven</category><category>EE7</category><category>open source</category><category>PrimeFaces</category><category>RichFaces</category><category>EE6</category><category>JavaOne</category><category>development</category><category>JSR-344</category><category>Design</category><category>JSE6</category><category>OS X</category><category>JAXB</category><category>Swing</category><category>certification</category><category>GreenJUG</category><category>JRuby</category><category>Javascript</category><category>Tomcat</category><category>concurrency</category><category>CDI</category><category>Google</category><category>JSON</category><category>mercurial</category><category>Apache Derby</category><category>JDK6</category><category>JNDI</category><category>JPA</category><category>JSE5</category><category>LDAP</category><category>Persistence</category><category>Ruby</category><category>SJSAS</category><category>logging</category><category>source control</category><category>EL</category><category>JDBC</category><category>JSE7</category><category>JUG</category><category>JavaDB</category><category>OpenJDK</category><category>PHP</category><category>Quercus</category><category>Security</category><category>blogging</category><category>facelets</category><category>jQuery</category><category>mySQL</category><category>plugin</category><category>Apache2</category><category>Internet Explorer</category><category>JCP</category><category>JDK8</category><category>JSR-295</category><category>JSR-296</category><category>JavaFX</category><category>OCP</category><category>Web Server</category><category>commons</category><category>community</category><category>icefaces</category><category>App Engine</category><category>Architecture</category><category>Collections</category><category>Drupal</category><category>EJB</category><category>Eclipse</category><category>HTTPD</category><category>JSP</category><category>License</category><category>SSL</category><category>Subversion</category><category>Weld</category><category>stackoverflow</category><category>thread</category><category>Apple</category><category>Arquillian</category><category>BSD License</category><category>Caucho</category><category>GAE</category><category>Guice</category><category>HTML5</category><category>IDEA</category><category>IntelliJ</category><category>JSE8</category><category>JSR-342</category><category>JSTL</category><category>MyFaces</category><category>Oracle</category><category>Rails</category><category>Redmine</category><category>Resin</category><category>RoR</category><category>Ruby on Rails</category><category>Solaris</category><category>Solaris 10</category><category>Tomahawk</category><category>code</category><category>hsqldb</category><category>movable type</category><category>quartz</category><category>tapestry</category><category>template</category><category>wordpress</category><category>AD</category><category>AOP</category><category>AWS</category><category>Active Directory</category><category>CACert</category><category>CSS</category><category>Cassandra</category><category>Docker</category><category>Drone</category><category>EC2</category><category>FindBugs</category><category>Foundation</category><category>Grails</category><category>IIS</category><category>JBoss</category><category>JIRA</category><category>JSR-292</category><category>JSR-299</category><category>JSR-316</category><category>JSR-341</category><category>JSR-346</category><category>Java.net</category><category>JavaMail</category><category>Jython</category><category>Lambda</category><category>MIT License</category><category>OSCON</category><category>OpenDS</category><category>OpenSolaris</category><category>POI</category><category>Presentation</category><category>SCJP</category><category>SELF</category><category>SunOne</category><category>TLS</category><category>Warp</category><category>WebSphere</category><category>Weblogic</category><category>Xcode</category><category>Xwiki</category><category>anti-patterns</category><category>container</category><category>maps</category><category>minecraft</category><category>nexus</category><category>patterns</category><category>phpLDAPadmin</category><category>pragmatic</category><category>spring</category><category>wicket</category><title>Java Evangelist John Yeary</title><description></description><link>http://javaevangelist.blogspot.com/</link><managingEditor>noreply@blogger.com (John Yeary)</managingEditor><generator>Blogger</generator><openSearch:totalResults>410</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-3895325710322044212</guid><pubDate>Fri, 23 Feb 2018 01:14:00 +0000</pubDate><atom:updated>2018-02-22T20:14:56.854-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><title>Validating a Domain Name using Commons-Validator</title><description>A quick example of using &lt;code&gt;DomainValidator&lt;/code&gt; to validate a domain name.
&lt;script type=&quot;syntaxhighlighter&quot; class=&quot;brush: java&quot;&gt;&lt;![CDATA[
package com.bluelotussoftware.dns;

import org.apache.commons.validator.routines.DomainValidator;

/**
 *
 * @author John Yeary &lt;jyeary@bluelotussoftware.com&gt;
 * @version 1.0.0
 */
public class Main {

    public static void main(String[] args) {
        DomainValidator domainValidator = DomainValidator.getInstance();
        for (String domainname : args) {
            System.out.println(&quot;Domain name &quot; + domainname + (domainValidator.isValid(domainname) ? &quot; is valid.&quot; : &quot; is not valid.&quot;));
        }
    }
}
]]&gt;&lt;/script&gt;
</description><link>http://javaevangelist.blogspot.com/2018/02/validating-domain-name-using-commons.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-2686128667368213708</guid><pubDate>Fri, 17 Nov 2017 01:39:00 +0000</pubDate><atom:updated>2017-11-16T20:57:35.998-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">glassfish</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">Mojarra</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>JSF 2.3 Tip of the Day: Single Select Menu Item Example</title><description>One of my new colleagues is new to JSF development, and asked for some assistance in creating a JSF &lt;code&gt;&amp;lt;h:selectOneMenu/&amp;gt;&lt;/code&gt; which had a blank option. I came up with a quick example using JSF 2.3 and CDI on GlassFish 5.0.&lt;br /&gt;
&lt;br /&gt;
The web page (&lt;b&gt;index.xhtml&lt;/b&gt;) looks like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;script class=&quot;brush: xhtml&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
&lt;?xml version=&#39;1.0&#39; encoding=&#39;UTF-8&#39; ?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
      xmlns:h=&quot;http://xmlns.jcp.org/jsf/html&quot;
      xmlns:f=&quot;http://xmlns.jcp.org/jsf/core&quot;&gt;
    &lt;h:head&gt;
        &lt;title&gt;h:selectOneMenu Example&lt;/title&gt;
    &lt;/h:head&gt;
    &lt;h:body&gt;
        &lt;h:form&gt;
            &lt;h:selectOneMenu value=&quot;#{indexBean.selected}&quot; &gt;
                &lt;f:selectItems value=&quot;#{indexBean.items}&quot;/&gt;
                &lt;f:ajax event=&quot;change&quot; render=&quot;@form&quot;/&gt;
            &lt;/h:selectOneMenu&gt;
            &lt;br/&gt;&lt;br/&gt;
            &lt;h:outputText value=&quot;#{indexBean.selected ne null ? indexBean.selected : &#39;None&#39;}&quot;/&gt;
        &lt;/h:form&gt;
    &lt;/h:body&gt;
&lt;/html&gt;
]]&gt;&lt;/script&gt;

The backing bean (&lt;b&gt;IndexBean.java&lt;/b&gt;) contains the list of items for the menu and the logic to hold the selected value:
&lt;br /&gt;
&lt;br /&gt;
&lt;script class=&quot;brush: java&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
package com.bluelotussoftware.jsf;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.faces.model.SelectItem;
import javax.faces.view.ViewScoped;
import javax.inject.Named;

/**
 *
 * @author John Yeary &lt;jyeary@bluelotussoftware.com&gt;
 * @version 1.0.0
 */
@Named
@ViewScoped
public class IndexBean implements Serializable {

    private static final long serialVersionUID = -8409333287484097050L;

    private String selected;

    public IndexBean() {
    }

    public List&lt;selectitem&gt; getItems() {
        List&lt;selectitem&gt; items = new ArrayList&lt;&gt;();
        items.add(new SelectItem(&quot;&quot;, &quot;&quot;));
        items.add(new SelectItem(&quot;Tuna&quot;, &quot;Tuna&quot;));
        items.add(new SelectItem(&quot;Catfish&quot;, &quot;Catfish&quot;));
        items.add(new SelectItem(&quot;Gold Fish&quot;, &quot;Gold Fish&quot;));
        items.add(new SelectItem(&quot;Piranha&quot;, &quot;Piranha&quot;));
        return items;
    }

    public String getSelected() {
        return selected;
    }

    public void setSelected(String selected) {
        this.selected = selected;
    }

}
]]&gt;&lt;/script&gt;

&lt;br /&gt;
All in all a very simple example. I was asked what my dependencies looked like so here is the one last piece.
&lt;br /&gt;
&lt;br /&gt;
&lt;script class=&quot;brush: xml&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupid&gt;javax&lt;/groupId&gt;
            &lt;artifactid&gt;javaee-web-api&lt;/artifactId&gt;
            &lt;version&gt;8.0&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupid&gt;javax.faces&lt;/groupId&gt;
            &lt;artifactid&gt;javax.faces-api&lt;/artifactId&gt;
            &lt;version&gt;2.3&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupid&gt;org.glassfish&lt;/groupId&gt;
            &lt;artifactid&gt;javax.faces&lt;/artifactId&gt;
            &lt;version&gt;2.3.0&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
]]&gt;&lt;/script&gt;

&lt;br /&gt;
The NetBeans Maven project can be downloaded here:&amp;nbsp;&lt;a href=&quot;https://bitbucket.org/bluelotussoftware/jsf23-cdi-selectonemenu-example&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;jsf23-cdi-selectonemenu-example&lt;/b&gt;&lt;/a&gt;</description><link>http://javaevangelist.blogspot.com/2017/11/jsf-23-tip-of-day-single-select-menu.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-2708864226252198448</guid><pubDate>Mon, 09 Oct 2017 23:18:00 +0000</pubDate><atom:updated>2017-10-10T08:42:35.594-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">glassfish</category><category domain="http://www.blogger.com/atom/ns#">JavaEE</category><category domain="http://www.blogger.com/atom/ns#">JAX-RS</category><category domain="http://www.blogger.com/atom/ns#">JEE7</category><category domain="http://www.blogger.com/atom/ns#">Jersey</category><category domain="http://www.blogger.com/atom/ns#">Netbeans</category><category domain="http://www.blogger.com/atom/ns#">Web</category><title>JAX-RS 2.0 Tip of the Day: Using MOXy and Forms Example on GlassFish 5.0</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://www.fishlore.com/aquariumfishforum/attachments/65010235-jpg.13856/&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;517&quot; data-original-width=&quot;768&quot; height=&quot;215&quot; src=&quot;https://www.fishlore.com/aquariumfishforum/attachments/65010235-jpg.13856/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Glass Fish&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
I have been tasked with doing some JAX-RS coding during my day job. I wanted to update my skills for JAX-RS which is one of my favorite technologies. I specifically use &lt;a href=&quot;https://jersey.github.io/&quot; target=&quot;_blank&quot;&gt;Jersey&lt;/a&gt; which I find very well done and easy to use. As a number of you may know... I am a &lt;a href=&quot;https://javaee.github.io/glassfish/&quot; target=&quot;_blank&quot;&gt;GlassFish&lt;/a&gt; fan too (one just needs to look at my banner). I decided to use my trusty &lt;a href=&quot;https://netbeans.org/&quot; target=&quot;_blank&quot;&gt;NetBeans&lt;/a&gt; 8.2 install to write a quick example.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.eclipse.org/eclipselink/#moxy&quot; target=&quot;_blank&quot;&gt;MOXy&lt;/a&gt; is enabled by default if you add the dependency to your Maven project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script class=&quot;brush: xml&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
        &lt;dependency&gt;
            &lt;groupid&gt;org.glassfish.jersey.media&lt;/groupId&gt;
            &lt;artifactid&gt;jersey-media-moxy&lt;/artifactId&gt;
            &lt;version&gt;2.26&lt;/version&gt;
        &lt;/dependency&gt;
]]&gt;&lt;/script&gt;

This is a great feature, and I wanted to give it a spin instead of using &lt;a href=&quot;https://github.com/FasterXML/jackson&quot; target=&quot;_blank&quot;&gt;Jackson&lt;/a&gt;, or &lt;a href=&quot;https://github.com/jettison-json/jettison&quot; target=&quot;_blank&quot;&gt;Jettison&lt;/a&gt;. The usage was as simple as adding a &lt;code&gt;@XmlRootElement&lt;/code&gt; annotation to the model class. The rest was handled automagically.&lt;br /&gt;
&lt;br /&gt;
The entire project including a war file are available on Github:&amp;nbsp;&lt;a href=&quot;https://github.com/jyeary/jaxrs-form-data-parameters&quot; target=&quot;_blank&quot;&gt;jaxrs-form-data-parameters&lt;/a&gt;.
&lt;br /&gt;&lt;br/&gt;
A simple platform independent file is used to setup the application.
&lt;br /&gt;&lt;br/&gt;
&lt;script src=&quot;https://gist-it.appspot.com/https://github.com/jyeary/jaxrs-form-data-parameters/raw/master/src/main/java/com/bluelotussoftware/jersey/ApplicationImpl.java&quot;&gt;&lt;/script&gt;
&lt;br/&gt;
We set up web resource (service) to handle our requests.
&lt;br/&gt;&lt;br/&gt;
&lt;script src=&quot;https://gist-it.appspot.com/https://github.com/jyeary/jaxrs-form-data-parameters/raw/master/src/main/java/com/bluelotussoftware/jersey/resource/FormDataParamResource.java&quot;&gt;&lt;/script&gt;
&lt;br/&gt;
That&#39;s it! You now have a JAX-RS Web Service. The project runs successfully on GlassFish 5.0 (.war file on GitHub).
&lt;br/&gt;&lt;br/&gt;
&lt;strong&gt;NOTE:&lt;/strong&gt; MOXy has some issues running on GlassFish 4.1, 4.1.1, and 4.2.</description><link>http://javaevangelist.blogspot.com/2017/10/jax-rs-20-tip-of-day-using-moxy-and.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-5011013029075595626</guid><pubDate>Sun, 08 Oct 2017 18:35:00 +0000</pubDate><atom:updated>2017-10-08T13:39:56.557-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">frameworks</category><category domain="http://www.blogger.com/atom/ns#">JavaEE</category><category domain="http://www.blogger.com/atom/ns#">JDK8</category><category domain="http://www.blogger.com/atom/ns#">JEE7</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">Web</category><title>JSF HTML Whitespace, JS, and CSS Compression</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://images.pexels.com/photos/350348/pexels-photo-350348.jpeg?w=1260&amp;amp;h=750&amp;amp;auto=compress&amp;amp;cs=tinysrgb&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;750&quot; data-original-width=&quot;500&quot; height=&quot;200&quot; src=&quot;https://images.pexels.com/photos/350348/pexels-photo-350348.jpeg?w=1260&amp;amp;h=750&amp;amp;auto=compress&amp;amp;cs=tinysrgb&quot; width=&quot;133&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
This is the second approach to whitespace removal, JS, and CSS compression. In my article &lt;a href=&quot;http://javaevangelist.blogspot.com/2017/10/whitespace-servlet-filter.html&quot; target=&quot;_blank&quot;&gt;Whitespace Servlet Filter&lt;/a&gt;, I mentioned that I tried a number of approaches using &lt;a href=&quot;https://code.google.com/archive/p/htmlcompressor/&quot; target=&quot;_blank&quot;&gt;htmlcompressor&lt;/a&gt; to accomplish this task.&lt;br /&gt;
&lt;br /&gt;
This was my second approach which was to wrap the &lt;code&gt;ResponseWriter&lt;/code&gt; in JSF to accomplish this task. The approach worked, but was abandoned before I finished writing some additional code to handle AJAX. This could be easily resolved with code that is similar to that found in&amp;nbsp;&lt;a href=&quot;http://javaevangelist.blogspot.com/2017/10/whitespace-servlet-filter.html&quot; target=&quot;_blank&quot;&gt;Whitespace Servlet Filter&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
This approach is very specific to JSF and relies on the project being pure JSF. The filter approach is more flexible in my judgement. I did think it was important to publish the code though on Github.&lt;br /&gt;
&lt;br /&gt;
The code for the project can be found here:&amp;nbsp;&lt;a href=&quot;https://github.com/bluelotussoftware/jsf-html-compressor&quot; target=&quot;_blank&quot;&gt;jsf-html-compressor&lt;/a&gt;.
&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist-it.appspot.com/https://github.com/bluelotussoftware/jsf-html-compressor/raw/master/src/main/java/com/bluelotussoftware/jsf/compressor/HTMLCompressorWriter.java&quot;&gt;&lt;/script&gt;</description><link>http://javaevangelist.blogspot.com/2017/10/jsf-html-whitespace-js-and-css.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-4637041519050479707</guid><pubDate>Sun, 08 Oct 2017 16:21:00 +0000</pubDate><atom:updated>2017-10-08T11:21:14.852-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">frameworks</category><category domain="http://www.blogger.com/atom/ns#">JavaEE</category><category domain="http://www.blogger.com/atom/ns#">JDK8</category><category domain="http://www.blogger.com/atom/ns#">JEE7</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">Web</category><title>Whitespace Servlet Filter</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://images.pexels.com/photos/457432/pexels-photo-457432.jpeg?w=1260&amp;amp;h=750&amp;amp;auto=compress&amp;amp;cs=tinysrgb&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;534&quot; data-original-width=&quot;800&quot; height=&quot;213&quot; src=&quot;https://images.pexels.com/photos/457432/pexels-photo-457432.jpeg?w=1260&amp;amp;h=750&amp;amp;auto=compress&amp;amp;cs=tinysrgb&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
A few years ago I worked on a number of different techniques to strip the whitespace out of web pages. My goal was to come up with a solution for JSF pages. I tried a number of different solutions,&amp;nbsp; but they were all based on a framework called &lt;a href=&quot;https://code.google.com/archive/p/htmlcompressor/&quot; target=&quot;_blank&quot;&gt;htmlcompressor&lt;/a&gt;&amp;nbsp;which is a now abandoned project in the archives of Google Code. This framework used the &lt;a href=&quot;https://github.com/google/closure-compiler&quot; target=&quot;_blank&quot;&gt;Google Closure Compiler&lt;/a&gt; to handle the heavy lifting.&lt;br /&gt;
&lt;br /&gt;
This solution worked flawlessly when we tested it on JSF pages, but there was a push to use pre-minified pages for static content, and leave JSF pages alone. I abandoned this project until I was using &lt;a href=&quot;https://developers.google.com/speed/pagespeed/&quot; target=&quot;_blank&quot;&gt;Google PageSpeed&lt;/a&gt; to check the speed of some pages to enhance their performance.&amp;nbsp; I remembered this approach I tried back in 2011, and tried it again with great success and only minor tweaking. I have decided to publish the code on Github.&lt;br /&gt;
&lt;br /&gt;
The project can be found here: &lt;a href=&quot;https://github.com/bluelotussoftware/whitespace-filter&quot; target=&quot;_blank&quot;&gt;whitespace-filter&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script script=&quot;&quot; src=&quot;https://gist-it.appspot.com/https://github.com/bluelotussoftware/whitespace-filter/raw/master/src/main/java/com/bluelotussoftware/servlet/filter/WhitespaceFilter.java&quot;&gt;&lt;/script&gt;</description><link>http://javaevangelist.blogspot.com/2017/10/whitespace-servlet-filter.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-199672798694818903</guid><pubDate>Fri, 06 Oct 2017 22:21:00 +0000</pubDate><atom:updated>2017-10-06T17:22:01.107-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">Tomcat</category><category domain="http://www.blogger.com/atom/ns#">Web</category><title>Embedded Tomcat 8.5</title><description>I was recently tasked with updating an embedded application that we use from Apache Tomcat 8.0.0 RC5. Yes, the project used a release candidate when it was created. I imagine it was like a number of projects where the project was being developed and the expectation was that Apache Tomcat 8.0 would be released and that they would update everything. Well that temporary solution became a permanent one. Years passed and finally a security audit brought to light that the application was out of date, and on further observation a release candidate was used.&lt;br /&gt;
&lt;br /&gt;
I went back and looked at RC5, and subsequent versions including release notes. Release candidate 5 was very similar to Apache Tomcat 7. In fact, the same authentication was used. This changed in the actual 8.0 release where a new authentication mechanism was put into place. This change may have prevented those early adopters from updating the project since the authentication mechanism would have delayed the project since the internals would have needed a rewrite.&lt;br /&gt;
&lt;br /&gt;
I was blessed with upgrading the project, but I also needed to look at using the latest stable version of Apache Tomcat 8.5.x. After trying out some of the new code I was pleasantly surprised at how easy it was to implement a very simple application in Apache Tomcat 8 embedded.&lt;br /&gt;
&lt;br /&gt;
One of the items I really like is the ability to programmatically add various web objects like servlets to the container. It was slick and easy to accomplish. Think of it like a programmatic &lt;code&gt;web.xml&lt;/code&gt; file.&lt;br /&gt;
&lt;br /&gt;
The code for the sample project can be found on github at:&amp;nbsp;&lt;a href=&quot;https://github.com/jyeary/tomcat-8-embedded&quot; target=&quot;_blank&quot;&gt;tomcat-8-embedded&lt;/a&gt;&lt;br /&gt;
&lt;br/&gt;
&lt;script script=&quot;&quot; src=&quot;https://gist-it.appspot.com/https://github.com/jyeary/tomcat-8-embedded/raw/master/src/main/java/com/bluelotussoftware/tomcat/embedded/Main.java&quot;&gt;&lt;/script&gt;

</description><link>http://javaevangelist.blogspot.com/2017/10/embedded-tomcat-8.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-3940317288516881369</guid><pubDate>Fri, 01 Sep 2017 14:39:00 +0000</pubDate><atom:updated>2017-09-01T09:39:37.000-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><title>Splitting a Space Separated Dataset with awk</title><description>I thought I would publish a simple script on how I split a dataset that looks like below into a CSV file which Excel could work on. The issue I was having was that Excel couldn&#39;t seem to find the spaces and use them. I would end up with extra data in columns on my Mac. Perhaps a flaw in the Excel program, or a flaw in the data, or both. However, &lt;code&gt;awk&lt;/code&gt; digested it just fine.

&lt;script type=&quot;syntaxhighlighter&quot; class=&quot;brush: bash&quot;&gt;&lt;![CDATA[
08/31/17 14:00:00 780 10
08/31/17 14:00:01 789 9
08/31/17 14:00:02 817 28
08/31/17 14:00:03 868 51
08/31/17 14:00:04 927 59
08/31/17 14:00:05 986 59
08/31/17 14:00:06 1031 45
08/31/17 14:00:07 1062 31
08/31/17 14:00:08 1107 45
08/31/17 14:00:09 1150 43
08/31/17 14:00:10 1206 56
]]&gt;&lt;/script&gt;

So here is my script to make it a little more useful for Excel. Mind you it is simple, but there are 1.7 million lines of logging, and it took about a second on my machine to convert. Slick by any measure. The problem now is that Excel is choking on the number of records to display in a chart.

&lt;script type=&quot;syntaxhighlighter&quot; class=&quot;brush: bash&quot;&gt;&lt;![CDATA[
awk &#39;{printf(&quot;%s,%s,%s,%s\n&quot;,$1,$2,$3,$4)}&#39; synthinet.log &gt; synthinet.csv
]]&gt;&lt;/script&gt;

&lt;script type=&quot;syntaxhighlighter&quot; class=&quot;brush: bash&quot;&gt;&lt;![CDATA[
09/01/17,07:38:04,805772,0
09/01/17,07:38:05,805772,0
09/01/17,07:38:06,805772,0
09/01/17,07:38:07,805772,0
09/01/17,07:38:08,805772,0
09/01/17,07:38:09,805772,0
09/01/17,07:38:10,805772,0
09/01/17,07:38:11,805772,0
09/01/17,07:38:12,805772,0
09/01/17,07:38:13,805772,0
]]&gt;&lt;/script&gt;</description><link>http://javaevangelist.blogspot.com/2017/09/splitting-space-separated-dataset-with.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-1590399803892879827</guid><pubDate>Wed, 09 Aug 2017 20:32:00 +0000</pubDate><atom:updated>2017-08-09T15:32:45.192-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Apple</category><category domain="http://www.blogger.com/atom/ns#">container</category><category domain="http://www.blogger.com/atom/ns#">Docker</category><category domain="http://www.blogger.com/atom/ns#">mySQL</category><category domain="http://www.blogger.com/atom/ns#">wordpress</category><title>Docker and Apple Server Service: How to use ports 80 and 443 on Mac OS X</title><description>&lt;h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJidSU56aBntvKUq-b1waVXBWDrVIsx9i28pXSpVK1iGfXdof1HRiKd26MUhrMmHUbTaA9kobuA1jIQKZPIlhhHug6qxdCwrlGQi0Ztasawx_mIVgarOg5AKjy5hLiK037CzG9/s1600/docker_logo.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;250&quot; data-original-width=&quot;297&quot; height=&quot;168&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJidSU56aBntvKUq-b1waVXBWDrVIsx9i28pXSpVK1iGfXdof1HRiKd26MUhrMmHUbTaA9kobuA1jIQKZPIlhhHug6qxdCwrlGQi0Ztasawx_mIVgarOg5AKjy5hLiK037CzG9/s200/docker_logo.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Introduction&lt;/h2&gt;
I was trying to deploy some &lt;a href=&quot;https://www.docker.com/&quot; target=&quot;_blank&quot;&gt;Docker&lt;/a&gt; containers yesterday which use ports 80 and 443. OK, I will confess that I was trying to deploy &lt;a href=&quot;https://hub.docker.com/_/wordpress/&quot; target=&quot;_blank&quot;&gt;Wordpress&lt;/a&gt; or &lt;a href=&quot;https://bitnami.com/&quot; target=&quot;_blank&quot;&gt;Bitnami&lt;/a&gt; &lt;a href=&quot;https://hub.docker.com/r/bitnami/wordpress/&quot; target=&quot;_blank&quot;&gt;Wordpress&lt;/a&gt; and &lt;a href=&quot;https://hub.docker.com/_/mysql/&quot; target=&quot;_blank&quot;&gt;MySQL&lt;/a&gt; to containers to see if I could migrate my personal blog to Wordpress. Eventually, I am hoping to migrate all of my blogs to a new blogging environment.
&lt;br /&gt;
&lt;h2&gt;
Problem&lt;/h2&gt;
Well the containers would not deploy because the ports 80 and 443 were being used. A quick connection to &lt;b&gt;localhost&lt;/b&gt; confirmed that the Apple &lt;a href=&quot;https://www.apple.com/macos/server/&quot; target=&quot;_blank&quot;&gt;Server.app&lt;/a&gt; was using these ports for running its processes. So I logged into the Server.app only to discover no way to turn it off.
&lt;br /&gt;
&lt;h2&gt;
Solution&lt;/h2&gt;
Apple &lt;a href=&quot;https://www.apple.com/macos/server/&quot;&gt;Server.app&lt;/a&gt; service is simply that... a service. The &lt;code&gt;launchctl&lt;/code&gt; command will allow us to stop and start services. So I tried to stop the service only to discover it will automatically restart on a new PID. The only solution apparently is to unload the service temporarily.

The following commands will allow you to unload and load the &lt;code&gt;com.apple.serviceproxy&lt;/code&gt; service, and check its status. This will allow
you to use Docker containers on those ports while doing your development and testing.
&lt;script src=&quot;https://gist.github.com/jyeary/89c8eb965d2a72104eae12116fbed537.js&quot;&gt;&lt;/script&gt; 
</description><link>http://javaevangelist.blogspot.com/2017/08/docker-and-apple-server-service-how-to.html</link><author>noreply@blogger.com (John Yeary)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJidSU56aBntvKUq-b1waVXBWDrVIsx9i28pXSpVK1iGfXdof1HRiKd26MUhrMmHUbTaA9kobuA1jIQKZPIlhhHug6qxdCwrlGQi0Ztasawx_mIVgarOg5AKjy5hLiK037CzG9/s72-c/docker_logo.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-985661315749853277</guid><pubDate>Sun, 06 Aug 2017 23:10:00 +0000</pubDate><atom:updated>2017-08-06T19:18:16.615-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">Security</category><category domain="http://www.blogger.com/atom/ns#">Tomcat</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><category domain="http://www.blogger.com/atom/ns#">Web</category><title>Apache Tomcat Container Managed Security and HTTP Security Headers</title><description>&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCmhiyKb8gA4vONCbxbUfItQFDcuolWs-Czn-CVRCHX9kW1PuPwetLBel9iAI8xU2DIE8DRY5DfVBgrgXW9wSqGT332ZTxjjsUR1GaN917VxJIY06wosP4VkGgPRTIMlNBx2mE/s1600/j_security_check_results.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;431&quot; data-original-width=&quot;1600&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCmhiyKb8gA4vONCbxbUfItQFDcuolWs-Czn-CVRCHX9kW1PuPwetLBel9iAI8xU2DIE8DRY5DfVBgrgXW9wSqGT332ZTxjjsUR1GaN917VxJIY06wosP4VkGgPRTIMlNBx2mE/s640/j_security_check_results.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Secure j_security_check Response Headers &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;
Introduction&lt;/h2&gt;
I was recently tasked with resolving a security issue with Apache Tomcat. The issue was that a series of &lt;code&gt;Filter&lt;/code&gt; classes that were implemented in the &lt;code&gt;web.xml&lt;/code&gt; were being bypassed when we are using container managed security, e.g. &lt;b&gt;j_security_check&lt;/b&gt;. The filters were adding security headers: 
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;X-Content-Type-Options: nosniff&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;X-Frame-Options: SAMEORIGIN&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;X-XSS-Protection: 1; mode=block&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
When the response is returned, it would include these values. The filters were written prior to the &lt;code&gt;&lt;a href=&quot;https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/filters/HttpHeaderSecurityFilter.html&quot;&gt;org.apache.catalina.filters.HttpHeaderSecurityFilter&lt;/a&gt;&lt;/code&gt;. They duplicate the functionality, but the Apache version has a few more features. The Apache version is generally implemented in the &lt;code&gt;web.xml&lt;/code&gt; file for the whole server, e.g., &lt;code&gt;&amp;lt;CATALINA_HOME&amp;gt;/conf/web.xml&lt;/code&gt;. The code is really well written, and I would recommend using it except if you are using container managed security. 
&lt;br /&gt;
&lt;h2&gt;
Issue&lt;/h2&gt;
Container managed security,&lt;b&gt;j_security_check&lt;/b&gt;, is implemented using a &lt;a href=&quot;https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/Valve.html&quot;&gt;&lt;code&gt;Valve&lt;/code&gt;&lt;/a&gt;. In particular, this intercepts the call and returns the form based login page which contains something like this:

&lt;script class=&quot;brush: html&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Login&lt;/title&gt;
        &lt;meta charset=&quot;UTF-8&quot;&gt;
        &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div&gt;
Login&lt;/div&gt;
&lt;form action=&quot;j_security_check&quot; method=&quot;POST&quot;&gt;
            &lt;label for=&quot;username&quot;&gt;Username:&lt;/label&gt;
            &lt;input id=&quot;username&quot; name=&quot;j_username&quot; type=&quot;text&quot;/&gt;&lt;br/&gt;
            &lt;label for=&quot;password&quot;&gt;Password:&lt;/label&gt;
            &lt;input id=&quot;password&quot; name=&quot;j_password&quot; type=&quot;password&quot;/&gt;&lt;br/&gt;
            &lt;button id=&quot;submit&quot; type=&quot;submit&quot;&gt;Login&lt;/button&gt; &lt;button id=&quot;reset&quot; type=&quot;reset&quot;&gt;Reset&lt;/button&gt;
        &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;/script&gt;

The resulting response does not contain the headers noted above using either our custom filters, nor from the Apache &lt;code&gt;HttpHeaderSecurityFilter&lt;/code&gt;. Our automated security testing software, &lt;a href=&quot;https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project&quot;&gt;OWASP Zap&lt;/a&gt; caught it.
&lt;br /&gt;
&lt;h2&gt;
Solution&lt;/h2&gt;
The easiest solution I came up with was to implement a couple of valves that add the selected response headers. I then added the &lt;code&gt;Valve&lt;/code&gt; implementations to the &lt;b&gt;&lt;code&gt;&amp;lt;CATALINA_HOME&amp;gt;/conf/context.xml&lt;/code&gt;&lt;/b&gt;. Adding them to the default &lt;code&gt;context.xml&lt;/code&gt; file allows them to be used on all applications deployed to the server. If you don&#39;t want applied to every application, you can add it to the &lt;code&gt;context.xml&lt;/code&gt; file in the individual project.&lt;br /&gt;
&lt;br /&gt;
The project can be found on Github here: &lt;b&gt;&lt;a href=&quot;https://github.com/bluelotussoftware/tomcat-security-valves&quot;&gt;tomcat-security-valves&lt;/a&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;com.bluelotussoftware&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;tomcat-security-valves&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;
&lt;/b&gt;&lt;/pre&gt;
&lt;br /&gt;
An example application using the default Apache Tomcat realm is available here: &lt;b&gt;&lt;a href=&quot;https://bitbucket.org/bluelotussoftware/tomcat-container-managed-security&quot;&gt;tomcat-container-managed-security&lt;/a&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;h2&gt;
XContentTypeOptionsValve.java&lt;/h2&gt;
&lt;hr /&gt;
&lt;script script=&quot;&quot; src=&quot;https://gist-it.appspot.com/https://github.com/bluelotussoftware/tomcat-security-valves/raw/master/src/main/java/com/bluelotussoftware/tomcat/security/valves/XContentTypeOptionsValve.java&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;h2&gt;
XFrameOptionsValve.java&lt;/h2&gt;
&lt;hr /&gt;
&lt;script script=&quot;&quot; src=&quot;https://gist-it.appspot.com/https://github.com/bluelotussoftware/tomcat-security-valves/raw/master/src/main/java/com/bluelotussoftware/tomcat/security/valves/XFrameOptionsValve.java&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;h2&gt;
XSSProtectionValve.java&lt;/h2&gt;
&lt;hr /&gt;
&lt;script script=&quot;&quot; src=&quot;https://gist-it.appspot.com/https://github.com/bluelotussoftware/tomcat-security-valves/raw/master/src/main/java/com/bluelotussoftware/tomcat/security/valves/XSSProtectionValve.java&quot;&gt;&lt;/script&gt;

</description><link>http://javaevangelist.blogspot.com/2017/08/apache-tomcat-container-managed.html</link><author>noreply@blogger.com (John Yeary)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCmhiyKb8gA4vONCbxbUfItQFDcuolWs-Czn-CVRCHX9kW1PuPwetLBel9iAI8xU2DIE8DRY5DfVBgrgXW9wSqGT332ZTxjjsUR1GaN917VxJIY06wosP4VkGgPRTIMlNBx2mE/s72-c/j_security_check_results.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-6080405281659509372</guid><pubDate>Fri, 21 Jul 2017 22:27:00 +0000</pubDate><atom:updated>2017-07-21T18:05:17.647-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">frameworks</category><category domain="http://www.blogger.com/atom/ns#">Java</category><title>autolink-java framework</title><description>I have been looking for a good and simple &quot;Java library to extract links (URLs, email addresses) from plain text&quot;. I was searching on Github and found this little gem called &lt;a href=&quot;https://github.com/robinst/autolink-java&quot; target=&quot;_blank&quot;&gt;autolink-java&lt;/a&gt; by Robin Stocker (robinst).&lt;br /&gt;
&lt;br /&gt;
This library was used in a proof-of-concept (POC) I was working on at work. We needed to be able to extract all of the links from a page, and display them. This includes hyperlinks and email addresses. This little gem met the bill, and was quick to parse the text file I used.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/jyeary/38edc1be1d9c0a7c5fb3afc5748859df.js&quot;&gt;&lt;/script&gt;

The example requires the following maven dependencies:&lt;br /&gt;

&lt;script class=&quot;brush: xml&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
      &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupid&gt;org.nibor.autolink&lt;/groupId&gt;
            &lt;artifactid&gt;autolink&lt;/artifactId&gt;
            &lt;version&gt;0.6.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupid&gt;commons-io&lt;/groupId&gt;
            &lt;artifactid&gt;commons-io&lt;/artifactId&gt;
            &lt;version&gt;2.5&lt;/version&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
]]&gt;&lt;/script&gt;

This framework extracted a list of URLs from a file that looks like this:&lt;br /&gt;

&lt;script class=&quot;brush: html&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.dimdim.com/&quot;,,)`&quot;&gt;Dimdim: Web conferencing&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.neooffice.org/neojava/en/index.php&quot;,,)`&quot;&gt;NeoOffice&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.openoffice.org/&quot;,,)`&quot;&gt;OpenOffice&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.zimbra.com/&quot;,,)`&quot;&gt;Zimbra&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://bazaar-vcs.org/&quot;,,)`&quot;&gt;Bazaar Version Control&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.versionsapp.com/&quot;,,)`&quot;&gt;Versions - Mac Subversion Client&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://cocoondev.org/daisy/index.html&quot;,,)`&quot;&gt;daisy&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.bacula.org/&quot;,,)`&quot;&gt;Bacula&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.screencast-o-matic.com/&quot;,,)`&quot;&gt;Screencast-O-Matic&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://cruisecontrol.sourceforge.net/&quot;,,)`&quot;&gt;CruiseControl&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://getfiregpg.org/&quot;,,)`&quot;&gt;FireGPG&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://hotwayd.sourceforge.net/&quot;,,)`&quot;&gt;hotwayd/hotsmtpd&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://jott.com/&quot;,,)`&quot;&gt;Jott™ - Official Site&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.spanningsync.com/&quot;,,)`&quot;&gt;Spanning Sync - Sync iCal and Google Calendar&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://virtualbox.org/&quot;,,)`&quot;&gt;VirtualBox&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.nightskyinfo.com/&quot;,,)`&quot;&gt;The Night Sky This Week&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.kistlermorse.com/&quot;,,)`&quot;&gt;Kistler-Morse&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.clevest.com/&quot;,,)`&quot;&gt;Clevest Solutions Inc.&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.licenseonline.com/&quot;,,)`&quot;&gt;License Online&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.logodesigncreation.com/&quot;,,)`&quot;&gt;Logo Design Creation&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.dhtmlgoodies.com/index.html&quot;,,)`&quot;&gt;DHTMLgoodies&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.prototypejs.org/&quot;,,)`&quot;&gt;Prototype Javascript Library easing the development of dynamic web applications&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://www.openrico.org/&quot;,,)`&quot;&gt;Rico&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://script.aculo.us/&quot;,,)`&quot;&gt;script.aculo.us - web 2.0 javascript&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;`URLTrackRaw(&quot;http://blog.stevenlevithan.com/archives/faster-than-innerhtml&quot;,,)`&quot;&gt;When innerHTML isn’t Fast Enough&lt;/a&gt;&lt;br/&gt;
]]&gt;&lt;/script&gt;
&lt;script type=&quot;syntaxhighlighter&quot; class=&quot;brush: bash&quot;&gt;&lt;![CDATA[
URL : http://www.dimdim.com/
URL : http://www.neooffice.org/neojava/en/index.php
URL : http://www.openoffice.org/
URL : http://www.zimbra.com/
URL : http://bazaar-vcs.org/
URL : http://www.versionsapp.com/
URL : http://cocoondev.org/daisy/index.html
URL : http://www.bacula.org/
URL : http://www.screencast-o-matic.com/
URL : http://cruisecontrol.sourceforge.net/
URL : http://getfiregpg.org/
URL : http://hotwayd.sourceforge.net/
URL : http://jott.com/
URL : http://www.spanningsync.com/
URL : http://virtualbox.org/
URL : http://www.nightskyinfo.com/
URL : http://www.kistlermorse.com/
URL : http://www.clevest.com/
URL : http://www.licenseonline.com/
URL : http://www.logodesigncreation.com/
URL : http://www.dhtmlgoodies.com/index.html
URL : http://www.prototypejs.org/
URL : http://www.openrico.org/
URL : http://script.aculo.us/
URL : http://blog.stevenlevithan.com/archives/faster-than-innerhtml
]]&gt;&lt;/script&gt;
As you can see, it generates a nice extraction of the URLs from the surrounding text. Give it a try and let me know what you think.
&lt;br/&gt;&lt;br/&gt;
&lt;strong&gt;The project has been uploaded to Bitbucket and can be found here: &lt;a href=&quot;https://jyeary@bitbucket.org/bluelotussoftware/autolink-java-extractor&quot;&gt;autolink-java-extractor&lt;/a&gt;.&lt;/strong&gt;

</description><link>http://javaevangelist.blogspot.com/2017/07/autolink-java-framework.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-3554901225410813549</guid><pubDate>Fri, 21 Jul 2017 21:55:00 +0000</pubDate><atom:updated>2017-07-21T16:56:29.345-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">community</category><title>Coming Back Online</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.squadronposters.com/wp-content/uploads/Afg-P-3-16x20v2-250x313.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;313&quot; data-original-width=&quot;250&quot; src=&quot;https://www.squadronposters.com/wp-content/uploads/Afg-P-3-16x20v2-250x313.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
It has been a while since I wrote a blog post on technology. I was trying to figure out my place in the world both professionally, and personally. Everyone has a personal journey. I think mine has just begun again. Over my short life, I have done all sorts of amazing, and some not so amazing things.&lt;br /&gt;
&lt;br /&gt;
One of the things I know is that I need to get back to technology blogging. I have been using all sorts of cool technology, and some frameworks that get things done. Are they always the best... not always, but they solve problems that we face as developers. Sometimes we need something to convert a &lt;code&gt;File&lt;/code&gt; to a &lt;code&gt;List&amp;lt;String&amp;gt;&lt;/code&gt; objects. Sometimes it is reading a list of &lt;code&gt;String&lt;/code&gt; values and finding a URL in the list.&lt;br /&gt;
&lt;br /&gt;
Hopefully, I can give some talented developers a kudo for a good tool, or framework. Perhaps this will be my way of saying thank you. </description><link>http://javaevangelist.blogspot.com/2017/07/coming-back-online.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-2316921825433509636</guid><pubDate>Thu, 04 Aug 2016 18:23:00 +0000</pubDate><atom:updated>2016-08-04T14:40:01.379-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">Internet Explorer</category><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>How to Generate an SHA-2 (SHA-256) Self-Signed Certificate in Java</title><description>I was working on a couple of SSL based issues when I made a couple of observations. The default self-signed key generation in Java does not meet today&#39;s requirements for web development.&lt;br /&gt;
&lt;br /&gt;
SHA-1 based certificates (default) are no longer going to be accepted by the majority of browsers. &lt;a href=&quot;https://blogs.windows.com/msedgedev/2016/04/29/sha1-deprecation-roadmap/&quot; target=&quot;_blank&quot;&gt;Microsoft&lt;/a&gt; has set a deadline of February 2014, &lt;a href=&quot;https://blog.mozilla.org/security/2014/09/23/phasing-out-certificates-with-sha-1-based-signature-algorithms/&quot; target=&quot;_blank&quot;&gt;Mozilla&lt;/a&gt;,&amp;nbsp;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;https://security.googleblog.com/2015/12/an-update-on-sha-1-certificates-in.html&quot; target=&quot;_blank&quot;&gt;Chrome&lt;/a&gt; on 1 January 2017.&lt;br /&gt;
&lt;br /&gt;
Additionally, a key size of less than 2048 is considered insecure as well, so we need to make sure the key size is at least 2048.&lt;br /&gt;
&lt;br /&gt;
So how do you generate a SHA-2 (SHA-256) certificate in Java? Here is an example below.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;keytool -genkey -alias example -keyalg RSA -sigalg SHA256withRSA -keysize 2048 -validity 3650 -keystore keystore.jks&lt;/code&gt;&lt;/pre&gt;
In this example we create a certificate with validity of 10 years. The &lt;code&gt;-sigalg SHA256withRSA&lt;/code&gt; is used to set it to SHA-256.
</description><link>http://javaevangelist.blogspot.com/2016/08/how-to-generate-sha-2-sha-256-self.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-5038988335769150322</guid><pubDate>Tue, 28 Jun 2016 21:45:00 +0000</pubDate><atom:updated>2016-06-28T16:45:50.604-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">JavaMail</category><title>Abuse Report Format (ARF) Message Generator</title><description>&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://upload.wikimedia.org/wikipedia/commons/c/c2/Feedback_loop_(email).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;236&quot; src=&quot;https://upload.wikimedia.org/wikipedia/commons/c/c2/Feedback_loop_(email).png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Wikipedia&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;I have been working on testing a feedback loop, and wanted a simple mechanism to do the testing.&lt;br /&gt;
&lt;br /&gt;
I was surprised that I couldn&#39;t find any framework when I was searching to do it. As any good developer, I decided to write my own way of testing it.&lt;br /&gt;
&lt;br /&gt;
The&amp;nbsp;Abuse Report Format (ARF) Message Generator takes a raw email, and sends it back to the server that sent it as an abuse feedback report.&lt;br /&gt;
&lt;br /&gt;
The code requires JavaMail API and Sun DSN API.&lt;br /&gt;
&lt;br /&gt;
The project includes a custom mailcap file to handle the new ARF report format.&lt;br /&gt;
&lt;br /&gt;
The code is located on Github including the sample usage here:&amp;nbsp;&lt;a href=&quot;https://github.com/bluelotussoftware/arf-message-generator&quot; target=&quot;_blank&quot;&gt;arf-message-generator&lt;/a&gt;</description><link>http://javaevangelist.blogspot.com/2016/06/abuse-report-format-arf-message.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-912578623497654154</guid><pubDate>Sat, 25 Jun 2016 04:43:00 +0000</pubDate><atom:updated>2016-06-24T23:45:16.483-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">logging</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>Log4j2 java.util.logging (JUL) Adapter Example</title><description>&lt;h1&gt;
Introduction&lt;/h1&gt;
&lt;br/&gt;
I was looking for an example of how to implement the java.util.logging (JUL) adapter in a project. This would almost seem to be a no brainer of an idea with lots of examples of how to do it. Alas, I didn&#39;t find much of anything. So I thought I would share some wisdom of how to implement the JUL Adapter.
&lt;br /&gt;&lt;br/&gt;
&lt;h1&gt;
Implementation&lt;/h1&gt;
&lt;br/&gt;
You need to tell the application to use the JUL adapter. There are two easy ways to accomplish this.
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt; The easiest is to pass a VM option to the application: &lt;code&gt;
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Alternatively, you can use a static initializer in your class. This is important because the value needs to be set before the logger is called.
&lt;script class=&quot;brush: java&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
static {
        System.setProperty(&quot;java.util.logging.manager&quot;, &quot;org.apache.logging.log4j.jul.LogManager&quot;);
    }
]]&gt;&lt;/script&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
The code for the project can be found on GitHub here: &lt;a href=&quot;https://github.com/jyeary/log4j2-jul-example&quot;&gt;log4j2-jul-example&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;
Code&lt;/h1&gt;
&lt;br /&gt;
&lt;script src=&quot;//www.gistfy.com/github/jyeary/log4j2-jul-example/src/main/java/com/bluelotussoftware/logging/Main.java?branch=master&amp;amp;lang=java&amp;amp;style=github&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;//www.gistfy.com/github/jyeary/log4j2-jul-example/src/main/resources/log4j2.xml?branch=master&amp;amp;lang=java&amp;amp;style=github&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</description><link>http://javaevangelist.blogspot.com/2016/06/log4j2-javautillogging-jul-adapter.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-649748031964200787</guid><pubDate>Thu, 19 May 2016 15:32:00 +0000</pubDate><atom:updated>2016-05-19T10:32:26.505-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">OS X</category><title>How do I enable rndc on Mac OS X El Capitan (10.11.5)</title><description>So I was trying to figure out how to enable &lt;code&gt;rndc&lt;/code&gt; on El Capitan so I could dump the DNS cache to check name resolution. I could run the command from the command line, but alas it would indicate that it was not listening on port 953. I tried the alternate port 54, but again to no avail. As it turns out, I needed to modify the &lt;b&gt;named.conf &lt;/b&gt;file controls section to get it to work. The &lt;b&gt;named.conf&lt;/b&gt; file is located at&amp;nbsp;&lt;b&gt;/Library/Server/named/named.conf&lt;/b&gt;. You will need to modify it as the super user using &lt;code&gt;sudo&lt;/code&gt;.
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Note:&lt;/strong&gt; I have the Apple Server Application installed&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo nano /Library/Server/named/named.conf
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
The existing file should have a controls section that looks similar to the one below.
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;controls {
        inet ::1 port 54 allow {
                &quot;any&quot;;
        } keys {
                &quot;rndc-key&quot;;
        };
};
&lt;/pre&gt;
&lt;br /&gt;
I added the following &lt;code&gt;inet 127.0.0.1 allow {localhost;};&lt;/code&gt;. So now the configuration looks like:
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;controls {
        inet 127.0.0.1 allow {localhost;};
        inet ::1 port 54 allow {
                &quot;any&quot;;
        } keys {
                &quot;rndc-key&quot;;
        };
};
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need to restart &lt;code&gt;named&lt;/code&gt; service using the following commands.
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo launchctl stop org.isc.named
sudo launchctl start org.isc.named
&lt;/pre&gt;
&lt;br /&gt;
You should be able to use &lt;code&gt;rndc&lt;/code&gt;. To check, you can issue the following command:

&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: bash&quot;&gt;sudo rndc status

version: 9.9.7-P3 &lt;id:464a99d&gt;
CPUs found: 8
worker threads: 8
UDP listeners per interface: 4
number of zones: 100
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
&lt;/id:464a99d&gt;&lt;/pre&gt;</description><link>http://javaevangelist.blogspot.com/2016/05/how-do-i-enable-rndc-on-mac-os-x-el.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-797627892751927457</guid><pubDate>Thu, 24 Mar 2016 19:50:00 +0000</pubDate><atom:updated>2016-03-24T14:50:44.503-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">EE6</category><category domain="http://www.blogger.com/atom/ns#">EE7</category><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">glassfish</category><category domain="http://www.blogger.com/atom/ns#">JavaEE</category><category domain="http://www.blogger.com/atom/ns#">JEE7</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">JSR-311</category><category domain="http://www.blogger.com/atom/ns#">JSR-314</category><category domain="http://www.blogger.com/atom/ns#">Mojarra</category><category domain="http://www.blogger.com/atom/ns#">Netbeans</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>JSF 2.2 Tip of the Day: Using Hibernate Validators with JSF</title><description>&lt;h2&gt;
Introduction&lt;/h2&gt;
Hibernate validators offer a plethora of validators to make your development work much easier. Some of the common ones that are used are &lt;code&gt;@NotNull&lt;/code&gt;, &lt;code&gt;@NotBlank&lt;/code&gt;, and &lt;code&gt;@NotEmpty&lt;/code&gt;. To take advantage of these validators, and avoid some misconceptions, a little information needs to be provided.&lt;br /&gt;
&lt;h2&gt;
@NotNull&lt;/h2&gt;
Everyone likes this particular annotation, and it can be a real life saver. However something that often catches developers using it on JSF is that JSF treats empty form fields as empty strings. This is not the same as &lt;code&gt;null&lt;/code&gt;. So if you want JSF to capture these values and treat them as &lt;code&gt;null&lt;/code&gt; values, you need to tell JSF to do so. This is accomplished by adding the following context parameter to the &lt;strong&gt;web.xml&lt;/strong&gt; file.
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;    &amp;lt;context-param&amp;gt;
         &amp;lt;param-name&amp;gt;javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL&amp;lt;/param-name&amp;gt;
         &amp;lt;param-value&amp;gt;true&amp;lt;/param-value&amp;gt;
    &amp;lt;/context-param&amp;gt;
&lt;/pre&gt;
Once this is added to the context, all blanks will be treated as &lt;code&gt;null&lt;/code&gt; values. Be mindful of any side effects created from this change.
&lt;br /&gt;
&lt;h2&gt;
@NotEmpty&lt;/h2&gt;
This validator causes a lot of confusion. The value can not be &lt;code&gt;null&lt;/code&gt;, but can be any character including whitespace, e.g. You can enter a space, and it will accept it.
&lt;br /&gt;
&lt;h2&gt;
@NotEmpty&lt;/h2&gt;
This is the most useful annotation from my standpoint. This makes sure that the input is not &lt;code&gt;null&lt;/code&gt;, and is not an empty string like white spaces. This is really what I think most developers are really after anyway. They want to make sure that users fill in form fields.
&lt;br /&gt;
&lt;h2&gt;
Code&lt;/h2&gt;
The code for this project can be found on Github, and includes some additional bonus code such as using locales, and custom messages. The code can be found here: &lt;a href=&quot;https://github.com/bluelotussoftware/jsf-hibernate-validator&quot;&gt;jsf-hibernate-validator&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://raw.githubusercontent.com/bluelotussoftware/jsf-hibernate-validator/master/src/main/resources/HibernateValidatorExamples.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;345&quot; src=&quot;https://raw.githubusercontent.com/bluelotussoftware/jsf-hibernate-validator/master/src/main/resources/HibernateValidatorExamples.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>http://javaevangelist.blogspot.com/2016/03/jsf-22-tip-of-day-using-hibernate.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-3500417049819978308</guid><pubDate>Wed, 23 Mar 2016 03:50:00 +0000</pubDate><atom:updated>2016-03-22T22:57:17.901-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">EE6</category><category domain="http://www.blogger.com/atom/ns#">EE7</category><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">glassfish</category><category domain="http://www.blogger.com/atom/ns#">JavaEE</category><category domain="http://www.blogger.com/atom/ns#">JEE7</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">JSR-311</category><category domain="http://www.blogger.com/atom/ns#">JSR-314</category><category domain="http://www.blogger.com/atom/ns#">Mojarra</category><category domain="http://www.blogger.com/atom/ns#">Netbeans</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>JSF 2.2 Tip of the Day: Using ValueExpressions and VariableMapper to set EL using a PhaseListener</title><description>The title seems like a mouthful, and it is. I had some code which I used to demonstrate how to set EL values using a PhaseListener. I was going to delete the code when I decided that it was the second time someone in a short span of time asked me the same question, and I should post how to do it.&lt;br /&gt;
&lt;br /&gt;
The use of a PhaseListener to set EL values seems to the casual observer like Voodoo magic. You will see the EL expressions on the page, and they magically seem to populate. In some ways it is like a classical interceptor which can make your code really seem magical, and lead to confusion. This approach though has its place, and if used correctly can solve a lot of issues. One example is determining if a &lt;code&gt;&amp;lt;ui:include src=&quot;XXX&quot; rendered=&quot;#{EL_VARIABLE_HERE}&quot; /&amp;gt;&lt;/code&gt; should render.&lt;br /&gt;
&lt;br /&gt;
It can also be used to set the &lt;strong&gt;src&lt;/strong&gt; value on the fly. An always popular question on how to resolve.&lt;br /&gt;
&lt;br /&gt;
The project can be found on GitHub here: &lt;a href=&quot;https://github.com/jyeary/jsf-ve-phaselistener&quot;&gt;jsf-ve-phaselistener&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
So the output looks like a nice set of name value pairs using the Greek alphabet as variable names.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjDnGHOwRebHI3wMNRqsdeM_feXkPB01_i-TJcWVlo05je-KNnHM1l0YzaqRckg5CZvkrVkFbcVHcvO_ZXi88k_uj8pT8j7NWOMqGrOztlEyjrsNJOsKVdruSDO19eo-ZMckoq/s1600/PhaseListenerValueExpressionMapper.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjDnGHOwRebHI3wMNRqsdeM_feXkPB01_i-TJcWVlo05je-KNnHM1l0YzaqRckg5CZvkrVkFbcVHcvO_ZXi88k_uj8pT8j7NWOMqGrOztlEyjrsNJOsKVdruSDO19eo-ZMckoq/s320/PhaseListenerValueExpressionMapper.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;//www.gistfy.com/github/jyeary/jsf-ve-phaselistener/src/main/java/com/bluelotussoftware/PhaseListenerImpl.java?branch=master&amp;amp;lang=java&amp;amp;style=github&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</description><link>http://javaevangelist.blogspot.com/2016/03/jsf-22-using-valueexpressions-and.html</link><author>noreply@blogger.com (John Yeary)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjDnGHOwRebHI3wMNRqsdeM_feXkPB01_i-TJcWVlo05je-KNnHM1l0YzaqRckg5CZvkrVkFbcVHcvO_ZXi88k_uj8pT8j7NWOMqGrOztlEyjrsNJOsKVdruSDO19eo-ZMckoq/s72-c/PhaseListenerValueExpressionMapper.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-6727822758385413561</guid><pubDate>Sun, 20 Mar 2016 15:46:00 +0000</pubDate><atom:updated>2017-12-08T08:22:43.760-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">frameworks</category><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>Google Guava IP and Hostname Validation</title><description>I was trying to come up with a way to validate hostnames and IP addresses. I didn&#39;t want to spend time trying to do it myself. I figured that this should be a common situation, and likely someone had already written a tool to do just such a thing. I was right. &lt;a href=&quot;https://github.com/google/guava&quot; target=&quot;_blank&quot;&gt;Google Guava&lt;/a&gt;&amp;nbsp;has a couple of interesting classes that do exactly what I was looking for.&lt;br /&gt;
&lt;br /&gt;
For folks who may not be familiar with &lt;a href=&quot;https://github.com/google/guava&quot; target=&quot;_blank&quot;&gt;Guava&lt;/a&gt;, it is a framework of really helpful utilities that can be used for a variety of situations. Most folks who use&amp;nbsp;&lt;a href=&quot;https://github.com/google/guava&quot; target=&quot;_blank&quot;&gt;Guava&lt;/a&gt;&amp;nbsp;in my experience use the collections classes.&amp;nbsp;However, there is a boon for anyone who digs a little deeper.&lt;br /&gt;
&lt;br /&gt;
We will use two specific classes from the&amp;nbsp;&lt;a href=&quot;https://github.com/google/guava&quot; target=&quot;_blank&quot;&gt;Guava&lt;/a&gt;&amp;nbsp;framework to do our validations. The first is&amp;nbsp;&lt;code&gt;&lt;a href=&quot;http://google.github.io/guava/releases/snapshot/api/docs/com/google/common/net/InternetDomainName.html&quot; target=&quot;_blank&quot;&gt;InternetDomainName&lt;/a&gt;&lt;/code&gt; which is used to validate the domain name. The other is &lt;code&gt;&lt;a href=&quot;http://google.github.io/guava/releases/snapshot/api/docs/com/google/common/net/InetAddresses.html&quot; target=&quot;_blank&quot;&gt;InetAddresses&lt;/a&gt;&lt;/code&gt; to check our IP address for validity.&lt;br /&gt;
&lt;br /&gt;
There are some caveats to the &lt;code&gt;InternetDomainName&lt;/code&gt; class which are explained here: &lt;a href=&quot;https://github.com/google/guava/wiki/InternetDomainNameExplained&quot; target=&quot;_blank&quot;&gt;InternetDomainNameExplained&lt;/a&gt;.
&lt;br /&gt;
&lt;br /&gt;
In the code below, we see that it is very easy to use and it works very well.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/jyeary/d06f9980eb620216ff3a.js&quot;&gt;&lt;/script&gt;

&lt;script class=&quot;brush: bash&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
Is Internet Domain Name: www.bluelotussoftware.com valid? true
Is Internet Domain Name: bluelotussoftware.com valid? true
Is Internet Domain Name: bluelotussoftware valid? true
Is Internet Domain Name: 256.0.0.0 valid? false
Is Internet Address: 256.0.0.0 valid? false
Is Internet Domain Name: 255.255.255.0 valid? false
Is Internet Address: 255.255.255.0 valid? true
Is Internet Domain Name: _xyz.bluelotussoftware.com valid? false
]]&gt;&lt;/script&gt;</description><link>http://javaevangelist.blogspot.com/2016/03/google-guava-ip-and-hostname-validation.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-1910066049536726201</guid><pubDate>Sun, 06 Sep 2015 20:03:00 +0000</pubDate><atom:updated>2015-09-06T15:31:16.515-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">books</category><category domain="http://www.blogger.com/atom/ns#">development</category><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">HTML5</category><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">JavaEE</category><category domain="http://www.blogger.com/atom/ns#">Tomcat</category><category domain="http://www.blogger.com/atom/ns#">Web</category><title>Book Review: Murach&#39;s Java Servlets and JSP</title><description>Cyndi Vasquez sent me this title a while back. I have been so bogged down that I finally got a chance to look at it. Thanks Murach... this is a good book.
&lt;br /&gt;
&lt;br /&gt;
The book is written in a style that many will either love, or hate. I personally am on the former. The pages on the left side are an explanation of the technical matter, and the right side are examples. The book is designed to guide you from front to back on an adventure into programming. Along the safari, I assure you will be pleased. The quarry is knowledge and this book is the tool to capture it.&lt;br /&gt;
&lt;br /&gt;
The books is divided into five sections which will take you from absolute beginner to accomplished Servlet and JSP aficionado. It will even teach you a little about databases, and JSF along the way. There are two appendices that will show you how to set up your computer either Mac, or PC before you get started on your journey.&lt;br /&gt;
&lt;br /&gt;
One of the thrills about this book is the use of &lt;a href=&quot;http://netbeans.org/&quot; target=&quot;_blank&quot;&gt;NetBeans&lt;/a&gt;. I believe that NetBeans is the easiest tool for developing web based applications using Servlets and JSP. It also is my preferred tool for Java development in general. The book not only teaches you about the essentials of the title technologies, but helps you gain an in-depth knowledge of a valuable IDE that you can bank your career on.&lt;br /&gt;
&lt;br /&gt;
Section one covers the basics of the technology and the MVC pattern. This is followed by a crash course on HTML, CSS, and web technologies based on Java. &amp;nbsp;The 8th chapter on EL is a great reference for how to use this important technology in your web applications.&lt;br /&gt;
&lt;br /&gt;
Section three covers essential database skills to get you started with web development. These skills are the bare minimum to get started, but are complete for the purpose of this book. Keep in mind, these are the basics.&lt;br /&gt;
&lt;br /&gt;
Section four is the meat of the book. This covers the advanced Servlet and JSP skills. It also covers some additional technologies like JSF. My favorite parts of this section are chapters 18, 19, and 20. The HTTP Request and Response skills are something every developer should strive to make sure they understand. Chapter 19 covers listeners which are truly your friends. Chapter 20 covers another often misused, abused, and otherwise fantastic technology. The filter can make your life as a web developer a great pleasure, or a rabbit hole in which you feel like &lt;a href=&quot;https://www.adobe.com/be_en/active-use/pdf/Alice_in_Wonderland.pdf&quot; target=&quot;_blank&quot;&gt;Alice in Wonderland&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The final concluding section five puts all of the pieces together in a Music Store website. The Music Store website uses most of the technologies covered, and takes the learner to the next level with clear and concise directions.&lt;br /&gt;
&lt;br /&gt;
Overall this is a great book for anyone interested in learning about Servlet and JSP technology. Please keep in mind that all Java web technologies are based on the Servlet foundation. JSF is nothing more than a veneer on top of this technology as an example.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe align=&quot;center&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&amp;amp;OneJS=1&amp;amp;Operation=GetAdHtml&amp;amp;MarketPlace=US&amp;amp;source=ac&amp;amp;ref=tf_til&amp;amp;ad_type=product_link&amp;amp;tracking_id=javevajohyeas-20&amp;amp;marketplace=amazon&amp;amp;region=US&amp;amp;placement=1890774782&amp;amp;asins=1890774782&amp;amp;linkId=465JRFKP4PYVN5DO&amp;amp;show_border=true&amp;amp;link_opens_in_new_window=true&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;
&lt;/iframe&gt;</description><link>http://javaevangelist.blogspot.com/2015/09/book-review-murachs-java-servlets-and.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-541811634546841805</guid><pubDate>Thu, 02 Apr 2015 03:45:00 +0000</pubDate><atom:updated>2015-04-01T22:45:30.919-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">EE6</category><category domain="http://www.blogger.com/atom/ns#">EE7</category><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">glassfish</category><category domain="http://www.blogger.com/atom/ns#">JavaEE</category><category domain="http://www.blogger.com/atom/ns#">JEE7</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">JSR-311</category><category domain="http://www.blogger.com/atom/ns#">JSR-314</category><category domain="http://www.blogger.com/atom/ns#">Mojarra</category><category domain="http://www.blogger.com/atom/ns#">Netbeans</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>JSF 2.2 Tip of the Day: p:passthrough and How to use it</title><description>I was asking my team to go through their JSF pages, and to update the XML namespaces to use the latest namespace from the JSF 2.2 specification. While I was looking at the code, I found a number of instances where developers were adding attributes like &lt;code&gt;name&lt;/code&gt; to &lt;code&gt;&amp;lt;h:commandButton /&amp;gt;&lt;/code&gt; and NetBeans correctly was identifying that there is an issue with that.&lt;br /&gt;
&lt;br /&gt;
Fortunately, some of these attributes were passing through to the underlying page without needing &lt;code&gt;p:passthrough&lt;/code&gt;. However, you should not rely on such functionality to work. If the VDL Document does not show it as an attribute, you shouldn&#39;t expect it to work.
&lt;br /&gt;
&lt;br /&gt;
Alright, so how do we do it correctly?&lt;br /&gt;
&lt;br /&gt;
There is no magic here. It is simply a matter of adding the attribute with a prefix of &lt;code&gt;p:&lt;/code&gt;, for example &lt;code&gt;p:name=&quot;someName&quot;&lt;/code&gt; for the &lt;code&gt;name&lt;/code&gt; attribute. This will result in the attribute being passed through the rendered and added to the resulting output.&lt;br /&gt;
&lt;br /&gt;
So I have an example, and the resulting output.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/jyeary/5adbeaf898a2e9bb939d.js&quot;&gt;&lt;/script&gt;

The resulting output will run the JavaScript associated with the passed through attributes, or set the CSS styling. Very simple and easy to implement.</description><link>http://javaevangelist.blogspot.com/2015/04/jsf-22-tip-of-day-ppassthrough-and-how.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-90296504578974750</guid><pubDate>Tue, 31 Mar 2015 04:01:00 +0000</pubDate><atom:updated>2017-08-06T23:11:24.628-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">blogging</category><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">Foundation</category><category domain="http://www.blogger.com/atom/ns#">frameworks</category><category domain="http://www.blogger.com/atom/ns#">HTML5</category><category domain="http://www.blogger.com/atom/ns#">Javascript</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>Customizing Blogger</title><description>&lt;h2&gt;
Introduction&lt;/h2&gt;
I want to start by blaming&amp;nbsp;&lt;a href=&quot;http://blog.eisele.net/&quot; target=&quot;_blank&quot;&gt;Markus Eisele&lt;/a&gt;&amp;nbsp;for my misadventures. I was looking at his blog and liked the makeover he gave it. I did find the template he was using, but decided that I would write my own.&amp;nbsp;Well I thought this should be an easy thing to do. I severely underestimated the challenge of making a custom template for myself. It turns out that one of the easiest things turns out to be the hardest. Alright Markus you are off the hook... it may just be my bravado, and belief I can build a better mousetrap that led me down the long lonesome road.&lt;br /&gt;
&lt;br /&gt;
Google is well known for having good and sometimes great APIs for their technology. Blogger is an exception to that rule. There is not one clear cut schema for their layout that I can find ironically using Google itself. You figure with all of the templates and bloggers that this would be covered ad nauseum. &amp;nbsp;It is not though.&lt;br /&gt;
&lt;h2&gt;
Technologies&lt;/h2&gt;
I was looking for a simple and elegant framework to make my blog sites look professional, and also make them portable. I had the following requirements:
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Mature framework&lt;/li&gt;
&lt;li&gt;Can be found on a CDN&lt;/li&gt;
&lt;li&gt;Easy to use&lt;/li&gt;
&lt;li&gt;Simple to implement&lt;/li&gt;
&lt;li&gt;Well Documented&lt;/li&gt;
&lt;li&gt;Lots of examples&lt;/li&gt;
&lt;li&gt;Flexible&lt;/li&gt;
&lt;li&gt;Customizable&lt;/li&gt;
&lt;li&gt;Response UI&lt;/li&gt;
&lt;li&gt;HTML5&lt;/li&gt;
&lt;li&gt;Portable&lt;/li&gt;
&lt;li&gt;JSF Compatible&lt;/li&gt;
&lt;li&gt;Works with NetBeans IDE for Tooling&lt;/li&gt;
&lt;/ol&gt;
I looked at a number of frameworks including &lt;a href=&quot;http://foundation.zurb.com/&quot; target=&quot;_blank&quot;&gt;Foundation&lt;/a&gt;, and &lt;a href=&quot;http://getbootstrap.com/&quot; target=&quot;_blank&quot;&gt;Bootstrap&lt;/a&gt;. I ended up choosing &lt;a href=&quot;http://foundation.zurb.com/&quot; target=&quot;_blank&quot;&gt;Foundation&lt;/a&gt; since it seemed to be easier to use for me. Your milage my vary.
&lt;br /&gt;
&lt;br /&gt;
The first thing I wanted to know was what was the minimum required for a template on Blogger. I discovered that are a couple of versions of the template: an HTML 4.01 version (v.1) and an HTML 5 version (v.2) which are somewhat a hybrid mix of XML, and (X)HTML. I published the basic templates on Gist as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/jyeary/26f10e1a2436f8f3f959.js&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;https://gist.github.com/jyeary/1019a642bd256385eb21.js&quot;&gt;&lt;/script&gt;
I have a couple of different blogs and found them to be different so I thought I would share my findings.
&lt;br /&gt;
&lt;br /&gt;
The next thing I needed to find out was what was the minimal template I would need for using with Foundation. The template below uses a CDN to deliver the required JS/CSS. The template below is the culmination of a lot of work to make it work with the visual tools on Blogger. Remember to backup your existing template before installing mine.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/jyeary/1303573a2f2d7ca00d78.js&quot;&gt;&lt;/script&gt;
&lt;h2&gt;
Conclusion&lt;/h2&gt;
I finally have a working blog site using the new template, and will update all of my sites to use it. My personal non-technical blog site was the first to use the new template. It is still a work in progress, but it looks very nice. Take a peek for yourself at &lt;a href=&quot;http://www.johnyeary.com/&quot; target=&quot;_blank&quot;&gt;John Yeary&lt;/a&gt; Blogger site.&lt;br /&gt;
&lt;br /&gt;
I have compiled a list of links that I found helpful in trying to figure out their layouts and tags in the references below.&lt;br /&gt;
&lt;h2&gt;
References&lt;/h2&gt;
&lt;h2&gt;
Tags&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://support.google.com/blogger/answer/47270#&quot; target=&quot;_blank&quot;&gt;Layouts Data Tags&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://support.google.com/blogger/answer/46995?hl=en&quot; target=&quot;_blank&quot;&gt;Widget Tags for Layouts&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Template References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.thesimplexdesign.com/2011/07/how-to-make-blogger-template-body-and.html&quot; target=&quot;_blank&quot;&gt;How to Make a Blogger Template : The Body and APIs&lt;/a&gt; - This was a comprehensive blog with lots of great explanations.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.bloggeryard.com/2013/11/create-blogger-template-from-scratch.html&quot; target=&quot;_blank&quot;&gt;How To Create Blogger Template From Scratch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.9lessons.info/2014/03/blogger-template-design.html&quot; target=&quot;_blank&quot;&gt;Blogger Template Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://thoughtsomething.blogspot.com/2009/01/understanding-blogger-template-2.html&quot; target=&quot;_blank&quot;&gt;Understanding the Blogger Template - 2&lt;/a&gt; - This is an older article, but useful.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/templateofdoom&quot; target=&quot;_blank&quot;&gt;Template of Doom&lt;/a&gt; - Another older useful article.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Additional References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://bootstrapbay.com/blog/bootstrap-vs-foundation/&quot; target=&quot;_blank&quot;&gt;Bootstrap vs. Foundation: Which Framework is Better?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://javaevangelist.blogspot.com/2015/03/customizing-blogger.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-4886656185950271092</guid><pubDate>Sat, 28 Mar 2015 02:22:00 +0000</pubDate><atom:updated>2016-03-22T22:25:25.961-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">JDK8</category><category domain="http://www.blogger.com/atom/ns#">JSE8</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>A Simple Method to invoke @PreDestroy on a Class</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://images.military.com/media/equipment/ships-and-submarines/ddg-51-arleigh-burke-class-destroyer/burke_6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://images.military.com/media/equipment/ships-and-submarines/ddg-51-arleigh-burke-class-destroyer/burke_6.jpg&quot; height=&quot;228&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I was experimenting with how to invoke a &lt;code&gt;@PreDestroy&lt;/code&gt; annotated method in a class. This will approach will work with other annotations as well.&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/jyeary/61650c6b930ae66ac6e6.js&quot;&gt;&lt;/script&gt;</description><link>http://javaevangelist.blogspot.com/2015/03/a-simple-method-to-invoke-predestroy-on.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-4954025592167247527</guid><pubDate>Wed, 18 Feb 2015 04:43:00 +0000</pubDate><atom:updated>2017-08-06T23:08:28.525-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">EE6</category><category domain="http://www.blogger.com/atom/ns#">EE7</category><category domain="http://www.blogger.com/atom/ns#">JavaEE</category><category domain="http://www.blogger.com/atom/ns#">JEE7</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">JSR-311</category><category domain="http://www.blogger.com/atom/ns#">JSR-314</category><category domain="http://www.blogger.com/atom/ns#">Mojarra</category><category domain="http://www.blogger.com/atom/ns#">Netbeans</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>JSF 2.x Tip of the Day: Implementing a ViewMapListener</title><description>&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://upload.wikimedia.org/wikipedia/commons/8/87/France_1154-en.svg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://upload.wikimedia.org/wikipedia/commons/8/87/France_1154-en.svg&quot; height=&quot;320&quot; width=&quot;268&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;background-color: white; font-family: Lato, sans-serif; font-size: 14px; line-height: 17px; margin-bottom: 10px; margin-top: 10px;&quot;&gt;
&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;i&gt;A map of the lands where the Trobadors flourished.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Lato, sans-serif; font-size: 14px; line-height: 17px; margin-bottom: 10px; margin-top: 10px;&quot;&gt;
&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;i&gt;&quot;&lt;a href=&quot;https://commons.wikimedia.org/wiki/File:France_1154-en.svg#mediaviewer/File:France_1154-en.svg&quot; style=&quot;color: #85bc3c; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;France 1154-en&lt;/a&gt;&quot; by&amp;nbsp;&lt;a href=&quot;https://commons.wikimedia.org/wiki/User:Reigen&quot; style=&quot;color: #85bc3c; text-decoration: none;&quot; target=&quot;_blank&quot; title=&quot;User:Reigen&quot;&gt;Reigen&lt;/a&gt;&amp;nbsp;-&amp;nbsp;&lt;span class=&quot;int-own-work&quot;&gt;Own work&lt;/span&gt;.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: Lato, sans-serif; font-size: 14px; line-height: 17px; margin-bottom: 10px; margin-top: 10px;&quot;&gt;
&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;i&gt;Licensed under&amp;nbsp;&lt;a href=&quot;http://creativecommons.org/licenses/by-sa/4.0&quot; style=&quot;color: #85bc3c; text-decoration: none;&quot; target=&quot;_blank&quot; title=&quot;Creative Commons Attribution-Share Alike 4.0&quot;&gt;CC BY-SA 4.0&lt;/a&gt;&amp;nbsp;via&amp;nbsp;&lt;a href=&quot;http://commons.wikimedia.org/wiki/&quot; style=&quot;color: #85bc3c; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Wikimedia Commons&lt;/a&gt;.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;
Introduction&lt;/h2&gt;
There are a number of &lt;code&gt;SystemEvent&lt;/code&gt;s supported by JSF 2.x. A question that comes up frequently is how to implement them. In a number of cases on &lt;a href=&quot;http://stackoverflow.com/&quot;&gt;stackoverflow&lt;/a&gt;, it is implemented using a &lt;code&gt;PhaseListener&lt;/code&gt;. I was looking for a way to cleanup the view map, or just get values from it before it was destroyed. I decided that the simplest way to do so was to implement a &lt;code&gt;ViewMapListener&lt;/code&gt;. I also noticed that there were very few posts on how to implement it using the &lt;code&gt;faces-config.xml&lt;/code&gt; so I decided to use that approach since it was instructive and more clear to me.&lt;br /&gt;
&lt;h2&gt;
Implementation&lt;/h2&gt;
The basic implementation requires that you add our listener implementation to the &lt;code&gt;faces-config.xml&lt;/code&gt;. The example I have here is designed to get called on a &lt;code&gt;PreDestroyViewMapEvent&lt;/code&gt; which is called on a normal navigation. We can force it though by adding a &lt;code&gt;@PreDestroy&lt;/code&gt; annotation to a method to invoke before being destroyed. Inside the method we would need to get the &lt;code&gt;UIViewroot&lt;/code&gt; view map, and call &lt;code&gt;clear()&lt;/code&gt;. This would cause our listener to be invoked too. It would be a good cleanup mechanism for cleaning up resources on session expiration too, but at the moment this does not work on JSF 2.1. The &lt;code&gt;@PreDestroy&lt;/code&gt; is not called on session timeout on JSF 2.1. This is expected to be an enhancement in JSF 2.2+.&lt;br /&gt;
&lt;br /&gt;
The code for the project can be downloaded from &lt;a href=&quot;http://bitbucket.org/&quot; target=&quot;_blank&quot;&gt;Bitbuket&lt;/a&gt; here:&amp;nbsp;&lt;a href=&quot;https://bitbucket.org/bluelotussoftware/viewmaplistener-example&quot; target=&quot;_blank&quot;&gt;viewmaplistener-example&lt;/a&gt;&lt;br /&gt;&lt;br/&gt;
&lt;script src=&quot;https://gist.github.com/jyeary/00fa0011b29bd64c1bd3254657772e93.js&quot;&gt;&lt;/script&gt;
&lt;h2&gt;
Conclusion&lt;/h2&gt;
The example above is just one mechanism of using a &lt;coe&gt;SystemEvent&lt;/coe&gt; listener. You may decide to read values from the map, and add them to the session, or manipulate it in some other way before the data is destroyed.</description><link>http://javaevangelist.blogspot.com/2015/02/jsf-2x-tip-of-day-implementing.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-4815556110259889796</guid><pubDate>Fri, 26 Dec 2014 15:41:00 +0000</pubDate><atom:updated>2017-08-06T23:19:24.338-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">concurrency</category><category domain="http://www.blogger.com/atom/ns#">example</category><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">JDK7</category><category domain="http://www.blogger.com/atom/ns#">Netbeans</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>ExecutorService Conundrum</title><description>I was asked by someone to solve a problem with threads that they were having. They wanted to cancel a &lt;code&gt;Future&lt;/code&gt; that was sent to an &lt;code&gt;ExecutorService&lt;/code&gt;. I told them to look at a previous posts I had done on the subject. However, they insisted that this was different. So I took a look at the code. Alas, it was slightly different, but like most folks including me, they were too close to the problem to see the answer. I looked at it, and at first glance I thought something was askew, but it was not.
&lt;br /&gt;
&lt;br /&gt;
The code for this project can be downloaded here: &lt;a href=&quot;https://bitbucket.org/bluelotussoftware/runnable-example&quot; target=&quot;_blank&quot;&gt;runnable-example&lt;/a&gt; 
&lt;br /&gt;
&lt;script class=&quot;brush: bash&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
--- exec-maven-plugin:1.2.1:exec (default-cli) @ runnable-example ---
Future cancelled? false
Future done? false
Future cancelled? true
Future done? true
Interrupted
Sleeping...
Sleeping...
Sleeping...
Sleeping...
Sleeping...
Sleeping...
Sleeping...
Sleeping...
Sleeping...
Interrupted
Breaking out of run loop.
]]&gt;&lt;/script&gt;

As you can see from the results of the run, the future is canceled, but still keeps running. Then it gets interrupted, and breaks. So the question is why is it still running after being canceled. 
&lt;br /&gt;
&lt;br /&gt;
Here is the &lt;code&gt;Runnable&lt;/code&gt; and the main class to execute it:
&lt;br /&gt;
&lt;h2&gt;
MyRunnable.java&lt;/h2&gt;
&lt;hr /&gt;
&lt;script class=&quot;brush: java&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
package com.bluelotussoftware.examples.threads;

/**
 *
 * @author John Yeary &lt;jyeary@bluelotussoftware.com&gt;
 * @version 1.0
 */
public class MyRunnable implements Runnable {

    private int counter = 0;

    @Override
    public void run() {

        boolean running = true;

        while (running) {
            try {
                Thread.sleep(1000);
                System.out.println(&quot;Sleeping...&quot;);

            } catch (InterruptedException e) {
                counter++;
                System.out.println(&quot;Interrupted&quot;);
                if (counter &gt; 1) {
                    System.out.println(&quot;Breaking out of run loop.&quot;);
                    running = false;
                }
            }
        }
    }
}
]]&gt;&lt;/script&gt;

&lt;h2&gt;
Main.java&lt;/h2&gt;
&lt;hr /&gt;
&lt;script class=&quot;brush: java&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
package com.bluelotussoftware.examples.threads;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

/**
 *
 * @author John Yeary &lt;jyeary@bluelotussoftware.com&gt;
 * @version 1.0
 */
public class Main {

    public static void main(String[] args) throws InterruptedException {
        // Example #1 Old School
//        Thread t = new Thread(new MyRunnable());
//        t.start();
//        Thread.sleep(5000);
//        t.interrupt();
//        Thread.sleep(2000);
//        t.interrupt();

        // Example #2
        ExecutorService es = Executors.newSingleThreadExecutor();
        MyRunnable r = new MyRunnable();
        Future&lt;?&gt; future = es.submit(r);

        // Sleep the current thread

        // Check the future
        System.out.println(&quot;Future cancelled? &quot; + future.isCancelled());
        System.out.println(&quot;Future done? &quot; + future.isDone());

        future.cancel(true);

        // Check to make sure it really is canceled.
        System.out.println(&quot;Future cancelled? &quot; + future.isCancelled());
        System.out.println(&quot;Future done? &quot; + future.isDone());

        // Execute an orderly shutdown of our service.
        es.shutdown();

        // Wait patiently for 10 seconds for the Threads to cleanup
        if (!es.awaitTermination(10, TimeUnit.SECONDS)) {
            // Kill the service regardless of Thread state.
            es.shutdownNow();
        }
    }

}
]]&gt;&lt;/script&gt;

So the do you have an answer? The answer is at the bottom of the blog. &lt;strong&gt;Don&#39;t peek... think!&lt;/strong&gt;
&lt;br /&gt;
&lt;h2&gt;
Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://javaevangelist.blogspot.com/2014/01/how-do-you-cancel-scheduled-thread-in.html&quot; target=&quot;_blank&quot;&gt;How do you cancel a scheduled Thread in an ExecutorService?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://javaevangelist.blogspot.com/2011/05/how-to-exercise-your-daemons-callable.html&quot; target=&quot;_blank&quot;&gt;How to exercise your Daemons - Callable, Future, and ExecutorService&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://javaevangelist.blogspot.com/2013/09/executorservice-and-countdownlatch.html&quot; target=&quot;_blank&quot;&gt;ExecutorService and CountDownLatch Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Answer&lt;/h2&gt;
Simply because you have canceled it, and even interrupted it; it is still a &lt;strong&gt;running&lt;/strong&gt; thread. It is not scheduled, so you are not &lt;strong&gt;canceling&lt;/strong&gt; it before execution.</description><link>http://javaevangelist.blogspot.com/2014/12/executorservice-conundrum.html</link><author>noreply@blogger.com (John Yeary)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-36773632.post-4198327988032962773</guid><pubDate>Sun, 21 Dec 2014 22:48:00 +0000</pubDate><atom:updated>2017-08-06T23:28:39.382-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">EE6</category><category domain="http://www.blogger.com/atom/ns#">EE7</category><category domain="http://www.blogger.com/atom/ns#">JavaEE</category><category domain="http://www.blogger.com/atom/ns#">JEE7</category><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">JSR-311</category><category domain="http://www.blogger.com/atom/ns#">JSR-314</category><category domain="http://www.blogger.com/atom/ns#">Mojarra</category><category domain="http://www.blogger.com/atom/ns#">Netbeans</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>JSF 2.x Dynamic Encoding</title><description>&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHrfBUWcl5k2laMLNSQ2hyphenhyphenpGEOLyyoHZAubmDu8WS7eRyB8ayU8F_9-AIdXtG0ZIA0o7s1gVTgDKfrSDFCCcqIIsNZGuZMEQLeuucZNoObHzVz8Kw0onhxZRjSzadYDwEdewx0/s1600/JSFViewEncoding.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHrfBUWcl5k2laMLNSQ2hyphenhyphenpGEOLyyoHZAubmDu8WS7eRyB8ayU8F_9-AIdXtG0ZIA0o7s1gVTgDKfrSDFCCcqIIsNZGuZMEQLeuucZNoObHzVz8Kw0onhxZRjSzadYDwEdewx0/s1600/JSFViewEncoding.png&quot; height=&quot;126&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Encoding Examples&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
In an Internationalized world, we need to be able to change the encoding of a JSF page dynamically. In this case, we have some characters encoded in UTF-8, but we want to be able to change the encoding on the page, and have the framework handle the character conversions for our web page.&lt;br /&gt;
&lt;br /&gt;
So how do we do it?&lt;br /&gt;
&lt;br /&gt;
One of the simplest ways is to wrap our page in a &lt;code&gt;&amp;lt;f:view /&amp;gt;&lt;/code&gt; tag. The tag wraps the &lt;code&gt;&amp;lt;head/&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;body/&amp;gt;&lt;/code&gt; elements in our HTML page. In the example above this is accomplished as shown below:

&lt;script class=&quot;brush: xhtml&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
&lt;?xml version=&#39;1.0&#39; encoding=&#39;UTF-8&#39; ?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
      xmlns:f=&quot;http://java.sun.com/jsf/core&quot;
      xmlns:h=&quot;http://java.sun.com/jsf/html&quot;&gt;
    &lt;f:view encoding=&quot;#{encodingBean.encoding}&quot;&gt;
        &lt;h:head&gt;
            &lt;title&gt;모든 좋은 사람들이 자신의 나라의 원조에 오기를이 시간입니다&lt;/title&gt;
        &lt;/h:head&gt;
        &lt;h:body&gt;
            &lt;h1&gt;
Encoding Examples&lt;/h1&gt;
&lt;p&gt;
                JSF handles encoding very well. If you don&#39;t believe it, change the encoding in the dropdown menu, 
                and then check the page source of the rendered page.
            &lt;/p&gt;
&lt;p&gt;
                This example uses UTF-8 encoded text, and then allows the user to switch the encoding type. 
                Note that JSF handles most cases, but some cases are not covered. Here is the original quote:
            &lt;/p&gt;
&lt;blockquote&gt;
                &lt;h:outputText value=&quot;#{encodingBean.weller}&quot;/&gt;
            &lt;/blockquote&gt;
&lt;h2&gt;
Translated Quotes&lt;/h2&gt;
&lt;h:outputText value=&quot;Tämä on aikaa kaikille hyvää miestä tulla auttamaan maansa&quot;/&gt; (Finnish)
            &lt;br/&gt;&lt;br/&gt;
            Tämä on aikaa kaikille hyvää miestä tulla auttamaan maansa (Finnish)
            &lt;br/&gt;
            &lt;br/&gt;
            這是時間對所有的好男人來到他們的國家的援助 (Chinese - Simplified)
            &lt;br/&gt;&lt;br/&gt;
            모든 좋은 사람들이 자신의 나라의 원조에 오기를이 시간입니다 (Korean)
            &lt;br/&gt;
            &lt;h:form id=&quot;form1&quot;&gt;
                &lt;h:selectOneMenu value=&quot;#{encodingBean.encoding}&quot;  onchange=&quot;document.forms[&#39;form1&#39;].submit();&quot;&gt;
                    &lt;f:selectItems value=&quot;#{encodingBean.items}&quot;/&gt;
                &lt;/h:selectOneMenu&gt;
            &lt;/h:form&gt;
        &lt;/h:body&gt;
    &lt;/f:view&gt;
&lt;/html&gt;
]]&gt;&lt;/script&gt;

The code for the backing bean is shown below:
&lt;br /&gt;
&lt;h3&gt;
EncodingBean.java&lt;/h3&gt;
&lt;hr /&gt;
&lt;script class=&quot;brush: js&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[
package com.bluelotussoftware.encoding;

import java.io.Serializable;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.SortedMap;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.model.SelectItem;

/**
 *
 * @author John Yeary &lt;jyeary@bluelotussoftware.com&gt;
 * @version 1.0
 */
@ManagedBean
@ViewScoped
public class EncodingBean implements Serializable {

    private static final long serialVersionUID = -2585222706903579334L;

    private String encoding = &quot;UTF-8&quot;;
    private final String weller = &quot;Now is the time for all good men to come to the aid of their country&quot;;

    public EncodingBean() {
    }

    public String getEncoding() {
        return encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public List&lt;selectitem&gt; getItems() {
        List&lt;selectitem&gt; items = new ArrayList&lt;&gt;();
        SortedMap&lt;String, Charset&gt; charsets = Charset.availableCharsets();
        Set&lt;string&gt; keys = charsets.keySet();
        for (String key : keys) {
            items.add(new SelectItem(key));
        }

        return items;
    }

    public String getWeller() {
        return weller;
    }

}
]]&gt;&lt;/script&gt;

The &lt;a href=&quot;http://netbeans.org/&quot; target=&quot;_blank&quot;&gt;Netbeans&lt;/a&gt; &lt;a href=&quot;http://maven.apache.org/&quot; target=&quot;_blank&quot;&gt;Maven&lt;/a&gt; project can be found here: &lt;a href=&quot;https://bitbucket.org/bluelotussoftware/encoding&quot; target=&quot;_blank&quot;&gt;JSF Dynamic Encoding&lt;/a&gt;</description><link>http://javaevangelist.blogspot.com/2014/12/jsf-2x-dynamic-encoding.html</link><author>noreply@blogger.com (John Yeary)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHrfBUWcl5k2laMLNSQ2hyphenhyphenpGEOLyyoHZAubmDu8WS7eRyB8ayU8F_9-AIdXtG0ZIA0o7s1gVTgDKfrSDFCCcqIIsNZGuZMEQLeuucZNoObHzVz8Kw0onhxZRjSzadYDwEdewx0/s72-c/JSFViewEncoding.png" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>