Try this:

<c:set var="form"

value="${requestScope['org.apache.struts.action.mapping.instance.name']}"

/>


Abdullah Jibaly wrote:
Thanks, the forEach works great. The problem with using a hardcoded form name is that I have an 
abstract Base form with several derived children each with their own form name. Using the forEach 
you sent me though shows that the form name is stored in a request attribute 
"org.apache.struts.action.mapping.instance", and the actual bean looks like it's in 
"org.apache.struts.taglib.html.BEAN". Is there any easy way of getting these sort of like 
this... I know what I have here is wrong :)

<c:set var="form" 
value="${request.get('org.apache.struts.action.mapping.instance.name')}" />

then I can access the form using the form var: <c:out value="${form.key}"/>

-Abdullah

-----Original Message-----
From: Bill Siggelkow [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 15, 2004 3:55 PM
To: [EMAIL PROTECTED]
Subject: Re: actionform session attribute name


Well, for the form you can use the form name as specified in your struts-config.xml.


To list the attribute keys and values in the request use something like this (works equally well sessionScope and applicationScope):

     <c:forEach items="${requestScope}" var="itm">
         <tr>
             <td><c:out value="${itm.key}"/></td>
             <td colspan="2">
                 <textarea rows="2" cols="50">
                     <c:out value="${itm.value}"/>
                 </textarea>
             </td>
         </tr>
     </c:forEach>

-Bill Siggelkow


Abdullah Jibaly wrote:


Hi again,

I'm actually trying to get the form name, or a reference to the object, from 
the JSP page. Also, how can I (using JSTL) get a list of all attributes and 
their values in request, session, and app scope from the JSP page also?

Thanks again,
Abdullah

-----Original Message-----
From: Abdullah Jibaly Sent: Wednesday, December 15, 2004 3:25 PM
To: Struts Users Mailing List
Subject: actionform session attribute name



Hi,

How can I get the actionform name from the session?

Thanks,
Abdullah

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