You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by peter lin <pe...@labs.gte.com> on 2002/03/20 13:20:54 UTC
JSTL EL support for header?
I read through the JSTL spec and grepped "org.apache....lang.jstl" to
see if it has any calls to request.getHeader(string) and noticed JSTL EL
does not support request header.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: JSTL EL support for header?
Posted by peter lin <pe...@labs.gte.com>.
The closest thing I can think of to access request header values is
<c:out value="${request.headers["host"]}"/>, but [] are used to access
maps. Request.getHeaders() returns an Emueration, so it fails like it's
supposed to.
Thanks to shawn's fix yesterday to JSTL XML tags, i can use <x:out
select="$header:user-agent"/> to do browser detection. It would be nice
if JSTL EL also supports headers like parameters.
<c:out value="${header.user-agent}"/>
when I use the example above, I get "0" as the output. Is that a bug
maybe or not supported as specified. I'm using nightly 3-18.
thanks.
peter
peter lin wrote:
>
> I read through the JSTL spec and grepped "org.apache....lang.jstl" to
> see if it has any calls to request.getHeader(string) and noticed JSTL EL
> does not support request header.
>
> --
> 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: JSTL EL support for header?
Posted by Shawn Bayern <ba...@essentially.net>.
On Wed, 20 Mar 2002, peter lin wrote:
> I read through the JSTL spec and grepped "org.apache....lang.jstl" to
> see if it has any calls to request.getHeader(string) and noticed JSTL
> EL does not support request header.
It'll be added. In general, things like headers might ideally be
retrieved as JavaBean-like properties of the PageContext. But headers
aren't available this way, so they're going to be added as new top-level
implicit objects.
--
Shawn Bayern
Author, "JSP Standard Tag Library" http://www.jstlbook.com
(coming this summer from Manning Publications)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>