You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ben Starr <b....@qut.edu.au> on 2003/01/22 03:16:48 UTC
Tag to print value of a parameter?
Is there a tag to print the value of a parameter in Struts 1.1? I know you
can base logic conditions on the value of a parameter and print values from
beans but I can't find a way to print the value of a parameter to the page.
Obviously it is just a short scriptlet such as:
<%= request.getParameter("name") %>
but it would be nicer to do it with a struts tag. If such a tag is not
available then I suggest it should be added!
Thanks,
Ben Starr
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Tag to print value of a parameter?
Posted by Jerome Jacobsen <je...@gentootech.com>.
If you have a JSP 1.2 container then you can use JSTL like this:
<c:out value='${param["name"]}'/>
param is an implicit object in JSTL (it is a Map).
> -----Original Message-----
> From: Ben Starr [mailto:b.starr@qut.edu.au]
> Sent: Tuesday, January 21, 2003 9:17 PM
> To: struts-user@jakarta.apache.org
> Subject: Tag to print value of a parameter?
>
>
> Is there a tag to print the value of a parameter in Struts 1.1? I know you
> can base logic conditions on the value of a parameter and print
> values from
> beans but I can't find a way to print the value of a parameter to
> the page.
> Obviously it is just a short scriptlet such as:
>
> <%= request.getParameter("name") %>
>
> but it would be nicer to do it with a struts tag. If such a tag is not
> available then I suggest it should be added!
>
> Thanks,
>
> Ben Starr
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Tag to print value of a parameter?
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Wed, 22 Jan 2003, Ben Starr wrote:
> Date: Wed, 22 Jan 2003 12:16:48 +1000
> From: Ben Starr <b....@qut.edu.au>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: Tag to print value of a parameter?
>
> Is there a tag to print the value of a parameter in Struts 1.1? I know you
> can base logic conditions on the value of a parameter and print values from
> beans but I can't find a way to print the value of a parameter to the page.
> Obviously it is just a short scriptlet such as:
>
> <%= request.getParameter("name") %>
>
> but it would be nicer to do it with a struts tag. If such a tag is not
> available then I suggest it should be added!
>
You can do it indirectly, by using <bean:parameter> and then <bean:write>.
This also lets you decide what to do about multiple values for the same
parameter name.
> Thanks,
>
> Ben Starr
>
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>