On Wed, 2003-04-02 at 15:24, Pingili, Madhupal wrote:
> I tried that also to find the following error:
> javax.servlet.jsp.JspException: Cannot find bean map in any scope

Here's a quick one I just threw together:


<html:form action="/someAction">

<%
java.util.HashMap map = new java.util.HashMap();
map.put("1", "One");
map.put("2", "Two");
request.setAttribute("map", map);
%>

<bean:define id="aMap" name="map"/>

<html:select property="someFormBeanField">
  <html:option value="Select One">Select One</html:option>
  <html:options name="aMap"/>
</html:select>

</html:form>


> 
> > -----Original Message-----
> > From:       James Mitchell [SMTP:[EMAIL PROTECTED]
> > Sent:       Wednesday, April 02, 2003 3:19 PM
> > To: Struts Users Mailing List
> > Subject:    Re: <bean:parameter> can't use attribute set in request????
> > 
> > On Wed, 2003-04-02 at 15:09, Pingili, Madhupal wrote:
> > > I am trying to display values in a map set as
> > request.setAttribute("map",
> > > mapObject) in an Action.
> > > JSP looks like:
> > > <html:select property="selValue">
> > >   <html:option value="Select One"></html:option>
> > >   <bean:parameter id="aMap" name="map"></bean:parameter>
> > >   <logic:iterate id="element" name="aMap">
> > >     <html:option value="value"></html:option>
> > >   </logic:iterate> 
> > > </html:select>
> > > 
> > > Problem is, <bean:parameter> expects a request parameter with name
> > "map".
> > > I get the following error: 
> > > javax.servlet.jsp.JspException: No parameter map was included in this
> > > request
> > > 
> > > Which Tags can get the attributes set in a request?
> > 
> > You are probably looking for <bean:define id="aMap" name="map"/>
> > 
> > > 
> > > Thanks for any help.
> > > 
> > > Reddy
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > -- 
> > James Mitchell
> > Software Developer/Struts Evangelist
> > http://www.open-tools.org
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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]
-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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

Reply via email to