On 29 Mar 2002, David M. Karr wrote: > Curious. Not that I would necessarily want to do this, but from the > JSTL specification, it almost seems like you could do something like > this: > > <x:set var="username" select="$cookie:username"/> > <c:if test="${username == 'learner'}"> > > So it appears that simple access to cookies is in the XML tags, but > not the core tags? Please correct me if I'm confused (likely).
Ha! Yes, you found a cute workaround that takes advantage of an inconsistency in the current spec: cookies are easily accessed by name using XPath but not the EL. Of course, the technical issues (and whether we can stomach a simple name-based lookup, in view of these issues) are the same for both the EL and the XPath variable bindings. Whichever way the expert group decides, the EL and XPath will almost certainly be synched with each other by the next release. (That is, they'll either both have 'cookie' or they both won't.) -- Shawn Bayern Author, "JSP Standard Tag Library" http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>