You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by pc leung <pi...@gmail.com> on 2006/01/10 07:26:09 UTC
java.lang.ClassCastException: com.user.struts.form.UserSystemForm
Where does the error come from?
The following is the action class, jsp and struts-config.xml
Flow is like this. http://localhost:8080/setupAssignUserSystem forwards to
http://localhost:8080/assignUserSystem automatically.
thanks
In SetupAssignUserSystemAction class,
UserSystemForm userSystemForm = (UserSystemForm)form;
userSystemForm.setMethod("create");
In jsp,
<html:form action="assignUserSystem.do" method="post" focus="systemHref">
<table>
<tr>
<html:select name="userSystemForm" property="systemHref">
<html:options collection="userSystemList" property="messageKey"/>
</html:select>
</tr>
<tr>
in struts-config.xml
<action path="/setupAssignUserSystem"
input="user.assignUserSystem"
name="userSystemForm"
scope="request"
validate="false"
type="com.user.struts.action.SetupAssignUserSystemAction">
<forward name="success" path="/assignUserSystem.do" />
</action>
<action path="/assignUserSystem"
input="user.assignUserSystem"
name="userSystemForm"
scope="request"
validate="true"
parameter="method"
type="com.user.struts.action.AssignUserSystemDispatchAction">
<forward name="success" path="/setupAssignUserSystem.do" />
<forward name="failure" path="user.assignUserSystem" />
<forward name="cancel" path="/userProfileMaint.do"/>
</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org