I did that and it works, thanks, Erez -----Original Message----- From: Jason Lea [mailto:[EMAIL PROTECTED] Sent: Friday, August 15, 2003 4:09 AM To: Struts Users Mailing List Subject: Re: c:choose and html:form
Erez Efrati wrote: > Is this legal? > > <c:choose> > <c:when test="${param.method == 'create'}"> > <html:form action="/signup/Signup" onsubmit="return > validateSignupForm(this);"> > </c:when> > <c:when test="${param.method == 'edit'}"> > <html:form action="/user/EditSignup" onsubmit="return > validateSignupForm(this);"> > </c:when> > </c:choose> > > Thanks, > Erez I think this would cause a problem because the JSP compiler would complain that the <html:form> tag is not being closed. It would want the </html:form> tag to be nested at the same level as the opening tag. An option might be to use the html-el tags which should mean you can do something like <c:choose> <c:when test="${param.method == 'create'}"> <c:set var="formAction" value="/signup/Signup"/> </c:when> <c:when test="${param.method == 'edit'}"> <c:set var="formAction" value="/user/EditSignup"/> </c:when> </c:choose> <html:form action="${formAction}" onsubmit="return validateSignupForm(this);"> -- Jason Lea --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]