struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Griebel <edgrie...@gmail.com>
Subject Re: Getting name of form bean?
Date Mon, 16 May 2005 14:42:50 GMT
Here's what we use. It's not great that things are hard-coded such as
the mapping name in line 1 (and the scope in line 3), but it works as
long as the <bean:struts> tag and scope is kept in sync with the
struts-config.xml.

<bean:struts id="mapping" mapping="/actionPathFromStrutsConfig"/>
<c:set var="formName" value="${mapping.attribute}"/>
<c:set var="form" value="${sessionScope[formName]}"/>

-ed


On 5/16/05, John Moore <john@jmsd.co.uk> wrote:
> In a JSP which uses html:form, is there any way of determining the name
> of the form bean (assuming it's been set in the mapping, of course, not
> in the html:form tag!).
> 
> TIA
> 
> --
> ==============================================
> John Moore  -  Norwich, UK  -  john@jmsd.co.uk
> ==============================================
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Mime
View raw message