struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Stack <richardst...@rogers.com>
Subject Problem with DynaActionForms
Date Fri, 11 Jul 2003 01:07:38 GMT
I'm implementing DynaActionform for the first time. I'm defining them in 
struts-config.xml.
<form-bean
     name="loginForm"
     dynamic="true"
     type="org.apache.struts.validator.DynaValidatorForm">
     <form-property name="userName" type="java.lang.String"/>
     <form-property name="password" type="java.lang.String"/>
  </form-bean>

<action
    path="/signin"
    type="com.acme.LoginAction"
    scope="request"
    name="loginForm"
    validate="true"
    input="/start/signin.jsp">
    <forward name="Success" path="/action/mainPage.jsp"/>
    <forward name="Failure" path="/start/signin.jsp" redirect="true"/>
  </action>

The problem seems to be when I try to reference the form in the Action 
class's execute method. I get an error message in LoginAction 
"Unresolved symbol LoginForm".

public ActionForward execute(){
	String userName = ((LoginForm)form).getUserName();
     	String password = ((LoginForm)form).getPassword();
}

Anyone have an idea where I went wrong?

Richard


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message