>From reading the JSP 1.1 spec (Sec. 2.13.6.1, p. 69):

        <jsp:param name="name" value="value"/>

        This action has two mandatory attributes: name and value.  Name
indicates the name of the parameter; value, which may be a request-time
expression, indicates its value.

It's not particularly clearly worded, but the implication seems to be that
only the value can be computed at request time.  The name has to be
constant.

    Attila



----- Original Message -----
From: "Garret Wilson" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Thursday, May 10, 2001 9:59 AM
Subject: Re: does JSP request.getParameterNames() work in Orion 1.4.5?


> Actually, request.getParameterNames() works fine -- I just realized I was
> modifying one page and testing another.
>
> However, I was using request.getParameterNames() to try to find the source
> of my *real* problem. My JSP parameters really look like this:
>
> <jsp:include page="menubar.jsp" flush="true">
>  <jsp:param name="test1" value="abc"/>
>  <jsp:param name="<%=WebConstants.SELECTED_SECTION_PARAM_NAME%>"
> value="<%=WebConstants.ABOUT_SECTION%>"/>
>  <jsp:param name="test2" value="def"/>
> </jsp:include>
>
> That is, I'm dynamically inluding a parameter name and its value. The
> request.getParameterNames() enumeration returns, in the following order,
> "test2" and "test1", not the middle parameter name which should be
> "selectedSection". If I hard-code in "selectedSection" (but leave the
value
> dynamically included), it works. Why?
>
> Garret
>
> ----- Original Message -----
> From: "Garret Wilson" <[EMAIL PROTECTED]>
> To: "Orion-Interest" <[EMAIL PROTECTED]>
> Sent: Thursday, May 10, 2001 9:48 AM
> Subject: does JSP request.getParameterNames() work in Orion 1.4.5?
>
>
> > I'm passing a parameter to a JSP via:
> >
> > <jsp:include page="includedPage.jsp" flush="true">
> >  <jsp:param name="test" value="abc"/>
> >
> > Yet in includedPage.jsp, request.getParameterNames() seems to be empty,
> and
> > the following returns false:
> >
> > request.getParameterNames().hasMoreElements()
> >
> > Yet I can access parameters directly using, for example,
> > request.getParameter("test").
> >
> > Does request.getParameterNames() work in Orion 1.4.5?
> >
> > Thanks,
> >
> > Garret
> >
>
>
>


Reply via email to