struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abdullah Jibaly" <>
Subject RE: actionform session attribute name
Date Wed, 15 Dec 2004 22:34:15 GMT
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('')}"

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


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

Well, for the form you can use the form name as specified in your 

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">
             <td><c:out value="${itm.key}"/></td>
             <td colspan="2">
                 <textarea rows="2" cols="50">
                     <c:out value="${itm.value}"/>

-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:
> For additional commands, e-mail:

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

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

View raw message