Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Structs - NoClassDefFoundError

Structs - NoClassDefFoundError

2003-11-29       - By Glenn

 Back
Hi I have the problem below where the ActionForm seems be unable to be found
when my class com.pp.webDomain.actions.animal.AnimalTypeForm inherit from my
AbstractForm (subclasses the structs actionForm class). However, if I directly
inherit from org.apache.struts.action.ActionForm Source code of org.apache.struts.action.ActionForm (normal struts class) it is
works fine.

I have checked the following :

1) Struct.jar is in /WEB-INF/Lib directory
2) AnimalTypeForm is in the classes directory
3) Config.xml is in the /WEB-INF directory along with all the strut's .tld files
4) Check that my abstract class in present in the correct directory /WEB-INF
/classes/com/common/webDomain/AbstractForm.
5) Check that my abstract class in present in the correct directory /WEB-INF
/classes/com/pp/webDomain/actions/animal/AnimalTypeForm.
5) Check that the com.pp.webDomain.actions.animal.AnimalTypeForm (concrete
class) inherits okay from my abstract class

I have an class called AbstractForm which subclasses org.apache.struts.action
.ActionForm. This resides in the  package.

Anyone have any ideas please ???

**********************          Error         **********************

ERROR org.apache.struts.util.RequestUtils Source code of org.apache.struts.util.RequestUtils - Error creating form bean of class
com.pp.webDomain.actions.animal.AnimalTypeForm
java.lang.NoClassDefFoundError Source code of java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(Native Method)
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:488)
       at java.security.SecureClassLoader Source code of java.security.SecureClassLoader(SecureClassLoader.java
:106)
       at weblogic.utils.classloaders.GenericClassLoader.findLocalClass
(GenericClassLoader.java:401)
       at weblogic.utils.classloaders.GenericClassLoader.findClass
(GenericClassLoader.java:162)
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:294)
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:287)
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:250)
       at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:41)
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:310)
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(Native Method)
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:488)
       at java.security.SecureClassLoader Source code of java.security.SecureClassLoader(SecureClassLoader.java
:106)
       at weblogic.utils.classloaders.GenericClassLoader.findLocalClass
(GenericClassLoader.java:401)
       at weblogic.utils.classloaders.GenericClassLoader.findClass
(GenericClassLoader.java:162)
       at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass
(ChangeAwareClassLoader.java:62)
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:294)
       at java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:250)
       at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:41)
       at org.apache.struts.util.RequestUtils Source code of org.apache.struts.util.RequestUtils(RequestUtils
.java:190)
       at org.apache.struts.util.RequestUtils Source code of org.apache.struts.util.RequestUtils(RequestUtils
.java:216)
       at org.apache.struts.util.RequestUtils Source code of org.apache.struts.util.RequestUtils(RequestUtils
.java:610)
       at org.apache.struts.action.RequestProcessor Source code of org.apache.struts.action.RequestProcessor
(RequestProcessor.java:349)
       at org.apache.struts.action.RequestProcessor Source code of org.apache.struts.action.RequestProcessor(RequestProcessor
.java:243)
       at org.apache.struts.action.ActionServlet Source code of org.apache.struts.action.ActionServlet(ActionServlet.java
:1109)
       at org.apache.struts.action.ActionServlet Source code of org.apache.struts.action.ActionServlet(ActionServlet.java:452)
       at javax.servlet.http.HttpServlet Source code of javax.servlet.http.HttpServlet(HttpServlet.java:740)
       at javax.servlet.http.HttpServlet Source code of javax.servlet.http.HttpServlet(HttpServlet.java:853)
       at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction
.run(ServletStubImpl.java:1058)
       at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:401)
       at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:20)
       at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl
.java:27)
       at weblogic.servlet.internal.WebAppServletContext
$ServletInvocationAction.run(WebAppServletContext.java:5451)
       at weblogic.security.service.SecurityServiceManager.runAs
(SecurityServiceManager.java:780)
       at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:3105)
       at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2588)
       at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
       at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)


**********************      End of Error       **********************


**********************      AbstractForm    **********************      
package com.common.webDomain;

import org.apache.struts.action.ActionForm Source code of org.apache.struts.action.ActionForm;

public class AbstractForm extends ActionForm
{
  public AbstractForm()
  {
  }
}


**********************       End of AbstractForm **********************




**********************       AnimalTypeForm  **********************
package com.pp.webDomain.actions.animal;

import org.apache.struts.action.ActionForm Source code of org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping Source code of org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest Source code of javax.servlet.http.HttpServletRequest;
import com.pp.webDomain.WebTierController;
import com.common.webDomain.AbstractForm;
import org.apache.struts.action.ActionErrors Source code of org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError Source code of org.apache.struts.action.ActionError;
import com.pp.entityDomain.animalType.AnimalTypeTO;
import org.apache.log4j.Logger Source code of org.apache.log4j.Logger;

public class AnimalTypeForm extends AbstractForm
{
  static private Logger logger = Logger.getLogger( AnimalTypeForm.class );

  public AnimalTypeForm()
  {
     logger.info( "Enter Creating AnimalTypeForm " );
     animalType = new AnimalTypeTO();
     logger.info( "Exit Creating AnimalTypeForm " );
  }

  public AnimalTypeTO getAnimalType()
  {
     return animalType;
  }

  public void setAnimalType( AnimalTypeTO animalType )
  {
     this.animalType = animalType;
  }

  public void reset( ActionMapping actionMapping, HttpServletRequest req )
  {
     logger.info( "Enter AnimalTypeForm.reset" );
     if ( animalType != null )
     {
        animalType.setId( null );
        animalType.setCrossBreed( Boolean.FALSE );
        animalType.setName( null );
     }
     logger.info( "Exit AnimalTypeForm.reset" );
  }

  public ActionErrors validate( ActionMapping actionMapping,
HttpServletRequest req )
  {
     logger.info( "Enter AnimalTypeForm.validate" );
     ActionErrors errors        = new ActionErrors();
     AnimalTypeTO animalTypeMVO = this.getAnimalType();
     String typeName            = animalTypeMVO.getName();
     if ( typeName == null || typeName.equals( "" ) )
     {
        errors.add( "name", new ActionError( "error.animaltype.name" ) );
     }
     logger.info( "Exit AnimalTypeForm.validate" );
     return errors;
  }

  private AnimalTypeTO animalType = null;
}



**********************       End of AnimalTypeForm  **********************

===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi I have the problem below where the ActionForm
seems be unable to be found when my class
<STRONG>com.pp.webDomain.actions.animal.AnimalTypeForm </STRONG>inherit from my
<STRONG>AbstractForm </STRONG>(subclasses the structs actionForm class).
However, if I directly inherit from <STRONG>org.apache.struts.action.ActionForm Source code of org.apache.struts.action.ActionForm
</STRONG>(normal struts class) it is works fine. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have checked the following :</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>1) Struct.jar is in /WEB-INF/Lib
directory</FONT></DIV>
<DIV><FONT face=Arial size=2>2) AnimalTypeForm is in the classes
directory</FONT></DIV>
<DIV><FONT face=Arial size=2>3) Config.xml is in the /WEB-INF directory along
with all the strut's .tld files</FONT></DIV>
<DIV><FONT face=Arial size=2>4) Check that my abstract class in present in the
correct directory
/WEB-INF/classes/com/common/webDomain/AbstractForm.</FONT></DIV>
<DIV><FONT face=Arial size=2>5) Check that my abstract class in present in the
correct directory
/WEB-INF/classes/com/pp/webDomain/actions/animal/AnimalTypeForm.</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>5) Check that the
com.pp.webDomain.actions.animal.AnimalTypeForm (concrete class) inherits okay
from my abstract class</FONT></FONT></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have an class called AbstractForm which
subclasses org.apache.struts.action.ActionForm Source code of org.apache.struts.action.ActionForm This resides in the&nbsp;
package. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Anyone have any ideas please ???</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial
size=2>**********************&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;
Error&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
**********************&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>ERROR org.apache.struts.util.RequestUtils Source code of org.apache.struts.util.RequestUtils - Error
creating form bean of class
com.pp.webDomain.actions.animal.AnimalTypeForm<BR>java.lang
.NoClassDefFoundError:
org/apache/struts/action/ActionForm<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;
at java.lang.ClassLoader Source code of java.lang.ClassLoader(Native
Method)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:488)<BR>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
at
java.security.SecureClassLoader Source code of java.security.SecureClassLoader(SecureClassLoader.java:106)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass
(GenericClassLoader.java:401)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader
.java:162)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:294)<BR>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
at
java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:287)<BR>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
at
java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:250)<BR>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:41)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:310)<BR>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at java.lang.ClassLoader Source code of java.lang.ClassLoader(Native
Method)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:488)<BR>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
at
java.security.SecureClassLoader Source code of java.security.SecureClassLoader(SecureClassLoader.java:106)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass
(GenericClassLoader.java:401)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader
.java:162)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass
(ChangeAwareClassLoader.java:62)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:294)<BR>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
at
java.lang.ClassLoader Source code of java.lang.ClassLoader(ClassLoader.java:250)<BR>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:41)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
org.apache.struts.util.RequestUtils Source code of org.apache.struts.util.RequestUtils(RequestUtils.java:190)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
org.apache.struts.util.RequestUtils Source code of org.apache.struts.util.RequestUtils(RequestUtils.java:216)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
org.apache.struts.util.RequestUtils Source code of org.apache.struts.util.RequestUtils(RequestUtils.java:610)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
org.apache.struts.action.RequestProcessor Source code of org.apache.struts.action.RequestProcessor(RequestProcessor
.java:349)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
org.apache.struts.action.RequestProcessor Source code of org.apache.struts.action.RequestProcessor(RequestProcessor.java:243)<BR
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
org.apache.struts.action.ActionServlet Source code of org.apache.struts.action.ActionServlet(ActionServlet.java:1109)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
org.apache.struts.action.ActionServlet Source code of org.apache.struts.action.ActionServlet(ActionServlet.java:452)<BR>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
javax.servlet.http.HttpServlet Source code of javax.servlet.http.HttpServlet(HttpServlet.java:740)<BR>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
javax.servlet.http.HttpServlet Source code of javax.servlet.http.HttpServlet(HttpServlet.java:853)<BR>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1058)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:401)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:20)<BR>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run
(WebAppServletContext.java:5451)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager
.java:780)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:3105)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2588)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)<BR>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>**********************&nbsp; &nbsp;&nbsp;&nbsp;
End
of Error&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
**********************&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial
size=2>**********************&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
AbstractForm&nbsp;&nbsp;&nbsp;
**********************&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2>package com.common.webDomain;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>import
org.apache.struts.action.ActionForm Source code of org.apache.struts.action.ActionForm;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>public class AbstractForm extends
ActionForm<BR>{<BR>&nbsp;&nbsp; public AbstractForm()<BR>&nbsp;&nbsp;
{<BR>&nbsp;&nbsp; }<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial
size=2>**********************&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End of
AbstractForm **********************</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial
size=2>**********************&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;AnimalTypeForm&nbsp;
**********************</FONT></DIV></FONT></DIV>
<DIV><FONT face=Arial size=2>package
com.pp.webDomain.actions.animal;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>import
org.apache.struts.action.ActionForm Source code of org.apache.struts.action.ActionForm;<BR>import
org.apache.struts.action.ActionMapping Source code of org.apache.struts.action.ActionMapping;<BR>import
javax.servlet.http.HttpServletRequest Source code of javax.servlet.http.HttpServletRequest;<BR>import
com.pp.webDomain.WebTierController;<BR>import
com.common.webDomain.AbstractForm;<BR>import
org.apache.struts.action.ActionErrors Source code of org.apache.struts.action.ActionErrors;<BR>import
org.apache.struts.action.ActionError Source code of org.apache.struts.action.ActionError;<BR>import
com.pp.entityDomain.animalType.AnimalTypeTO;<BR>import
org.apache.log4j.Logger Source code of org.apache.log4j.Logger;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>public class AnimalTypeForm extends
AbstractForm<BR>{<BR>&nbsp;&nbsp; static private Logger logger =
Logger.getLogger( AnimalTypeForm.class );</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; public
AnimalTypeForm()<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
logger.info( "Enter Creating AnimalTypeForm "
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; animalType = new
AnimalTypeTO();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.info( "Exit Creating
AnimalTypeForm " );<BR>&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; public AnimalTypeTO
getAnimalType()<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return
animalType;<BR>&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; public void setAnimalType(
AnimalTypeTO animalType )<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
this.animalType = animalType;<BR>&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; public void reset( ActionMapping
actionMapping, HttpServletRequest req )<BR>&nbsp;&nbsp;
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.info( "Enter AnimalTypeForm.reset"
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( animalType != null
)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; animalType.setId( null
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; animalType.setCrossBreed
(
Boolean.FALSE );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
animalType.setName( null );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.info( "Exit AnimalTypeForm.reset"
);<BR>&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; public ActionErrors validate(
ActionMapping actionMapping, HttpServletRequest req )<BR>&nbsp;&nbsp;
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.info( "Enter AnimalTypeForm.validate
"
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ActionErrors
errors&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = new
ActionErrors();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AnimalTypeTO animalTypeMVO =
this.getAnimalType();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String
typeName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
animalTypeMVO.getName();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( typeName ==
null
|| typeName.equals( "" ) )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; errors.add( "name", new
ActionError( "error.animaltype.name" ) );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger.info( "Exit AnimalTypeForm.validate"
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return errors;<BR>&nbsp;&nbsp;
}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; private AnimalTypeTO animalType =
null;<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=Arial size=2>
<DIV><BR>&nbsp;</DIV>
<DIV>
<DIV><FONT face=Arial
size=2>**********************&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End of
AnimalTypeForm&nbsp;
**********************</FONT></DIV></DIV></FONT></BODY></HTML>
===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".
<p>

©2008 junlu.com - Jax Systems, LLC, U.S.A.