<?xml version="1.0" encoding="utf-8"?>
<feed
    xmlns="http://www.w3.org/2005/Atom"
    xmlns:at="http://www.sixapart.com/ns/at"
    xmlns:icbm="http://postneo.com/icbm"
    xmlns:rvw="http://purl.org/NET/RVW/0.2/"
    xml:lang="en">
    <title>Life, Opportunity, and Development</title>
    <link rel="self" type="application/atom+xml" title="Life, Opportunity, and Development (Atom)" href="http://cyberkruz.vox.com/library/posts/tags/java/page/1/atom.xml" />
    <link rel="alternate" type="text/html" title="Life, Opportunity, and Development" href="http://cyberkruz.vox.com/library/posts/tags/java/page/1/"/>

    <link rel="service.post" type="application/atom+xml" title="Life, Opportunity, and Development" href="http://www.vox.com/services/atom/svc=post/collection_id=6a00c2251f2742604a00c2251f2743604a" />

    <link rel="service.subscribe" type="application/atom+xml" title="Life, Opportunity, and Development" href="http://cyberkruz.vox.com/library/posts/tags/java/atom.xml" />

    
    
    <link rel="last" type="application/atom+xml" title="Life, Opportunity, and Development" href="http://cyberkruz.vox.com/library/posts/tags/java/page/1/atom.xml" />


    <category term="java" scheme="http://cyberkruz.vox.com/tags/java/?_c=feed-atom-full" label="java" />

    <generator uri="http://www.vox.com/">Vox</generator>
    <updated>2007-06-12T09:08:00Z</updated>

    <author>
        <name>Matthew Kruskamp</name>
        <uri>http://cyberkruz.vox.com/?_c=feed-atom-full</uri>
    </author>

    <id>tag:vox.com,2006:6p00c2251f2742604a/tags/java/</id>

    <subtitle>[witty comment]</subtitle>


    
    <entry>
        <title>JavaServer Faces</title>
    
    
    
        <link rel="alternate" type="text/html" title="JavaServer Faces" href="http://cyberkruz.vox.com/library/post/java-server-faces.html?_c=feed-atom-full" />
    
        
        <link rel="service.post" type="application/atom+xml" title="JavaServer Faces" href="http://cyberkruz.vox.com/library/post/java-server-faces.html?_c=feed-atom-full#comments" />
    
        <link rel="service.edit" type="application/atom+xml" title="JavaServer Faces" href="http://www.vox.com/atom/svc=post/asset_id=6a00c2251f2742604a00d41440a4746a47" /> 
                <id>tag:vox.com,2007-06-12:asset-6a00c2251f2742604a00d41440a4746a47</id>
        <published>2007-06-12T09:06:43Z</published>
        <updated>2007-06-12T09:08:00Z</updated>
    
        <author>
            <name>Matthew Kruskamp</name>
            <uri>http://cyberkruz.vox.com/?_c=feed-atom-full</uri>
        </author>
    
        
        <content type="html" xml:base="http://cyberkruz.vox.com/?_c=feed-atom-full">
            <![CDATA[
                <div xmlns="http://www.w3.org/1999/xhtml" xmlns:at="http://www.sixapart.com/ns/at">
    
    
        
            
            <div style="text-align: center"><strong>Abstract</strong><br /></div><p>&#160;&#160;&#160; JavaServer Faces are another way to take advantage of the MVC model for development. They are an important resource for reusing the view within an MVC design. This article describes an overview to the JavaServer Faces technology as well as how it works, and how it compares with similar technologies.</p><p>&#160;&#160;&#160; With software becoming increasingly the driving force in business everyday, enterprise development continues to evolve creating more extensive ways to manage information.&#160; With requirements of reusability and maintainability, it is no wonder component based methodologies present themselves. J2EE has done a phenomenal job in creating architecture and API’s for component-based development; JavaServer Faces are no exception.<br />&#160;&#160; &#160;JavaServer Faces simplify the creation of reusable user interface components in Java web applications. In short, JavaServer Faces encapsulate the complex portions of the view in MVC design. Originally, a client would send an HTML request to a J2EE web application. The implemented container would manage the request and send it off to a servlet controller. The servlet would then use Java Beans as the model, process information, and redirect the information to an appropriate view (JSP and HTML). <br />&#160;&#160; &#160;Herein lies a particular difficulty. Servlets are reusable components. If a servlet is implemented doing a particular task well, this servlet can be ported to multiple web applications with very little difficulty. This is the nature of component based development saving money and most importantly, time. Views by definition are proprietary to a particular web application. A personal website’s JSPs aren’t implemented on multiple web applications, because they have personal website information on them. JavaServer Faces eradicate this problem while providing even more pre-built functionality to the view portion of the MVC architecture. With JavaServer Faces, portions of a view on personal and business websites can be reused in numerous differing web applications. Moreover, they don’t even require the use of an HTML browser to display, and can be implemented to be rendered many different ways including WML. With this information in mind, how does it work?<br />&#160;&#160;&#160; Just like standard J2EE web applications, JavaServer Faces are powered by XML. Unlike standard J2EE web applications, this is not the application descriptor. JavaServer Faces implement another XML document alongside the application descriptor called the JSF configuration file. This configuration file declares the JavaServer Faces specific components such as: managed beans, validators, converters, navigation rules, and so forth. Although the syntax is beyond the scope of this application, this configuration file makes organization of the project incredibly easy as well as solidifies the loose coupling.<br />&#160;&#160;&#160; Besides linking XML, JavaServer Faces consist of two primary components. These components are JSF API and the tag libraries wiring JSF components to user interfaces. The JSF API is comprised of a series of specifications relating to: interface components, managed beans, validation, conversion, events, navigation, and rendering. The tag libraries contain the specification for integration of created components within a JSP page.<br />&#160;&#160;&#160; JSF user interface components represent component information and behavior. This component might be a button for example. This button would have attributes relating to the text displayed on the button, and when the button is clicked, it would fire an event. Of course, there is a framework provided to create custom user interface components. Another great features is the display for a particular component is independent of the component and a renderer is used to generate the display independent of a particular component.<br />&#160;&#160;&#160; Managed beans are java beans typically implemented to handle input and actions. EL can be used to bind a user interface component to a particular bean action or information. If the button example is used, the actionListener attribute of a button is set to a managed bean using EL. When the button is clicked, the method in the managed bean is fired. This method invocation is similar to swing and covers a lot of the event driven portion of JavaServer Faces. The user information is processed by the server, but what about validation?<br />&#160;&#160;&#160; Since validation is a must in any web application, integrated and custom validation is already provided in the framework. Simple validation rules can be applied to user input controls for things pertaining to lengths and ranges. The Common Validation API is also applied to almost all of the controls within JavaServer Faces. Since the validator framework is pluggable, it is easy to implement validation with any custom control as well. Now Java must handle the view redirection after the data is verified.<br />&#160;&#160;&#160; Navigation is one of the most interesting and powerful pieces of this package. Normally, the problem of navigation is generally solved through HTML links and server side redirection. Although this is sufficient, it creates a tight coupling between servlets, controls, and the display views. The navigation system within JavaServer Faces is managed through the JavaServer Faces configuration file. For any individual request pages, there can be a number of possible responses. These can all be managed with arbitrary labels which redirect to specified pages. For example: If I am specifying an authentication page, there can be a number of responses like success or failure or invalid username. These responses can all be individually mapped to independent pages. This gives an incredible amount of loose coupling keeping the component away from the individual implementation pages.<br />&#160;&#160;&#160; The other primary component of JavaServer Faces is the tag libraries. J2EE provides two different libraries. The JavaServer Faces core tag library and the JavaServer Faces HTML tag library. The core tag library accommodates the implementation of user interface elements in a form. This is validation, conversion, and event listeners. The HTML tag libraries house components for HTML aware browsers. These include input and output tags, command tags, and selection tags. <br />&#160;&#160;&#160; Although the setup of JavaServer Faces is similar to other technologies, JavaServer Faces have fundamental differences with similar implementations. Microsoft’s ASP.NET has a component based control implementation where the display code fires events to a code-behind file. The difference between Microsoft’s ASP.NET implementation and the JavaServer Faces implementation is the coupling. Since a code-behind is usually treated as one entity with the display, the ASP.NET implementation is simpler to use, but more tightly coupled with the view. JavaServer Faces are obviously useful, but what does it take to implement them?<br />&#160;&#160;&#160; To implement JavaServer Faces, one must first start with a JavaServer Faces compliant container. Once this is installed and configured, the only other pre-requisite is the latest Java Development Kit. Since this article is a primer to the technology and not a tutorial on creating JavaServer Faces, the actual code is beyond the scope of this article. <br />&#160;&#160;&#160; Although this article only scratches the surface of this incredible technology, it is easy to see JavaServer Faces are a phenomenal way to reuse MVC view code. They are pre-packaged with powerful tools, and are another way for developers to save time and effort within their development shops. For more information on implementing this technology, consult the sun website as they have an immense archive of tutorials.<br />&#160;</p><p>Bibliography<br />JavaServer Faces Technology. The J2EE 1.4 Tutorial. Retrieved June 10, 2007 from<br />http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFIntro.html</p><p>JavaServer Faces. Wikipedia.com. Retrieved June 10, 2007 from<br />http://en.wikipedia.org/wiki/JavaServer_Faces</p><p>Manganellore, Rakesh (2007) Introduction to JavaServer Faces. JavaBeat. Retrieved June 10, 2007 from<br />http://jsf.javabeat.net/articles/2007/05/java-server-faces-introduction/<br />&#160;</p>
        
    
                <p style="clear:both;">

    <a href="http://cyberkruz.vox.com/library/post/java-server-faces.html?_c=feed-atom-full#comments">Read and post comments</a>

 | 

    
    <a href="http://www.vox.com/share/6a00c2251f2742604a00d41440a4746a47?_c=feed-atom-full">Send to a friend</a>

</p>

                </div>
            ]]>
        </content>
    
    <category term="java" scheme="http://cyberkruz.vox.com/tags/java/" label="java" />
    
    <category term="j2ee" scheme="http://cyberkruz.vox.com/tags/j2ee/" label="j2ee" />
    
    <category term="javaserver faces" scheme="http://cyberkruz.vox.com/tags/javaserver+faces/" label="javaserver faces" />
    
    </entry>

    
    <entry>
        <title>J2EE Custom Simple Tags Part 1</title>
    
    
    
        <link rel="alternate" type="text/html" title="J2EE Custom Simple Tags Part 1" href="http://cyberkruz.vox.com/library/post/j2ee-custom-simple-tags-part-1.html?_c=feed-atom-full" />
    
        
        <link rel="service.post" type="application/atom+xml" title="J2EE Custom Simple Tags Part 1" href="http://cyberkruz.vox.com/library/post/j2ee-custom-simple-tags-part-1.html?_c=feed-atom-full#comments" />
    
        <link rel="service.edit" type="application/atom+xml" title="J2EE Custom Simple Tags Part 1" href="http://www.vox.com/atom/svc=post/asset_id=6a00c2251f2742604a00d09e6a7647be2b" /> 
                <id>tag:vox.com,2007-05-09:asset-6a00c2251f2742604a00d09e6a7647be2b</id>
        <published>2007-05-09T19:05:22Z</published>
        <updated>2008-02-13T18:50:43Z</updated>
    
        <author>
            <name>Matthew Kruskamp</name>
            <uri>http://cyberkruz.vox.com/?_c=feed-atom-full</uri>
        </author>
    
        
        <content type="html" xml:base="http://cyberkruz.vox.com/?_c=feed-atom-full">
            <![CDATA[
                <div xmlns="http://www.w3.org/1999/xhtml" xmlns:at="http://www.sixapart.com/ns/at">
    
    
        
            
            <p>Note: This article assumes you have done some Java web development in the past, and you are capable of compiling and executing web applications with J2EE.</p><p><strong>Overview</strong><br />J2EE has done some amazing things in progressing the creation of custom tags. Now it is fairly easy to integrate any custom HTML tag within your application further separating the view from designers. This article will show you how to implement a custom HTML tag that calculates the square of a number by simply placing &lt;math:square num=&quot;12&quot; /&gt; into your web application. Hopefully, you can feel the power with this simple feature.</p><p><strong>Creating the class</strong><br />Every custom tag extends SimpleTagSupport. This is a class implemented by the J2EE spec which allows a class to output information to a jsp. So, lets get right to coding. Create a class in your web application that extends javax.servlet.jsp.tagext.SimpleTagSupport. If you are compiling by hand, the class file must go in the package structure under /WEB-INF/classes/ i.e. /WEB-INF/classes/com/cyberkruz/test/NewMath.class<br />l<br /><blockquote>

<div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 9pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<p style="margin: 0px;"><span style="color: blue;">package</span> com.cyberkruz.test;</p>
<p style="margin: 0px;">&#160;</p>
<p style="margin: 0px;"><span style="color: blue;">import</span> java.io.*;</p>
<p style="margin: 0px;"><span style="color: blue;">import</span> javax.servlet.jsp.*;</p>
<p style="margin: 0px;"><span style="color: blue;">import</span> javax.servlet.jsp.tagext.SimpleTagSupport;</p>
<p style="margin: 0px;">&#160;</p>

<p style="margin: 0px;"><span style="color: blue;">public</span> <span style="color: blue;">class</span> NewMath <span style="color: blue;">extends</span> SimpleTagSupport {</p>
<p style="margin: 0px;">&#160;</p>
<p style="margin: 0px;">&#160;&#160;&#160; <span style="color: blue;">private</span> <span style="color: teal;">Integer</span> num;</p>
<p style="margin: 0px;">&#160;</p>
<p style="margin: 0px;">&#160;&#160;&#160; <span style="color: green;">/**</span></p>
<p style="margin: 0px;"><span style="color: green;">&#160;&#160;&#160;  * Method overridden which is called</span></p>
<p style="margin: 0px;"><span style="color: green;">&#160;&#160;&#160;  * by the jsp.</span></p>
<p style="margin: 0px;"><span style="color: green;">&#160;&#160;&#160;  */</span></p>

<p style="margin: 0px;">&#160;&#160;&#160; <span style="color: blue;">public</span> <span style="color: blue;">void</span> doTag() <span style="color: blue;">throws</span> JspException, <span style="color: teal;">IOException</span> {</p>
<p style="margin: 0px;">&#160;&#160;&#160; &#160;&#160;&#160; <span style="color: green;">// Gets the jsp context and prints the</span></p>
<p style="margin: 0px;">&#160;&#160;&#160; &#160;&#160;&#160; <span style="color: green;">// number squared.</span></p>
<p style="margin: 0px;">&#160;&#160;&#160; &#160;&#160;&#160; <span style="color: blue;">this</span>.getJspContext().getOut().print(<span style="color: blue;">this</span>.num * <span style="color: blue;">this</span>.num);</p>
<p style="margin: 0px;">&#160;&#160;&#160; }</p>
<p style="margin: 0px;">&#160;</p>
<p style="margin: 0px;">&#160;&#160;&#160; <span style="color: green;">/**</span></p>
<p style="margin: 0px;"><span style="color: green;">&#160;&#160;&#160;  * Sets a number that our custom</span></p>
<p style="margin: 0px;"><span style="color: green;">&#160;&#160;&#160;  * tag squares.</span></p>
<p style="margin: 0px;"><span style="color: green;">&#160;&#160;&#160;  * @param num The number to which</span></p>
<p style="margin: 0px;"><span style="color: green;">&#160;&#160;&#160;  * we want to square.</span></p>
<p style="margin: 0px;"><span style="color: green;">&#160;&#160;&#160;  */</span></p>

<p style="margin: 0px;">&#160;&#160;&#160; <span style="color: blue;">public</span> <span style="color: blue;">void</span> setNum(<span style="color: teal;">Integer</span> num) {</p>
<p style="margin: 0px;">&#160;&#160;&#160; &#160;&#160;&#160; <span style="color: blue;">this</span>.num = num;</p>
<p style="margin: 0px;">&#160;&#160;&#160; }</p>
<p style="margin: 0px;">}</p>
</div>

</blockquote>Every attribute in your custom tag must have a Java Bean mutator property to go with it. This is handled with reflection to send the parameter to your class.</p><p><strong>Configuring the application to use the class<br /></strong>Now, all we have to do is let our application know that the new tag is there. To do so, we can set up a TLD file which looks much like the document descriptor for configuring servlets. So lets do it! Create a new file called MyTags.tld and place it in the /WEB-INF directory. Then type the following:</p><blockquote>

<div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 9pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<p style="margin: 0px;"><span style="color: blue;">&lt;?</span><span style="color: maroon;">xml</span><span style="color: blue;"> </span><span style="color: red;">version</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">1.0</span>&quot;<span style="color: blue;"> </span><span style="color: red;">encoding</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">iso-8859-1</span>&quot;<span style="color: blue;"> ?&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&lt;</span><span style="color: maroon;">taglib</span><span style="color: blue;"> </span><span style="color: red;">xmlns</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">http://java.sun.com/xml/ns/j2ee</span>&quot;<span style="color: blue;"> </span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &#160;&#160;&#160; </span><span style="color: red;">xmlns:xsi</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">http://www.w3c.org/2001/XMLSchema-instance</span>&quot;<span style="color: blue;"> </span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &#160;&#160;&#160; </span><span style="color: red;">xsi:schemaLocation</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</span>&quot;<span style="color: blue;"> </span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &#160;&#160;&#160; </span><span style="color: red;">version</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">2.0</span>&quot;<span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160; &lt;</span><span style="color: maroon;">tlib-version</span><span style="color: blue;">&gt;</span>1.2<span style="color: blue;">&lt;/</span><span style="color: maroon;">tlib-version</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160; &lt;</span><span style="color: maroon;">uri</span><span style="color: blue;">&gt;</span>myTags<span style="color: blue;">&lt;/</span><span style="color: maroon;">uri</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160; &lt;</span><span style="color: maroon;">tag</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: maroon;">description</span><span style="color: blue;">&gt;</span>Custom tags<span style="color: blue;">&lt;/</span><span style="color: maroon;">description</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: maroon;">name</span><span style="color: blue;">&gt;</span>Square<span style="color: blue;">&lt;/</span><span style="color: maroon;">name</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: maroon;">tag-class</span><span style="color: blue;">&gt;</span>com.cyberkruz.test.NewMath<span style="color: blue;">&lt;/</span><span style="color: maroon;">tag-class</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: maroon;">body-content</span><span style="color: blue;">&gt;</span>scriptless<span style="color: blue;">&lt;/</span><span style="color: maroon;">body-content</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: maroon;">attribute</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &#160; &lt;</span><span style="color: maroon;">name</span><span style="color: blue;">&gt;</span>num<span style="color: blue;">&lt;/</span><span style="color: maroon;">name</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &#160; &lt;</span><span style="color: maroon;">required</span><span style="color: blue;">&gt;</span>true<span style="color: blue;">&lt;/</span><span style="color: maroon;">required</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &#160; &lt;</span><span style="color: maroon;">rtexprvalue</span><span style="color: blue;">&gt;</span>true<span style="color: blue;">&lt;/</span><span style="color: maroon;">rtexprvalue</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &lt;/</span><span style="color: maroon;">attribute</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160; &lt;/</span><span style="color: maroon;">tag</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&lt;/</span><span style="color: maroon;">taglib</span><span style="color: blue;">&gt;</span></p>
</div>

</blockquote><p><br />This file configures our web application to use our new custom tag. Multiple tags can be placed and mapped with this single file. The taglib directive just specifies the schemas for this particular file and version. The uri specifies what location these tags are being mapped to. Under the tag element, the description and name should be pretty straight forward. The tag-class element points this tag to the class that we wrote previously. the body-content is stating that we don&#39;t want inline scripting for this element. Now the attribute tag is fairly interesting. While optional, it maps the num variable to our setter in the class we specified. Then, it says we must have it there (required element) and it can be specified at run time (rtexprvalue).</p><p>Now all we have to do is use it!</p><p><strong>Place our new tag in a jsp<br /></strong>Allowing our jsp to use the custom tag is the easiest part. It only requires a single declaration.</p><blockquote>

<div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 9pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<p style="margin: 0px;"><span style="color: blue;">&lt;</span>%<span style="color: maroon;">@</span><span style="color: blue;"> </span><span style="color: red;">taglib</span><span style="color: blue;"></span><span style="color: blue;"> </span><span style="color: red;">prefix</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">math</span>&quot;<span style="color: blue;"> </span><span style="color: red;">uri</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">myTags</span>&quot;<span style="color: blue;"> </span>%<span style="color: blue;">&gt;</span></p>
</div>

</blockquote><p>The taglib keyword tells the jsp what we are trying to do. The prefix is what we want to put before the tags when we call them, and the uri points to the uri specified in the tld file. This is going to load every tag that is configured in that tld file that we made previously. </p><p>Now, let&#39;s put it in a jsp. Create a jsp file called SimpleTest.jsp and place it in your web application. Place the following in your jsp:</p><blockquote>

<div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 9pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<p style="margin: 0px;"><span style="color: blue;">&lt;</span>%<span style="color: maroon;">@page</span><span style="color: blue;"> </span><span style="color: red;">language</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">java</span>&quot;<span style="color: blue;"> </span></p>
<p style="margin: 0px;"><span style="color: red;">contentType</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">text/html; charset=ISO-8859-1</span>&quot;</p>
<p style="margin: 0px;"><span style="color: red;">pageEncoding</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">ISO-8859-1</span>&quot;%<span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&lt;</span>%<span style="color: maroon;">@</span><span style="color: blue;"> </span><span style="color: red;">taglib</span><span style="color: blue;">=</span>&quot;&quot;<span style="color: blue;"> </span><span style="color: red;">prefix</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">math</span>&quot;<span style="color: blue;"> </span><span style="color: red;">uri</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">myTags</span>&quot;<span style="color: blue;"> </span>%<span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;">&#160;</p>
<p style="margin: 0px;"><span style="color: blue;">&lt;</span><span style="color: maroon;">html</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160; &lt;</span><span style="color: maroon;">head</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: maroon;">title</span><span style="color: blue;">&gt;</span>SimpleTest<span style="color: blue;">&lt;/</span><span style="color: maroon;">title</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &lt;</span><span style="color: maroon;">meta</span><span style="color: blue;"> </span><span style="color: red;">http-equiv</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">Content-Type</span>&quot;<span style="color: blue;"> </span><span style="color: red;">content</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">text/html; charset=ISO-8859-1</span>&quot;<span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160;&#160;&#160; &lt;/</span><span style="color: maroon;">head</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&#160; &lt;</span><span style="color: maroon;">body</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;">&#160;&#160;&#160; 10 squared is: <span style="color: blue;">&lt;</span><span style="color: maroon;">math:Square</span><span style="color: blue;"> </span><span style="color: red;">num</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">10</span>&quot;<span style="color: blue;"> /&gt;</span>.</p>
<p style="margin: 0px;"><span style="color: blue;">&#160; &lt;/</span><span style="color: maroon;">body</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: blue;">&lt;/</span><span style="color: maroon;">html</span><span style="color: blue;">&gt;</span></p>
</div>

</blockquote><p>Run it on your web server and... YAY! This is a base introduction to what you can do with custom simple tags. More information about how to use these is below. Enjoy!</p><p><strong>More information<br /><a href="http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags7.html">http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags7.html</a><br /></strong> </p>
        
    
                <p style="clear:both;">

    <a href="http://cyberkruz.vox.com/library/post/j2ee-custom-simple-tags-part-1.html?_c=feed-atom-full#comments">Read and post comments</a>

 | 

    
    <a href="http://www.vox.com/share/6a00c2251f2742604a00d09e6a7647be2b?_c=feed-atom-full">Send to a friend</a>

</p>

                </div>
            ]]>
        </content>
    
    <category term="java" scheme="http://cyberkruz.vox.com/tags/java/" label="java" />
    
    <category term="html" scheme="http://cyberkruz.vox.com/tags/html/" label="html" />
    
    <category term="tutorial" scheme="http://cyberkruz.vox.com/tags/tutorial/" label="tutorial" />
    
    <category term="j2ee" scheme="http://cyberkruz.vox.com/tags/j2ee/" label="j2ee" />
    
    <category term="jsp" scheme="http://cyberkruz.vox.com/tags/jsp/" label="jsp" />
    
    <category term="simple tags" scheme="http://cyberkruz.vox.com/tags/simple+tags/" label="simple tags" />
    
    </entry>

    
    <entry>
        <title>RegWizard - Java Regular Expression Validator</title>
    
    
    
        <link rel="alternate" type="text/html" title="RegWizard - Java Regular Expression Validator" href="http://cyberkruz.vox.com/library/post/regwizard---java-regular-expression-validator.html?_c=feed-atom-full" />
    
        
        <link rel="service.post" type="application/atom+xml" title="RegWizard - Java Regular Expression Validator" href="http://cyberkruz.vox.com/library/post/regwizard---java-regular-expression-validator.html?_c=feed-atom-full#comments" />
    
        <link rel="service.edit" type="application/atom+xml" title="RegWizard - Java Regular Expression Validator" href="http://www.vox.com/atom/svc=post/asset_id=6a00c2251f2742604a00cd971cc7dc4cd5" /> 
                <id>tag:vox.com,2007-03-25:asset-6a00c2251f2742604a00cd971cc7dc4cd5</id>
        <published>2007-03-25T08:32:48Z</published>
        <updated>2007-03-25T08:32:48Z</updated>
    
        <author>
            <name>Matthew Kruskamp</name>
            <uri>http://cyberkruz.vox.com/?_c=feed-atom-full</uri>
        </author>
    
        
        <content type="html" xml:base="http://cyberkruz.vox.com/?_c=feed-atom-full">
            <![CDATA[
                <div xmlns="http://www.w3.org/1999/xhtml" xmlns:at="http://www.sixapart.com/ns/at">
    
    
        
            
            <p><a href="http://nyxtom.vox.com/" class="enclosure-inline-user" at:enclosure="inline-user" at:user-xid="6p00c2251e5b66549d" at:screen-name="Thomas Holloway" at:delegate="people-connect" at:user-pic="http://up6.vox.com/6a00c2251e5b66549d00f30f5a12920001-75si" >Thomas Holloway</a> and I developed a powertoy for building, validating, and parsing regular expressions. Thomas posted a wonderful article with more information <a href="http://nyxtom.vox.com/library/post/regwizard-regular-expression-live-powertoy-1.html">here</a>. This application is definitely a handy one. We have feedback from many University students and professors about the use of the software. Also, we have questions about how the Swing interface was implemented. Overall, a wonderful product that will hopefully be very handy to developers. Feel free to build from the subversion, but be warned, the project is not released yet.</p><p>Release<br />We planned on having a release for the software last week. However, like most software, stuff happened. I will be posting the beta as soon as I get back to Utah (another week or two).<br /> </p>
        
    
                <p style="clear:both;">

    <a href="http://cyberkruz.vox.com/library/post/regwizard---java-regular-expression-validator.html?_c=feed-atom-full#comments">Read and post comments</a>

 | 

    
    <a href="http://www.vox.com/share/6a00c2251f2742604a00cd971cc7dc4cd5?_c=feed-atom-full">Send to a friend</a>

</p>

                </div>
            ]]>
        </content>
    
    <category term="java" scheme="http://cyberkruz.vox.com/tags/java/" label="java" />
    
    <category term="swing" scheme="http://cyberkruz.vox.com/tags/swing/" label="swing" />
    
    <category term="regular expressions" scheme="http://cyberkruz.vox.com/tags/regular+expressions/" label="regular expressions" />
    
    <category term="powertoy" scheme="http://cyberkruz.vox.com/tags/powertoy/" label="powertoy" />
    
    <category term="regwizard" scheme="http://cyberkruz.vox.com/tags/regwizard/" label="regwizard" />
    
    </entry>

    
    <entry>
        <title>Differences between Java 5 and 6</title>
    
    
    
        <link rel="alternate" type="text/html" title="Differences between Java 5 and 6" href="http://cyberkruz.vox.com/library/post/differences-between-java-5-and-6.html?_c=feed-atom-full" />
    
        
        <link rel="service.post" type="application/atom+xml" title="Differences between Java 5 and 6" href="http://cyberkruz.vox.com/library/post/differences-between-java-5-and-6.html?_c=feed-atom-full#comments" />
    
        <link rel="service.edit" type="application/atom+xml" title="Differences between Java 5 and 6" href="http://www.vox.com/atom/svc=post/asset_id=6a00c2251f2742604a00d4141f62936a47" /> 
                <id>tag:vox.com,2007-02-16:asset-6a00c2251f2742604a00d4141f62936a47</id>
        <published>2007-02-16T15:33:14Z</published>
        <updated>2007-03-07T16:07:08Z</updated>
    
        <author>
            <name>Matthew Kruskamp</name>
            <uri>http://cyberkruz.vox.com/?_c=feed-atom-full</uri>
        </author>
    
        
        <content type="html" xml:base="http://cyberkruz.vox.com/?_c=feed-atom-full">
            <![CDATA[
                <div xmlns="http://www.w3.org/1999/xhtml" xmlns:at="http://www.sixapart.com/ns/at">
    
    
        
            
            
<p style="text-align: center; margin-bottom: 0in; line-height: 200%;"><span style="font-family: arial, sans-serif">Differences
Between Java 5 and 6</span></p><p style="text-align: center; margin-bottom: 0in; line-height: 200%;"><br />
</p>
<p style="text-align: center; margin-bottom: 0in; line-height: 200%; page-break-before: always;">
<span style="font-family: arial, sans-serif">Abstract</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;">&#160;&#160;&#160; <span style="font-family: arial, sans-serif">This
article contains information about the differences between the Java 5
and Java 6 frameworks. More specifically, it highlights the new
features added with the latest release of Java 6. The article covers
security, gui, speed, and problems found with the current release. It
discusses opinion on the subject as well as attempting to provide
fact about the latest Java technology. As our projects gear towards
Windows applications, so does this article.</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><br />
</p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%; page-break-before: always;">&#160;&#160;&#160; <span style="font-family: arial, sans-serif">With the new Java 6 emerging,
developers all over the world cringe with the questions of
compatibility and upgrade. Others are optimistic about chance to
tinker with new API&#39;s and tool sets. Although there are a decent
number of changes in this update, this article is aimed to expose
only the ones we found interesting or important. If we miss some,
there is a full list of changes linked at the end of the document.
Java 6 appears to be a bunch of small updates packaged as a new
release. This is a good thing for those worried about the scope of an
upgrade. For those interested in tinkering with new features, the
scripting engines and graphical add-ons should suffice. Although
there aren&#39;t near as many updates as compared to the Java 4 to 5
upgrade, there are definitely some interesting new additions to the
new framework.</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;">&#160;&#160;&#160; <span style="font-family: arial, sans-serif">First,
lets talk optimization. With an expansion of any API or system,
slowing down is always a primary concern. However, a large portion of
the new Java enhancements are actually speed related. How Java
handles desktop applications is now more optimized with faster
loading times and double buffering. The adaptive optimization system
does even more things to optimize your code upon compilation and
runtime. This also applies to split byte code verification which is
now done partially at compile-time and partially at runtime. As a
note, byte code verification was originally done right when it was
about to be used, which slows things down. With all these speed
increased, did they mention security features?</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;">&#160;&#160;&#160; <span style="font-family: arial, sans-serif">This
security section starts with an interesting little tidbit about Web
Start Applications. Sun appears to be heavily pushing Java 6 with
what they call “Security Versioning.” It states that Java Web
Start applications not identifying themselves with the latest version
of Java will require users to explicitly give permission before
executing a particular Java Web Start program. This seems mildly
annoying but apt in moving development to newer versions. The site
says that signed Java Web Start applications are not affected by the
change. Another main security feature added is GSS/Kerberos
integration and a certificate request framework apparently working
under a large number of protocols. Java added support for a numerous
amount of new encryption types. Some little features include
SSLParameters class that encapsulates the configuration of SSL
connections and new parameters and options for some of the security
related classes. The changes even filter down to the socket level.
Socket read timeouts are now fully supported where as before, there
were inconsistencies. So if you are treading into socketland, you
will be happy to know that the libraries are still being supported
very well. Networking updates don&#39;t end at the low level however.</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;">&#160;&#160;&#160; <span style="font-family: arial, sans-serif">Web
Services have a wonderful set of updates as well. Cryptography
directly on XML is an awaited feature on the enterprise side of
development that made it into this release. Support for .NET web
services is another interesting feature added to the new
implementation allowing ease of interoperability when designing large
systems. This feature is documented, although we have not tested it
ourselves. The XML libraries use STAX for message processing, and
have 2 new tools to aid in development and deployment. They also
included a few new classes to make connections and publishing more
simple then ever before.</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;">&#160;&#160;&#160; <span style="font-family: arial, sans-serif">Developers
Developers? Yes indeed. From the text above, you can see that Java 6
caters to the developer (as they should since they are writing a
development language). And it doesn&#39;t stop there. A developer can now
compile code directly from other code within a Java application. What
about if the code breaks? All the debugging information including
warnings, errors, etc... get sent back to the  application so the
application can handle things properly. Code generation now seems
more powerful then ever. There are also a few more neat little tricks
like developers attaching to an existing JVM for more in-depth
debugging. Don&#39;t laugh .NET developers, we know you can do that
already.</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: arial, sans-serif">	Away
from the enterprise server side of things, the User Interface updates
are definitely of note. For a Windows developer, these updates have
not come fast enough. True double buffering is one notable feature
which buffers every window instead of every application. Another nice
feature is baseline/gap API&#39;s and text-component printing. They even
are nice enough to throw in a custom splash screen that can be used
with a swing application for those lengthy load times. Sun seems to
finally understand that desktop GUI&#39;s look different depending on the
operating system. They have designed the latest version of swing to
look different based on the graphical engine running the swing code.
Before, this required special code during the Jframe instantiation.
For native look and feel, the features include: GTK Native Look and
Feel, Avalon Look and Feel, as well as a number of Windows based
fixes. These updates are rumored to speed up the graphical side of
things quite a bit as previously stated. To add a few more flavors of
icing on the cake Java applications have the ability to access
desktop applications, they have live updating on window resizing
(finally), and some miscellaneous hardware acceleration tweaks are
involved. All in all, I would say Java now has a pretty powerful
forms application development library. What more could you ask for?</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;">&#160;&#160;&#160; <span style="font-family: arial, sans-serif">As
for miscellaneous features, Java has implemented a nice way to
integrate scripting languages in with Java source code. The actual
Sun site directly comments on merging JavaScript, Ruby, and Python
into custom scripting engines which allow different team members with
different backgrounds to integrate code. This framework allows
scripting languages to access internal parts of your application with
a small code base as the scripting engine. We didn&#39;t spend an
extensive amount of time delving into this feature although it is
something worth exploring in the future.</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: arial, sans-serif">	With
all of these cool new API upgrades, there are some things that
confuse us. For example, some of the speed specification
documentation is missing from the Sun website. The whitepaper for
Java 6 performance redirects to a page simply saying “Coming Soon.”
Also, they have appeared to add some features that the community was
directly against even though this release was set on community action
and involvement. A small scale HTTP server was added to Java 6 which
is based on a bug report sent by someone in the community. Every
person commenting on the particular bug deemed it unnecessary. As
well, a few data types were added to the framework that appeared to
be fairly meaningless. The double sided queue was one of those data
types. One man&#39;s bloat is another man&#39;s godsend though; I hope people
find use in the new types. The most immense bother is the one to one
relationship still required by the JVM to launch desktop
applications. We are hoping this problem will be dealt with in the
near future. The need for a separate JVM for interpreted language was
fixed with .NET, and users don&#39;t enjoy the lengthy load times
associated with launching two applications for every one application.
We won&#39;t mention the memory waste.</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;">&#160;&#160;&#160; <span style="font-family: arial, sans-serif">Despite
the issues, every developer knows that ironing out  problems takes a
lengthy amount of time. This especially applies to replacing
production code which many developers currently rely on. With that
said, don&#39;t expect things to be perfect any time soon. The emergence
of Java 6 brought some new possibilities in development to the table
which everyone loves, although we didn&#39;t see many things catering to
our love of coding to robots. There are only a few complaints about
the new framework, and none of them seem to hinder the framework
enough to justify not upgrading (this especially applies to those
interested in Web services and those affected by “Security
Versioning”. These new features are essential as this language
makes an effort to stay on top. </span>
</p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: arial, sans-serif">	</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><br />
</p>
<p style="text-align: center; margin-bottom: 0in; line-height: 200%; page-break-before: always;">
<span style="font-family: arial, sans-serif">References</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: courier new, monospace"><span style="font-family: arial, sans-serif">Java
SE 6 Release Notes
</span><a href="http://java.sun.com/javase/6/webnotes/features.html"><span style="font-family: arial, sans-serif">http://java.sun.com/javase/6/webnotes/features.html</span></a></span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: arial, sans-serif">Bruno,
Eric (2006, February 27) Java SE First Impressions: A Desktop Winner</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: courier new, monospace"><a href="http://www.devx.com/Java/Article/30722"><span style="font-family: arial, sans-serif">http://www.devx.com/Java/Article/30722</span></a></span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: arial, sans-serif">Java
6 Security Enhancements</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: courier new, monospace"><a href="http://java.sun.com/javase/6/docs/technotes/guides/security/enhancements.html"><span style="font-family: arial, sans-serif">http://java.sun.com/javase/6/docs/technotes/guides/security/enhancements.html</span></a></span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: arial, sans-serif">Mullan,
Sean (2006, February 15) Mustang Beta is out! Here&#39;s what&#39;s new in
security.</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: courier new, monospace"><a href="http://weblogs.java.net/blog/mullan/archive/2006/02/mustang_beta_is_1.html"><span style="font-family: arial, sans-serif">http://weblogs.java.net/blog/mullan/archive/2006/02/mustang_beta_is_1.html</span></a></span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: arial, sans-serif">vivekp
(2006, December 12) Webservices in JDK 6</span></p>
<p style="text-align: left; margin-bottom: 0in; line-height: 200%;"><span style="font-family: courier new, monospace"><a href="http://weblogs.java.net/blog/vivekp/archive/2006/12/webservices_in.html"><span style="font-family: arial, sans-serif">http://weblogs.java.net/blog/vivekp/archive/2006/12/webservices_in.html</span></a></span></p>

        
    
                <p style="clear:both;">

    <a href="http://cyberkruz.vox.com/library/post/differences-between-java-5-and-6.html?_c=feed-atom-full#comments">Read and post comments</a>

 | 

    
    <a href="http://www.vox.com/share/6a00c2251f2742604a00d4141f62936a47?_c=feed-atom-full">Send to a friend</a>

</p>

                </div>
            ]]>
        </content>
    
    <category term="java" scheme="http://cyberkruz.vox.com/tags/java/" label="java" />
    
    <category term="apa" scheme="http://cyberkruz.vox.com/tags/apa/" label="apa" />
    
    <category term="web services" scheme="http://cyberkruz.vox.com/tags/web+services/" label="web services" />
    
    <category term="5" scheme="http://cyberkruz.vox.com/tags/5/" label="5" />
    
    <category term="optimization" scheme="http://cyberkruz.vox.com/tags/optimization/" label="optimization" />
    
    <category term="neumont" scheme="http://cyberkruz.vox.com/tags/neumont/" label="neumont" />
    
    <category term="1.6" scheme="http://cyberkruz.vox.com/tags/1.6/" label="1.6" />
    
    <category term="1.5" scheme="http://cyberkruz.vox.com/tags/1.5/" label="1.5" />
    
    <category term="scripting language" scheme="http://cyberkruz.vox.com/tags/scripting+language/" label="scripting language" />
    
    <category term="6 security" scheme="http://cyberkruz.vox.com/tags/6+security/" label="6 security" />
    
    </entry>

</feed>


