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 Claudio Cicali <c....@mclink.it> on 2002/05/21 12:27:51 UTC

Accessing session-scoped variables from within taglibs

Hello,

simple and direct:

On the same jsp, this:

    <%= session.getParameter("section") %>

returns, say, "MAIN"

while this:

    <c:out value="${session.section}" />

returns nothing...

So, I have to do:

        <c:set var="section">
           <%= session.getAttribute("section") %>
        </c:set>

But this... well... sucks :)

How can I access session scoped variables from within a JSTL tag 
with the EL syntax ?
I've read a tutorial, looked into some examples, but I continue to
get nothing...

Thank you









--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Accessing session-scoped variables from within taglibs

Posted by Claudio Cicali <c....@mclink.it>.
On Tue, 21 May 2002 12:27:51 +0200
Claudio Cicali <c....@mclink.it> wrote:

> Hello,
> 
> simple and direct:

Ok, solved after browsing the list archives.


-- 
Claudio Cicali aka FleXer
c.cicali@mclink.it
http://www.flexer.it
GPG Key Fingerprint = 2E12 64D5 E5F5 2883 0472 4CFF 3682 E786 555D 25CE
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Accessing session-scoped variables from within taglibs

Posted by Shawn Bayern <ba...@essentially.net>.
On Tue, 21 May 2002, Claudio Cicali wrote:

> Hello,
> 
> simple and direct:
> 
> On the same jsp, this:
> 
>     <%= session.getParameter("section") %>
> 
> returns, say, "MAIN"
> 
> while this:
> 
>     <c:out value="${session.section}" />
> 
> returns nothing...

You really mean

  <c:out value="${sessionScope.section}" />

The other form ("session" alone) is out of date.

-- 
Shawn Bayern
"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>