Not sure if anyone else gave this answer yet, but I needed to do the same thing in StrutsWS's default response template, and here's how I wound up doing it (modified slightly to be a little better!):

String formName = ((org.apache.struts.config.ActionConfig)request.getAttribute( org.apache.struts.Globals.MAPPING_KEY)).getName();

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Ed Griebel wrote:
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 <[EMAIL PROTECTED]> 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  -  [EMAIL PROTECTED]
==============================================

---------------------------------------------------------------------
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]








--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to