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

<channel>
	<title>JSP, Tomcat, JDBC, Projects, Example, Program</title>
	<atom:link href="http://www.easywayserver.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.easywayserver.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 26 Jan 2010 07:04:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Struts2 &#8211; Submit tag example</title>
		<link>http://www.easywayserver.com/blog/struts2-submit-tag-example/</link>
		<comments>http://www.easywayserver.com/blog/struts2-submit-tag-example/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 07:04:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=524</guid>
		<description><![CDATA[Submit tag struts 2 example 
Submit tag is used to Submit form to server with input form values, send data to server.
Example will show you how to use Submit tag in struts2

&#60;s:submit key=&#34;Submit&#34; />



]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-submit-tag-example%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-submit-tag-example%2F" height="61" width="51" /></a></div><p><strong>Submit tag struts 2 example</strong> <br />
Submit tag is used to Submit form to server with input form values, send data to server.</p>
<p>Example will show you how to use Submit tag in struts2</p>
<div class="cde cdesize">
<pre><span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>submit</span><span style='color:#274796; '> key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;Submit&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/submit.jpg"  border="0"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-submit-tag-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts2 &#8211; Password input tag example</title>
		<link>http://www.easywayserver.com/blog/struts2-password-input-tag-example/</link>
		<comments>http://www.easywayserver.com/blog/struts2-password-input-tag-example/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 06:52:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=522</guid>
		<description><![CDATA[Password tag struts 2 example 
Password tag is used to get password input from user, send data to server. Struts2 Password tag can get hidden character input data from user in browser.
Example will show you how to use Password tag in struts2

&#60;s:password key=&#34;txtpwd&#34; />



]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-password-input-tag-example%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-password-input-tag-example%2F" height="61" width="51" /></a></div><p><strong>Password tag struts 2 example</strong> <br />
Password tag is used to get password input from user, send data to server. Struts2 Password tag can get hidden character input data from user in browser.</p>
<p>Example will show you how to use Password tag in struts2</p>
<div class="cde cdesize">
<pre><span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>password</span><span style='color:#274796; '> key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;txtpwd&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/password.jpg"  border="0"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-password-input-tag-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts2 &#8211; textarea tag example</title>
		<link>http://www.easywayserver.com/blog/struts2-textarea-tag-example/</link>
		<comments>http://www.easywayserver.com/blog/struts2-textarea-tag-example/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 14:38:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=520</guid>
		<description><![CDATA[Textarea tag struts 2 example 
Textarea tag is used to get input from user, send data to server. Struts2 textarea tag can get more input data from user in browser.
Example will show you how to use textarea tag in struts2

&#60;s:textarea key=&#34;txtArea&#34; value=&#34;value&#34; cols=&#34;50&#34; rows=&#34;5&#34; />



]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-textarea-tag-example%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-textarea-tag-example%2F" height="61" width="51" /></a></div><p><strong>Textarea tag struts 2 example</strong> <br />
Textarea tag is used to get input from user, send data to server. Struts2 textarea tag can get more input data from user in browser.</p>
<p>Example will show you how to use textarea tag in struts2</p>
<div class="cde cdesize">
<pre><span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>textarea</span><span style='color:#274796; '> key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;txtArea&quot;</span><span style='color:#274796; '> </span><span style='color:#074726; '>value</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;value&quot;</span><span style='color:#274796; '> </span><span style='color:#074726; '>cols</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;50&quot;</span><span style='color:#274796; '> </span><span style='color:#074726; '>rows</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;5&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/textarea.jpg"  border="0"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-textarea-tag-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts2 &#8211; Input text tag example</title>
		<link>http://www.easywayserver.com/blog/struts2-input-text-tag-example/</link>
		<comments>http://www.easywayserver.com/blog/struts2-input-text-tag-example/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 11:50:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=517</guid>
		<description><![CDATA[Input text tag struts 2 example Input text tag is used to get input from user, send data to server.
Example will show you how to use Input text tag in struts2

&#60;s:textfield key=&#34;username&#34; />



]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-input-text-tag-example%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-input-text-tag-example%2F" height="61" width="51" /></a></div><p><strong>Input text tag struts 2 example</strong> <br />Input text tag is used to get input from user, send data to server.</p>
<p>Example will show you how to use Input text tag in struts2</p>
<div class="cde cdesize">
<pre><span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:textfield</span><span style='color:#274796; '> </span><span style='color:#074726; '>key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;username&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/inputtag.jpg"  border="0"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-input-text-tag-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts2 &#8211; Validation Example, Struts 2 Validation</title>
		<link>http://www.easywayserver.com/blog/struts2-validation-example-struts-2-validation/</link>
		<comments>http://www.easywayserver.com/blog/struts2-validation-example-struts-2-validation/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 10:02:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=515</guid>
		<description><![CDATA[Struts2 Validation Example Struts2 validation implement by xml file in struts 2. Validation is more easier to implement in struts2. We can define our rules of validation in xml file and use in jsp field. Struts2 provides more options of validation like email validation, integer range validation, form validation field, expression validation, regex validation, required [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-validation-example-struts-2-validation%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-validation-example-struts-2-validation%2F" height="61" width="51" /></a></div><p><strong>Struts2 Validation Example</strong> <br />Struts2 validation implement by xml file in struts 2. Validation is more easier to implement in struts2. We can define our rules of validation in xml file and use in jsp field. Struts2 provides more options of validation like email validation, integer range validation, form validation field, expression validation, regex validation, required validation, requiredstring validation, stringlength validation and etc.</p>
<p>Register jsp struts 2 application form can be validated with number of options which are shown in example. </p>
<p>Example will explain how to use validation in struts 2.</p>
<p>1. <strong>register.jsp</strong> registration form jsp</p>
<div class="cde cdesize">
<pre><span style='color:#a65700;'>&lt;%@</span><span style='color:#000000;'> page contentType=</span><span style='color:#0000e6;'>&quot;text/html; charset=UTF-8&quot;</span><span style='color:#000000;'> </span><span style='color:#a65700;'>%></span>
<span style='color:#a65700;'>&lt;%@</span><span style='color:#000000;'> taglib prefix=</span><span style='color:#0000e6;'>&quot;s&quot;</span><span style='color:#000000;'> uri=</span><span style='color:#0000e6;'>&quot;/struts-tags&quot;</span><span style='color:#000000;'> </span><span style='color:#a65700;'>%></span>
<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>html</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>head</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>title</span><span style='color:#a65700; '>></span>Validation Struts page<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>title</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>head</span><span style='color:#a65700; '>/></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>head</span><span style='color:#a65700; '>></span>

<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>body</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>form</span><span style='color:#274796; '> </span><span style='color:#074726; '>action</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;Register&quot;</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:textfield</span><span style='color:#274796; '> key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;username&quot;</span><span style='color:#a65700; '>/></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:password</span><span style='color:#274796; '> key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;password&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:textfield</span><span style='color:#274796; '> key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;email&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>select</span><span style='color:#274796; '> headerKey</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;&quot;</span><span style='color:#274796; '> headerValue</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;Select Gender&quot;</span><span style='color:#274796; '></span>
<span style='color:#274796; '>&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;gender&quot;</span><span style='color:#274796; '> list</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;#{'M':'Male','F':'Female'}&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:textfield</span><span style='color:#274796; '> key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;postalcode&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:submit</span><span style='color:#a65700; '>/></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>form</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>body</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>html</span><span style='color:#a65700; '>></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/validation/register.jpg"  border="0"/></p>
<p>2. <strong>web.xml</strong></p>
<div class="cde cdesize">
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;web-app id=&quot;WebApp_9&quot; version=&quot;2.4&quot; xmlns=&quot;http://java.sun.com/xml/ns/j2ee&quot;
   xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
   xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd&quot;&gt;

    &lt;display-name&gt;Struts Blank&lt;/display-name&gt;

    &lt;filter&gt;
        &lt;filter-name&gt;struts2&lt;/filter-name&gt;
        &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
    &lt;/filter&gt;

    &lt;filter-mapping&gt;
        &lt;filter-name&gt;struts2&lt;/filter-name&gt;
        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;

    &lt;welcome-file-list&gt;
        &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;

&lt;/web-app&gt;
</pre>
</div>
<p>3. <strong>register.xml</strong></p>
<div class="cde cdesize">
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;!DOCTYPE struts PUBLIC
        &quot;-//Apache Software Foundation//DTD Struts Configuration 2.0//EN&quot;
        &quot;http://struts.apache.org/dtds/struts-2.0.dtd&quot;&gt;

&lt;struts&gt;

    &lt;package name=&quot;register&quot; namespace=&quot;/&quot; extends=&quot;struts-default&quot;&gt;

        &lt;action name=&quot;Register&quot; class=&quot;com.struts2.RegisterAction&quot;&gt;
            &lt;result name=&quot;input&quot;&gt;/register.jsp&lt;/result&gt;
            &lt;result type=&quot;redirectAction&quot;&gt;register.jsp&lt;/result&gt;
        &lt;/action&gt;

        &lt;!-- Add actions here --&gt;
    &lt;/package&gt;
&lt;/struts&gt;
</pre>
</div>
<p>4. <strong>struts.xml</strong></p>
<div class="cde cdesize">
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;!DOCTYPE struts PUBLIC
    &quot;-//Apache Software Foundation//DTD Struts Configuration 2.0//EN&quot;
    &quot;http://struts.apache.org/dtds/struts-2.0.dtd&quot;&gt;

&lt;struts&gt;

    &lt;constant name=&quot;struts.enable.DynamicMethodInvocation&quot; value=&quot;false&quot; /&gt;
    &lt;constant name=&quot;struts.devMode&quot; value=&quot;false&quot; /&gt;

    &lt;include file=&quot;register.xml&quot;/&gt;

    &lt;!-- Add packages here --&gt;

&lt;/struts&gt;
</pre>
</div>
<p>5. <strong>RegisterAction.java</strong></p>
<div class="cde cdesize">
<pre><span style='color:#800000; font-weight:bold; '>package</span><span style='color:#004a43; '> com</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>struts2</span><span style='color:#800080; '>;</span>

<span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> RegisterAction <span style='color:#800000; font-weight:bold; '>extends</span> MyRegisterSupport<span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#800000; font-weight:bold; '>final</span> <span style='color:#bb7977; '>long</span> serialVersionUID <span style='color:#808030; '>=</span> <span style='color:#008c00; '>1</span><span style='color:#006600; '>L</span><span style='color:#800080; '>;</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; font-weight:bold; '>String</span> execute<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#800000; font-weight:bold; '>throws</span> <span style='color:#bb7977; font-weight:bold; '>Exception</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>return</span> SUCCESS<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p>6. <strong>MyRegisterSupport.java</strong></p>
<div class="cde cdesize">
<pre><span style='color:#800000; font-weight:bold; '>package</span><span style='color:#004a43; '> com</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>struts2</span><span style='color:#800080; '>;</span>

<span style='color:#800000; font-weight:bold; '>import</span><span style='color:#004a43; '> com</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>opensymphony</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>xwork2</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>ActionSupport</span><span style='color:#800080; '>;</span>

<span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> MyRegisterSupport <span style='color:#800000; font-weight:bold; '>extends</span> ActionSupport<span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#800000; font-weight:bold; '>final</span> <span style='color:#bb7977; '>long</span> serialVersionUID <span style='color:#808030; '>=</span> <span style='color:#008c00; '>1</span><span style='color:#006600; '>L</span><span style='color:#800080; '>;</span>

    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#bb7977; font-weight:bold; '>String</span> username<span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#bb7977; font-weight:bold; '>String</span> password<span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#bb7977; font-weight:bold; '>String</span> email<span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#bb7977; font-weight:bold; '>String</span> gender<span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#bb7977; font-weight:bold; '>String</span> postalcode<span style='color:#800080; '>;</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; font-weight:bold; '>String</span> getEmail<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>return</span> email<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; '>void</span> setEmail<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span> email<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>this</span><span style='color:#808030; '>.</span>email <span style='color:#808030; '>=</span> email<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; font-weight:bold; '>String</span> getGender<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>return</span> gender<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; '>void</span> setGender<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span> gender<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>this</span><span style='color:#808030; '>.</span>gender <span style='color:#808030; '>=</span> gender<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; font-weight:bold; '>String</span> getPassword<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>return</span> password<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; '>void</span> setPassword<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span> password<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>this</span><span style='color:#808030; '>.</span>password <span style='color:#808030; '>=</span> password<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; font-weight:bold; '>String</span> getPostalcode<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>return</span> postalcode<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; '>void</span> setPostalcode<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span> postalcode<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>this</span><span style='color:#808030; '>.</span>postalcode <span style='color:#808030; '>=</span> postalcode<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; font-weight:bold; '>String</span> getUsername<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>return</span> username<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; '>void</span> setUsername<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span> username<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>this</span><span style='color:#808030; '>.</span>username <span style='color:#808030; '>=</span> username<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p>7. <strong>RegisterAction-validation.xml</strong></p>
<div class="cde cdesize">
<pre><span style='color:#004a43; '>&lt;!</span><span style='color:#004a43; '>DOCTYPE</span> <span style='color:#004a43; '>validators</span> <span style='color:#800000; font-weight:bold; '>PUBLIC</span>
        <span style='color:#0000e6; '>&quot;-//OpenSymphony Group//XWork Validator 1.0.2//EN&quot;</span>
        <span style='color:#0000e6; '>&quot;http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd&quot;</span><span style='color:#004a43; '>></span>

<span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>validators</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field</span> <span style='color:#274796; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>username</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
        <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field-validator</span> <span style='color:#274796; '>type</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>message</span> <span style='color:#274796; '>key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>/></span>
        <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field-validator</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field</span> <span style='color:#274796; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>password</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
        <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field-validator</span> <span style='color:#274796; '>type</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>message</span> <span style='color:#274796; '>key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>/></span>
        <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field-validator</span><span style='color:#a65700; '>></span>
        <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field-validator</span> <span style='color:#274796; '>type</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>stringlength</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>param</span> <span style='color:#274796; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>minLength</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>6<span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>param</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>param</span> <span style='color:#274796; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>trim</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>true<span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>param</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>message</span> <span style='color:#274796; '>key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredpassword</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>/></span>
        <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field-validator</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field</span> <span style='color:#274796; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>email</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
        <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field-validator</span> <span style='color:#274796; '>type</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>message</span> <span style='color:#274796; '>key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>/></span>
        <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field-validator</span><span style='color:#a65700; '>></span>
        <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field-validator</span> <span style='color:#274796; '>type</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>email</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>message</span> <span style='color:#274796; '>key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredemail</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>/></span>
        <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field-validator</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field</span> <span style='color:#274796; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>gender</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
        <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field-validator</span> <span style='color:#274796; '>type</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>message</span> <span style='color:#274796; '>key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>/></span>
        <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field-validator</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field</span> <span style='color:#274796; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>postalcode</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
        <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field-validator</span> <span style='color:#274796; '>type</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>message</span> <span style='color:#274796; '>key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredstring</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>/></span>
        <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field-validator</span><span style='color:#a65700; '>></span>
        <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>field-validator</span> <span style='color:#274796; '>type</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>regex</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>param</span> <span style='color:#274796; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>expression</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>></span><span style='color:#606060; '>&lt;![CDATA[</span>^\d*$<span style='color:#606060; '>]]&gt;</span><span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>param</span><span style='color:#a65700; '>></span>
            <span style='color:#a65700; '>&lt;</span><span style='color:#3F7F7F; '>message</span> <span style='color:#274796; '>key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;</span><span style='color:#0000e6; '>requiredinteger</span><span style='color:#0000e6; '>&quot;</span><span style='color:#a65700; '>/></span>
          <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field-validator</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>field</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#3F7F7F; '>validators</span><span style='color:#a65700; '>></span>
</pre>
</div>
<p>8. <strong>package.properties</strong></p>
<div class="cde cdesize">
<pre>
requiredstring = ${getText(fieldName)} is required.
requiredemail = ${getText(fieldName)} is not in correct format.
requiredpassword = ${getText(fieldName)} should be more than 6 character.
requiredinteger = ${getText(fieldName)} should be numeric.
password = Password
username = User Name
email = Email Address
gender = Gender
postalcode = Postal Code
</pre>
</div>
<p>Validation failed</p>
<p>empty field validation</p>
<p><img src="http://www.easywayserver.com/images/struts2/validation/validate.jpg"  border="0"/></p>
<p>Password field length check</p>
<p><img src="http://www.easywayserver.com/images/struts2/validation/password.jpg"  border="0"/></p>
<p>Integer field validation check struts2</p>
<p><img src="http://www.easywayserver.com/images/struts2/validation/integer.jpg"  border="0"/></p>
<p>Email field validation</p>
<p><img src="http://www.easywayserver.com/images/struts2/validation/email.jpg"  border="0"/></p>
<p><a href="http://www.easywayserver.com/sourcecode/struts2validate.zip">download source code of struts2 validation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-validation-example-struts-2-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts2 &#8211; File tag example</title>
		<link>http://www.easywayserver.com/blog/struts2-file-tag-example/</link>
		<comments>http://www.easywayserver.com/blog/struts2-file-tag-example/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 08:25:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/struts2-file-tag-example/</guid>
		<description><![CDATA[File tag struts 2 example File tag is used to upload file to server with browsing option.
Example will show you how to use file tag in struts2

&#60;s:file name=&#34;myFile&#34; />



]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-file-tag-example%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-file-tag-example%2F" height="61" width="51" /></a></div><p><strong>File tag struts 2 example</strong> <br />File tag is used to upload file to server with browsing option.</p>
<p>Example will show you how to use file tag in struts2</p>
<div class="cde cdesize">
<pre><span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:file</span><span style='color:#274796; '> </span><span style='color:#074726; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;myFile&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/filetag.jpg"  border="0"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-file-tag-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts2 &#8211; Radio button tag example, radiobutton example</title>
		<link>http://www.easywayserver.com/blog/struts2-radio-button-tag-example-radiobutton-example/</link>
		<comments>http://www.easywayserver.com/blog/struts2-radio-button-tag-example-radiobutton-example/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:30:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=512</guid>
		<description><![CDATA[Radio button struts 2 example radio button in struts2 is stateful mean we can get default selected radio button with defining in radio button tag with value attribute. Radio button can be use with list attribute where can define value and label of the radio button.
Example will show you how to use radio button in [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-radio-button-tag-example-radiobutton-example%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-radio-button-tag-example-radiobutton-example%2F" height="61" width="51" /></a></div><p><strong>Radio button struts 2 example</strong> <br />radio button in struts2 is stateful mean we can get default selected radio button with defining in radio button tag with value attribute. Radio button can be use with list attribute where can define value and label of the radio button.</p>
<p>Example will show you how to use radio button in struts2</p>
<div class="cde cdesize">
<pre><span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:radio</span><span style='color:#274796; '> </span><span style='color:#074726; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;smonth&quot;</span><span style='color:#274796; '> list</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;#{'1':'Jan','2':'Feb','3':'Mar'}&quot;</span><span style='color:#274796; '> </span><span style='color:#074726; '>value</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;2&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/radiobuttonstruts2.jpg"  border="0"/></p>
<ul>
<li>1. list will set radio button with value and label </li>
<li>2. value is attribute which set default selected value of  radio button, if we set 2 value it will automatically selected Feb month radiobutton</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-radio-button-tag-example-radiobutton-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts2 &#8211; checkbox tag example, check box example</title>
		<link>http://www.easywayserver.com/blog/struts2-checkbox-tag-example-check-box-example/</link>
		<comments>http://www.easywayserver.com/blog/struts2-checkbox-tag-example-check-box-example/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 07:13:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=510</guid>
		<description><![CDATA[checkbox struts 2 example check box in struts2 is stateful mean we can get default selected check box with defining in checkbox tag. check box use with list option where can define value and id of the checkbox option.
Example will show you how to use check box in struts2

&#60;s:checkboxlist name=&#34;smonth&#34; list=&#34;#{'1':'Jan','2':'Feb','3':'Mar'}&#34; value=&#34;2&#34; />




1. list will [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-checkbox-tag-example-check-box-example%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-checkbox-tag-example-check-box-example%2F" height="61" width="51" /></a></div><p><strong>checkbox struts 2 example</strong> <br />check box in struts2 is stateful mean we can get default selected check box with defining in checkbox tag. check box use with list option where can define value and id of the checkbox option.</p>
<p>Example will show you how to use check box in struts2</p>
<div class="cde cdesize">
<pre><span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:checkboxlist</span><span style='color:#274796; '> </span><span style='color:#074726; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;smonth&quot;</span><span style='color:#274796; '> list</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;#{'1':'Jan','2':'Feb','3':'Mar'}&quot;</span><span style='color:#274796; '> </span><span style='color:#074726; '>value</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;2&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/checkboxstruts2.jpg"  border="0"/></p>
<ul>
<li>1. list will set checkbox with value and label</li>
<li>2. value is attribute which set default selected value of option in check box, if we set 2 value it will automatically selected Feb month checkbox</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-checkbox-tag-example-check-box-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts2 &#8211; Select box tag example</title>
		<link>http://www.easywayserver.com/blog/struts2-select-box-tag-example/</link>
		<comments>http://www.easywayserver.com/blog/struts2-select-box-tag-example/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 06:48:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=508</guid>
		<description><![CDATA[Select box struts 2 example Select box in struts2 is stateful mean now we can get default selected box with defining in select tag. Select box use with list option where can define value and id of the option.
Example will show you how to use select box in struts2

&#60;s:select headerKey=&#34;0&#34; headerValue=&#34;Select Month&#34;
&#xa0;name=&#34;smonth&#34; list=&#34;#{'1':'Jan','2':'Feb','3':'Mar','4':'Apr','5':'May','6':'Jun'}&#34; 
&#xa0;value=&#34;5&#34; />




1. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-select-box-tag-example%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-select-box-tag-example%2F" height="61" width="51" /></a></div><p><strong>Select box struts 2 example</strong> <br />Select box in struts2 is stateful mean now we can get default selected box with defining in select tag. Select box use with list option where can define value and id of the option.</p>
<p>Example will show you how to use select box in struts2</p>
<div class="cde cdesize">
<pre><span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>select</span><span style='color:#274796; '> headerKey</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;0&quot;</span><span style='color:#274796; '> headerValue</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;Select Month&quot;</span><span style='color:#274796; '></span>
<span style='color:#274796; '>&#xa0;</span><span style='color:#074726; '>name</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;smonth&quot;</span><span style='color:#274796; '> list</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;#{'1':'Jan','2':'Feb','3':'Mar','4':'Apr','5':'May','6':'Jun'}&quot;</span><span style='color:#274796; '> </span>
<span style='color:#274796; '>&#xa0;</span><span style='color:#074726; '>value</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;5&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/selectboxstruts2.jpg"  border="0"/></p>
<ul>
<li>1. headerKey will set header default value</li>
<li>2. headerValue will set header default option</li>
<li>3. list will set options with value and text </li>
<li>4. value is attribute  set default selected value of option in select box, if we set 5 value it will automatically selected May month option</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-select-box-tag-example/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Struts2 Example, Struts2 Tutorials, Struts Program</title>
		<link>http://www.easywayserver.com/blog/struts2-example-struts2-tutorials-struts-program/</link>
		<comments>http://www.easywayserver.com/blog/struts2-example-struts2-tutorials-struts-program/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 16:34:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://www.easywayserver.com/blog/?p=506</guid>
		<description><![CDATA[Struts2 Example Apache Struts 2 is simple framework for java MVC pattern. Struts2 is more easier and efficient than previous struts 1.x framework. It is more easier to use and implementation of struts2 based applications.
No more ActionForms in struts2 framework.
POJO Actions, No need to implement all action classes. Execute method can be use in any [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-example-struts2-tutorials-struts-program%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.easywayserver.com%2Fblog%2Fstruts2-example-struts2-tutorials-struts-program%2F" height="61" width="51" /></a></div><p><strong>Struts2 Example</strong> <br />Apache Struts 2 is simple framework for java MVC pattern. Struts2 is more easier and efficient than previous struts 1.x framework. It is more easier to use and implementation of struts2 based applications.</p>
<p>No more ActionForms in struts2 framework.</p>
<p>POJO Actions, No need to implement all action classes. Execute method can be use in any POJO class.</p>
<p>AJAX support, this struts 2 implement Ajax supports</p>
<p>Flexible, this struts2 is more flexible than previous struts framework.</p>
<p>Validation is easier to implement and more controllable in this framework.<br />
Struts2 having separate validation xml for each action class. Validator xml automatically read by framework.</p>
<p>Struts-config.xml is become very simple and less code needs to write in struts.xml file.</p>
<p>In this struts2 example, we have login jsp page and submit to action class and validate form with validator. This is simple example of struts2 with login. If login form fails to with validation, it will return back to login form again and show error to user. Error string we can take from properties file where we define key of error.</p>
<p>Struts2 tutorials will explain how to use struts in login jsp and validate form.</p>
<p>
<h3>8 steps to learn struts2</h3>
</p>
<p>1. <strong>index.jsp</strong> login form jsp</p>
<div class="cde cdesize">
<pre><span style='color:#a65700;'>&lt;%@</span><span style='color:#000000;'> page contentType=</span><span style='color:#0000e6;'>&quot;text/html; charset=UTF-8&quot;</span><span style='color:#000000;'> </span><span style='color:#a65700;'>%></span>
<span style='color:#a65700;'>&lt;%@</span><span style='color:#000000;'> taglib prefix=</span><span style='color:#0000e6;'>&quot;s&quot;</span><span style='color:#000000;'> uri=</span><span style='color:#0000e6;'>&quot;/struts-tags&quot;</span><span style='color:#000000;'> </span><span style='color:#a65700;'>%></span>
<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>html</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>head</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>title</span><span style='color:#a65700; '>></span>Login page<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>title</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>head</span><span style='color:#a65700; '>></span>

<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>body</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>form</span><span style='color:#274796; '> </span><span style='color:#074726; '>action</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;Login&quot;</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:textfield</span><span style='color:#274796; '> key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;username_txt&quot;</span><span style='color:#a65700; '>/></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:password</span><span style='color:#274796; '> key</span><span style='color:#808030; '>=</span><span style='color:#0000e6; '>&quot;password_txt&quot;</span><span style='color:#274796; '> </span><span style='color:#a65700; '>/></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:submit</span><span style='color:#a65700; '>/></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#5f5035; '>:</span><span style='color:#800000; font-weight:bold; '>form</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>body</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>html</span><span style='color:#a65700; '>></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/login.jpg"  border="0"/></p>
<p>2. <strong>logged.jsp</strong> successfully after login form</p>
<div class="cde cdesize">
<pre><span style='color:#a65700;'>&lt;%@</span><span style='color:#000000;'> page contentType=</span><span style='color:#0000e6;'>&quot;text/html; charset=UTF-8&quot;</span><span style='color:#000000;'> </span><span style='color:#a65700;'>%></span>
<span style='color:#a65700;'>&lt;%@</span><span style='color:#000000;'> taglib prefix=</span><span style='color:#0000e6;'>&quot;s&quot;</span><span style='color:#000000;'> uri=</span><span style='color:#0000e6;'>&quot;/struts-tags&quot;</span><span style='color:#000000;'> </span><span style='color:#a65700;'>%></span>
<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>html</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>head</span><span style='color:#a65700; '>></span>
    <span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>title</span><span style='color:#a65700; '>></span>Successfully logged In<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>title</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>head</span><span style='color:#a65700; '>></span>

<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>body</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;</span><span style='color:#800000; font-weight:bold; '>h1</span><span style='color:#a65700; '>></span>Successfully logged in struts2<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>h1</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>body</span><span style='color:#a65700; '>></span>
<span style='color:#a65700; '>&lt;/</span><span style='color:#800000; font-weight:bold; '>html</span><span style='color:#a65700; '>></span>
</pre>
</div>
<p><img src="http://www.easywayserver.com/images/struts2/success.jpg"  border="0"/></p>
<p>3. <strong>web.xml</strong></p>
<div class="cde cdesize">
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;web-app id=&quot;WebApp_9&quot; version=&quot;2.4&quot; xmlns=&quot;http://java.sun.com/xml/ns/j2ee&quot;
   xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
   xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd&quot;&gt;

    &lt;display-name&gt;Struts Blank&lt;/display-name&gt;

    &lt;filter&gt;
        &lt;filter-name&gt;struts2&lt;/filter-name&gt;
        &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
    &lt;/filter&gt;

    &lt;filter-mapping&gt;
        &lt;filter-name&gt;struts2&lt;/filter-name&gt;
        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;

    &lt;welcome-file-list&gt;
        &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;

&lt;/web-app&gt;
</pre>
</div>
<p>4. <strong>mypackage.xml</strong></p>
<div class="cde cdesize">
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;!DOCTYPE struts PUBLIC
        &quot;-//Apache Software Foundation//DTD Struts Configuration 2.0//EN&quot;
        &quot;http://struts.apache.org/dtds/struts-2.0.dtd&quot;&gt;

&lt;struts&gt;

    &lt;package name=&quot;mypackage&quot; namespace=&quot;/&quot; extends=&quot;struts-default&quot;&gt;

        &lt;action name=&quot;Login&quot; class=&quot;com.struts2.LoginAction&quot;&gt;
            &lt;result name=&quot;input&quot;&gt;/index.jsp&lt;/result&gt;
            &lt;result type=&quot;redirectAction&quot;&gt;/logged.jsp&lt;/result&gt;
        &lt;/action&gt;

        &lt;!-- Add actions here --&gt;
    &lt;/package&gt;
&lt;/struts&gt;
</pre>
</div>
<p>5. <strong>struts.xml</strong></p>
<div class="cde cdesize">
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;!DOCTYPE struts PUBLIC
    &quot;-//Apache Software Foundation//DTD Struts Configuration 2.0//EN&quot;
    &quot;http://struts.apache.org/dtds/struts-2.0.dtd&quot;&gt;

&lt;struts&gt;

    &lt;constant name=&quot;struts.enable.DynamicMethodInvocation&quot; value=&quot;false&quot; /&gt;
    &lt;constant name=&quot;struts.devMode&quot; value=&quot;false&quot; /&gt;

    &lt;include file=&quot;mypackage.xml&quot;/&gt;

    &lt;!-- Add packages here --&gt;

&lt;/struts&gt;
</pre>
</div>
<p>6. <strong>LoginAction.java</strong></p>
<div class="cde cdesize">
<pre><span style='color:#800000; font-weight:bold; '>package</span><span style='color:#004a43; '> com</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>struts2</span><span style='color:#800080; '>;</span>

<span style='color:#800000; font-weight:bold; '>import</span><span style='color:#004a43; '> com</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>opensymphony</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>xwork2</span><span style='color:#808030; '>.</span><span style='color:#004a43; '>ActionSupport</span><span style='color:#800080; '>;</span>

<span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#800000; font-weight:bold; '>class</span> LoginAction <span style='color:#800000; font-weight:bold; '>extends</span> ActionSupport<span style='color:#800080; '>{</span>

    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#800000; font-weight:bold; '>final</span> <span style='color:#bb7977; '>long</span> serialVersionUID <span style='color:#808030; '>=</span> <span style='color:#008c00; '>1</span><span style='color:#006600; '>L</span><span style='color:#800080; '>;</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; font-weight:bold; '>String</span> execute<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#800000; font-weight:bold; '>throws</span> <span style='color:#bb7977; font-weight:bold; '>Exception</span> <span style='color:#800080; '>{</span>

        <span style='color:#bb7977; '>boolean</span> errorflag <span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>false</span><span style='color:#800080; '>;</span>

        <span style='color:#800000; font-weight:bold; '>if</span> <span style='color:#808030; '>(</span>isInvalid<span style='color:#808030; '>(</span>getUsername_txt<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#808030; '>)</span><span style='color:#808030; '>)</span>
        <span style='color:#800080; '>{</span>
            errorflag <span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>true</span><span style='color:#800080; '>;</span>
        <span style='color:#800080; '>}</span>

        <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span>errorflag<span style='color:#808030; '>=</span><span style='color:#808030; '>=</span><span style='color:#800000; font-weight:bold; '>false</span><span style='color:#808030; '>)</span>
        <span style='color:#800080; '>{</span>
            <span style='color:#800000; font-weight:bold; '>return</span> INPUT<span style='color:#800080; '>;</span>
        <span style='color:#800080; '>}</span>

        <span style='color:#800000; font-weight:bold; '>return</span> SUCCESS<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>

    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#bb7977; '>boolean</span> isInvalid<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span> value<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
            <span style='color:#800000; font-weight:bold; '>return</span> <span style='color:#808030; '>(</span>value <span style='color:#808030; '>!</span><span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>null</span> <span style='color:#808030; '>|</span><span style='color:#808030; '>|</span> value<span style='color:#808030; '>.</span>length<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#808030; '>></span> <span style='color:#008c00; '>0</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>

    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#bb7977; font-weight:bold; '>String</span> username_txt<span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>private</span> <span style='color:#bb7977; font-weight:bold; '>String</span> password_txt<span style='color:#800080; '>;</span>

    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; font-weight:bold; '>String</span> getPassword_txt<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>return</span> password_txt<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; '>void</span> setPassword_txt<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span> password_txt<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>this</span><span style='color:#808030; '>.</span>password_txt <span style='color:#808030; '>=</span> password_txt<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; font-weight:bold; '>String</span> getUsername_txt<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>return</span> username_txt<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>public</span> <span style='color:#bb7977; '>void</span> setUsername_txt<span style='color:#808030; '>(</span><span style='color:#bb7977; font-weight:bold; '>String</span> username_txt<span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>this</span><span style='color:#808030; '>.</span>username_txt <span style='color:#808030; '>=</span> username_txt<span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
<span style='color:#800080; '>}</span>
</pre>
</div>
<p>7. <strong>LoginAction-validation.xml</strong></p>
<div class="cde cdesize">
<pre>
&lt;!DOCTYPE validators PUBLIC
        &quot;-//OpenSymphony Group//XWork Validator 1.0.2//EN&quot;
        &quot;http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd&quot;&gt;

&lt;validators&gt;
    &lt;field name=&quot;username_txt&quot;&gt;
        &lt;field-validator type=&quot;requiredstring&quot;&gt;
            &lt;message key=&quot;requiredstring&quot;/&gt;
        &lt;/field-validator&gt;
    &lt;/field&gt;
    &lt;field name=&quot;password_txt&quot;&gt;
        &lt;field-validator type=&quot;requiredstring&quot;&gt;
            &lt;message key=&quot;requiredstring&quot;/&gt;
        &lt;/field-validator&gt;
    &lt;/field&gt;
&lt;/validators&gt;
</pre>
</div>
<p>8. <strong>package.properties</strong></p>
<div class="cde cdesize">
<pre>
requiredstring = ${getText(fieldName)} is required.
password_txt = Password
username_txt = User Name
</pre>
</div>
<p>Validation failed</p>
<p><img src="http://www.easywayserver.com/images/struts2/login_error.jpg"  border="0"/></p>
<p>File structure of Struts2</p>
<p>Keep file in this structure</p>
<p><img src="http://www.easywayserver.com/images/struts2/folder.jpg"  border="0"/></p>
<p><a href="http://www.easywayserver.com/sourcecode/struts2.zip">download source code of struts2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.easywayserver.com/blog/struts2-example-struts2-tutorials-struts-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
