Hello, I am extending ActionForm but do not use the validate() method since
I don't want an ActionError to be returned, I implement my own method.
ActionError does not satisfy me. I get a ClassCastException when running it
with Jrun 3.1. (my jsp tries to instantiate Authentication then
AuthenticationForm).
So I have the following :
Error :
04/10 11:52:14 info (JRun) action: Processing a POST for /authentication
04/10 11:52:14 info (JRun) action: Looking for ActionForm bean under
attribute 'authenticationForm'
04/10 11:52:14 info (JRun) action: Creating new ActionForm instance of
class 'mypackage.AuthenticationForm'
04/10 11:52:14 error (JRun) action: Error creating ActionForm instance of
class 'mypackage.AuthenticationForm' [java.lang.ClassCastException:
mypackage.AuthenticationForm]
java.lang.ClassCastException: mypackage.AuthenticationForm
at
org.apache.struts.action.ActionServlet.processActionForm(ActionServlet.java:
1702)
***************
Code of AuthenticationForm:
package mypackage;
import javax.servlet.http.HttpServletRequest;
//import org.apache.struts.action.ActionError;
//import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import mypackage.my2.MyErrorClass;
public final class AuthenticationForm extends ActionForm {
public void myValidation(ActionMapping mapping, HttpServletRequest request)
creating here a MyErrorClass and doing a mapping.findForward.
****************
Thank you very much for any help.
Barbara Post
01 49 87 43 78 - 06 98 17 21 86.
Software AG France
5 avenue de Verdun, 94204 Ivry-sur-Seine