Thanks Bruce,

That works great.  I (wrongly) believed that pageScope was equivalent to
pageContext and thus JSP implicit objects like session and request were
accessible to EL without qualification.  Thanks for clearing that up. :-)

For the record, the following JSTL/JSP results in the subsequent output:

<[EMAIL PROTECTED] contentType="text/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<html>
<head><title>JSP Page</title></head>
<body>
pageContext.session.id = <c:out value="${pageContext.session.id}" /><br>
sessionScope.id = <c:out value="${sessionScope.id}"/><br>
session.id = <c:out value="${session.id}"/><br>
session.getId() = <% out.write(session.getId()); %><br>
</body>
</html>
----------------------------------------------------------------------------
--------
pageContext.session.id = A0B07F762892D8DF8EFE6B7C41B290C5
sessionScope.id =
session.id =
session.getId() = A0B07F762892D8DF8EFE6B7C41B290C5


David Foote





----- Original Message ----- 
From: "Bruce Perry" <[EMAIL PROTECTED]>
To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
Sent: Monday, June 09, 2003 4:00 AM
Subject: Re: why can't I access implicit object properties in EL


>
> Try:
>
> > <c:out value="${pageContext.session.id}" />
>
> similarly: <c:out value="${pageContext.request.requestURL}" />
>
> applicationScope, sessionScope, and requestScope are JSTL implicit
> variables that store object attributes, such as session attributes.
>
> I would get ahold of the JSTL specification and just leaf through the
> implicit objects to review what they represent.
>
> Bruce
>
>
> On Monday, June 9, 2003, at 01:50 AM, Jon Archer wrote:
>
> > try <c:out value="${sessionScope.id}" />
> >
> > and similarly requestScope.something
> >
> >
> > On Sun, 2003-06-08 at 23:41, David N. Foote wrote:
> >> I would expect <c:out value="${session.id}"/> to produce the same
> >> output as
> >> <% out.write(session.getId()); %>.
> >> But there is no output from the former.  Can anyone explain this?
> >> The same
> >> thing applies to request.requestURL.
> >>
> >> David Foote
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to