alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Struts example source code file (fieldValidatorsExample.jsp)

This example Struts source code file (fieldValidatorsExample.jsp) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Struts tags/keywords

appear, date, error, field, field, here, here, length, required, string, string, validator, validator, will

The Struts fieldValidatorsExample.jsp source code

<%-- 
   fieldValidatorExample.jsp
   
   @author tm_jee
   @version $Date: 2007-07-10 21:48:47 +0200 (Tue, 10 Jul 2007) $ $Id: fieldValidatorsExample.jsp 555058 2007-07-10 19:48:47Z musachy $
--%>

<%@taglib prefix="s" uri="/struts-tags" %>

<html>
    <head>
        <title>Showcase - Validation - Field Validators Example
        <s:url var="siteCss" includeContext="true" value="/validation/validationExamplesStyles.css" />
        <s:head theme="xhtml"/>
        <!--  link rel="stylesheet" type="text/css" href='
    </head>
    <body>
    
    <!-- START SNIPPET: fieldValidatorsExample -->
    
        <h3>All Field Errors Will Appear Here
        <s:fielderror />
        <hr/>
        
        <h3>Field Error due to 'Required String Validator Field' Will Appear Here
        <s:fielderror>
            <s:param value="%{'requiredStringValidatorField'}" />
        </s:fielderror>
        <hr/>
        
        <h3>Field Error due to 'String Length Validator Field' Will Appear Here
        <s:fielderror>
            <s:param>stringLengthValidatorField
        </s:fielderror>
        <hr/>
    
        <s:form action="submitFieldValidatorsExamples" namespace="/validation" method="POST" theme="xhtml">
            <s:textfield label="Required Validator Field" name="requiredValidatorField" />
            <s:textfield label="Required String Validator Field" name="requiredStringValidatorField" />
            <s:textfield label="Integer Validator Field" name="integerValidatorField" />
            <s:textfield label="Date Validator Field" name="dateValidatorField" />
            <s:textfield label="Email Validator Field" name="emailValidatorField" />
            <s:textfield label="URL Validator Field" name="urlValidatorField" />
            <s:textfield label="String Length Validator Field" name="stringLengthValidatorField" />
            <s:textfield label="Regex Validator Field" name="regexValidatorField"/>
            <s:textfield label="Field Expression Validator Field" name="fieldExpressionValidatorField" />
            <s:submit label="Submit" />
        </s:form>
        
    <!-- END SNIPPET: fieldValidatorsExample -->
        
        
        <s:include value="footer.jsp" />
    </body>
</html>

Other Struts examples (source code examples)

Here is a short list of links related to this Struts fieldValidatorsExample.jsp source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.