<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/index.php?action=history&amp;feed=atom&amp;title=Struts_Validation_in_an_ActionForm</id>
		<title>Struts Validation in an ActionForm - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/index.php?action=history&amp;feed=atom&amp;title=Struts_Validation_in_an_ActionForm"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Struts_Validation_in_an_ActionForm&amp;action=history"/>
		<updated>2026-04-21T16:49:01Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Struts_Validation_in_an_ActionForm&amp;diff=235308&amp;oldid=prev</id>
		<title>Imifos: typo</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Struts_Validation_in_an_ActionForm&amp;diff=235308&amp;oldid=prev"/>
				<updated>2017-11-10T21:54:43Z</updated>
		
		<summary type="html">&lt;p&gt;typo&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:54, 10 November 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l74&quot; &gt;Line 74:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Java]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Java]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:OWASP Java Project]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Imifos</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Struts_Validation_in_an_ActionForm&amp;diff=235304&amp;oldid=prev</id>
		<title>Imifos: Moved page into the right category. See Java space page for me details. Content has not been reviewed in this edit.</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Struts_Validation_in_an_ActionForm&amp;diff=235304&amp;oldid=prev"/>
				<updated>2017-11-10T21:53:03Z</updated>
		
		<summary type="html">&lt;p&gt;Moved page into the right category. See Java space page for me details. Content has not been reviewed in this edit.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:53, 10 November 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l73&quot; &gt;Line 73:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 73:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Struts&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Java&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:OWASP Java Project]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:OWASP Java Project]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Imifos</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Struts_Validation_in_an_ActionForm&amp;diff=204159&amp;oldid=prev</id>
		<title>Imifos: fixing category</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Struts_Validation_in_an_ActionForm&amp;diff=204159&amp;oldid=prev"/>
				<updated>2015-12-01T12:59:40Z</updated>
		
		<summary type="html">&lt;p&gt;fixing category&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 12:59, 1 December 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l74&quot; &gt;Line 74:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Struts]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Struts]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Java]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;OWASP &lt;/ins&gt;Java &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Project&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Imifos</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Struts_Validation_in_an_ActionForm&amp;diff=24634&amp;oldid=prev</id>
		<title>Jeffcityjon: New page: * struts-config.xml &lt;pre&gt;     &lt;struts-config&gt;         &lt;form-beans&gt;             &lt;form-bean name=&quot;logonForm&quot; type=&quot;net.jcj.LogonForm&quot;/&gt;         &lt;/form-beans&gt;         &lt;action-mappings&gt;       ...</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Struts_Validation_in_an_ActionForm&amp;diff=24634&amp;oldid=prev"/>
				<updated>2008-01-23T19:56:26Z</updated>
		
		<summary type="html">&lt;p&gt;New page: * struts-config.xml &amp;lt;pre&amp;gt;     &amp;lt;struts-config&amp;gt;         &amp;lt;form-beans&amp;gt;             &amp;lt;form-bean name=&amp;quot;logonForm&amp;quot; type=&amp;quot;net.jcj.LogonForm&amp;quot;/&amp;gt;         &amp;lt;/form-beans&amp;gt;         &amp;lt;action-mappings&amp;gt;       ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* struts-config.xml&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;struts-config&amp;gt;&lt;br /&gt;
        &amp;lt;form-beans&amp;gt;&lt;br /&gt;
            &amp;lt;form-bean name=&amp;quot;logonForm&amp;quot; type=&amp;quot;net.jcj.LogonForm&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/form-beans&amp;gt;&lt;br /&gt;
        &amp;lt;action-mappings&amp;gt;&lt;br /&gt;
            &amp;lt;action path=&amp;quot;/Logon&amp;quot; forward=&amp;quot;/pages/Logon.jsp&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;action path=&amp;quot;/LogonSubmit&amp;quot; type=&amp;quot;app.jcj.LogonAction&amp;quot; name=&amp;quot;logonForm&amp;quot; &lt;br /&gt;
               scope=&amp;quot;request&amp;quot; validate=&amp;quot;true&amp;quot; input=&amp;quot;/pages/Logon.jsp&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;forward name=&amp;quot;success&amp;quot; path=&amp;quot;/pages/Welcome.jsp&amp;quot;/&amp;gt;&lt;br /&gt;
                &amp;lt;forward name=&amp;quot;failure&amp;quot; path=&amp;quot;/pages/Logon.jsp&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;/action&amp;gt;&lt;br /&gt;
        &amp;lt;/action-mappings&amp;gt;&lt;br /&gt;
        &amp;lt;message-resources parameter=&amp;quot;resources.application&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/struts-config&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* net.jcj.LogonForm&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
package net.jcj;&lt;br /&gt;
&lt;br /&gt;
import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
import org.apache.struts.action.*;&lt;br /&gt;
&lt;br /&gt;
public class LogonForm extends ActionForm&lt;br /&gt;
{&lt;br /&gt;
  private String userId = null;&lt;br /&gt;
  private String password = null;&lt;br /&gt;
&lt;br /&gt;
  public void setUserId (String userId){&lt;br /&gt;
    this.userId = userId ;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  public String getUserId(){&lt;br /&gt;
    return this.userId ;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  public void setPassword (String password){&lt;br /&gt;
    this.password = password;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  public String getPassword(){&lt;br /&gt;
    return this.password;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Resets all properties to their default values.&lt;br /&gt;
     */&lt;br /&gt;
    public void reset(ActionMapping mapping, HttpServletRequest request) {&lt;br /&gt;
      this.userId = null;&lt;br /&gt;
      this.password = null;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Validates the form.  Returns a list of action&lt;br /&gt;
     * Of course in a production environment, your rules would be far more strict than this.&lt;br /&gt;
     */&lt;br /&gt;
  public ActionErrors validate( &lt;br /&gt;
      ActionMapping mapping, HttpServletRequest request ) {&lt;br /&gt;
      ActionErrors errors = new ActionErrors();&lt;br /&gt;
      &lt;br /&gt;
      if( getUserId() == null || getUserId().length() &amp;lt; 1 ) {&lt;br /&gt;
        errors.add(&amp;quot;userId&amp;quot;,new ActionMessage(&amp;quot;error.userid.required&amp;quot;));&lt;br /&gt;
      }&lt;br /&gt;
      if( getPassword() == null || getPassword().length() &amp;lt; 1 ) {&lt;br /&gt;
        errors.add(&amp;quot;password&amp;quot;,new ActionMessage(&amp;quot;error.password.required&amp;quot;));&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      return errors;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Struts]]&lt;br /&gt;
[[Category:Java]]&lt;/div&gt;</summary>
		<author><name>Jeffcityjon</name></author>	</entry>

	</feed>