Listing 1

...
public void buildXMLMessage() throws ParserConfigurationException {

 // initiate document builder to prepare the media of XML Message
 this.rootElement = new Element(CONSTANT_MESSAGE);

addNextXMLMessage();

 }
...
public void addNextXMLMessage() throws ParserConfigurationException {

// creating the xml message based on format above
Element identityElement = new Element(CONSTANT_IDENTITY);

identityElement.setAttribute(CONSTANT_NAME, this.identity);

Element descriptionElement = new  Element(CONSTANT_DESCRIPTION);
descriptionElement.addContent(this.description);
identityElement.addContent(descriptionElement);
		rootElement.addContent(identityElement);
    }

Listing 2

public void process(HttpServletRequest req, HttpServletResponse resp)
            throws IOException, ServletException
    {
        if ( request.getParameter(CONSTANT_VALIDATION_FRAMEWORK_ARG) != null )
        {
...
this.processValidate(req, resp, form, mapping);
 response.setContentType(CONSTANT_XML_CONTENT_TYPE);
             response.getWriter().write(sbXMLMessage.toString());
             response.flushBuffer();

            }
        } else
        {
            super.process(req, resp);
        }
    }

Listing 3

<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>ajaxLib</shortname>

<tag>
<name>library</name>
<tagclass>net.sf.ajax.taglib.AjaxJavaScriptLibrary
</tagclass>
<bodycontent>JSP</bodycontent>
</tag>

<tag>
<name>error</name>
<tagclass>net.sf.ajax.taglib.AjaxErrorHtmlRender
</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>property</name>
	<required>true</required>
	<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>event</name>
	<required>true</required>
	<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>

</taglib>

Listing 4

<field property="paternText"
       depends="required,mask">
       <arg0 key="label.paternText"/>
       <var>
	    <var-name>mask</var-name>
	    <var-value>^[0-9]{3}-[0-9]{2}$</var-value>
	</var>
</field>
<field property="minLength"
       depends="minlength">
     <arg0 key="label.minLength"/>
     <arg1 key="${var:minlength}" resource="false"/>
     <var>
          <var-name>minlength</var-name>
          <var-value>5</var-value>
      </var>
</field>

<field property="maxLength"
       depends="maxlength">
       <arg0 key="label.maxLength"/>
       <arg1 key="${var:maxlength}" resource="false"/>
       <var>
            <var-name>maxlength</var-name>
            <var-value>5</var-value>
        </var>
</field>

<field property="email"
       depends="email">
        <arg0 key="label.email"/>		        
</field>