You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stefan Krompaß <my...@web.de> on 2003/04/15 16:33:29 UTC
Form-problem
Hi!
I've got a problem with forms and actions: I use a form in my JSP like this:
<html:form action="/register" focus="user" onsubmit="return validateRegistrationForm(this);">
<table border="0" width="100%">
<tr>
<th align="right" width="50%">
<bean:message key="prompt.username"/>:
</th>
<td align="left" width="50%">
<html:text property="user" size="16" maxlength="18"/>
</td>
</tr>
<tr>
<th align="right" width="50%">
<bean:message key="prompt.password"/>:
</th>
<td align="left" width="50%">
<html:password property="pass" size="16" maxlength="18" redisplay="false"/>
</td>
</tr>
<tr>
<th align="right" width="50%">
<bean:message key="prompt.confirm.password"/>
</th>
<td align="left" width="50%">
<html:password property="confirmPass" size="16" maxlength="18" redisplay="false"/>
</td>
<tr>
<%-- Submit/Reset --%>
</table>
</html:form>
My struts-config.xml:
...
<form-bean name="registrationForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="user" type="java.lang.String"/>
<form-property name="pass" type="java.lang.String"/>
<form-property name="confirmPass" type="java.lang.String"/>
</form-bean>
...
<action path="/register"
type="actions.RegistrationAction"
name="registrationForm"
validate="true"
input="/register.jsp"/>
...
But I get an exception "org.apache.jasper.JasperException: No getter method for property user of bean org.apache.struts.taglib.html.BEAN". Where is my mistake? Can anybody help me please?
Greetings,
Stefan
______________________________________________________________________________
UNICEF bittet um Spenden für die Kinder im Irak! Hier online an
UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Form-problem
Posted by Stephen Smithstone <sk...@lchost.co.uk>.
have u tried changine /register to /register.do ?
as i take it you using *.do as the servlet mapping
On Tuesday 15 April 2003 3:33 pm, Stefan Krompaß wrote:
> Hi!
>
> I've got a problem with forms and actions: I use a form in my JSP like
> this:
>
> <html:form action="/register" focus="user" onsubmit="return
> validateRegistrationForm(this);"> <table border="0" width="100%">
> <tr>
> <th align="right" width="50%">
> <bean:message key="prompt.username"/>:
> </th>
> <td align="left" width="50%">
> <html:text property="user" size="16" maxlength="18"/>
> </td>
> </tr>
> <tr>
> <th align="right" width="50%">
> <bean:message key="prompt.password"/>:
> </th>
> <td align="left" width="50%">
> <html:password property="pass" size="16" maxlength="18"
> redisplay="false"/> </td>
> </tr>
> <tr>
> <th align="right" width="50%">
> <bean:message key="prompt.confirm.password"/>
> </th>
> <td align="left" width="50%">
> <html:password property="confirmPass" size="16" maxlength="18"
> redisplay="false"/> </td>
> <tr>
> <%-- Submit/Reset --%>
> </table>
> </html:form>
>
> My struts-config.xml:
>
> ...
>
> <form-bean name="registrationForm"
> type="org.apache.struts.validator.DynaValidatorForm">
> <form-property name="user" type="java.lang.String"/>
> <form-property name="pass" type="java.lang.String"/>
> <form-property name="confirmPass" type="java.lang.String"/>
> </form-bean>
>
> ...
>
> <action path="/register"
> type="actions.RegistrationAction"
> name="registrationForm"
> validate="true"
> input="/register.jsp"/>
>
> ...
>
> But I get an exception "org.apache.jasper.JasperException: No getter method
> for property user of bean org.apache.struts.taglib.html.BEAN". Where is my
> mistake? Can anybody help me please?
>
> Greetings,
>
> Stefan
> ___________________________________________________________________________
>___ UNICEF bittet um Spenden für die Kinder im Irak! Hier online an
> UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org