struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Refondini <>
Subject Re: Using <logic:equals> tag around <html:form action.... > tag. Is it legal?
Date Tue, 19 Feb 2002 11:05:27 GMT
the wrong syntax seems to come from my previous quick and dirty answer :(

1. bean:define value must not be define as body content but as value 
2. forget about action='<bean:write name="formAction">'  it compiles but 
the bean:write tag is not interpreted so at runtime the action looked 
for is <bean:write name="formAction">

This time I tested the following code sample, it works :)

    <bean:define id="formAction" value="/test" />

    <html:form action='<%=formAction%>' >

Hereafter corrections regarding your example

Antony Stace wrote:

>Can someone please give me the syntax for defining the action using the contents of
>formAction in the <html:form> line.
>><bean:define id="formAction" >defaultAction</bean:define>
should become 
<bean:define id="formAction" value="defaultAction" />

>><logic:equal name="testPageBean" property="typeOfProcess" value="add">
>><bean:define id="formAction" >/addUser</bean:define>
<bean:define id="formAction" value="/addUser" />

>><logic:equal name="testPageBean" property="typeOfProcess" value="modify">
>><bean:define id="formAction" >/modifyUser</bean:define>
<bean:define id="formAction" value="/modifyUser"/>

>><html:form action='<bean:write name="formAction">' focus="username">
>><html:form action='<%=formAction%>' focus="username">
This one should work 

<html:form action='<%=formAction%>' focus="username">

I hope this time your problem is solved ...


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message