>>Just enough to be dangerous. I think that want you want to do is enable
>>the JSP expression language which will allow you to use constructs like
[quoted text clipped - 30 lines]
> example !!! How they are accessing the list then ....is this code
> wrong ?

Signature
This signature intentionally left blank.
>No; I only brought up the session scope because you used it in your OP
OK...thats correct.
but How those guys (the code i posted from IBM tutorial) are doing it
then ?
How they are accessing the list ?
they are using this...
<c:forEach items="${entryList}" var="blogEntry">
did you see, they are NOT using session scope,page scope,application
scope ..nothing !......how they are picking up the data in the JSP ?
How is this entryList picked up ?
>There is a sequence of scopes that the expression language (EL) will
>search through to find variable values. Unless you have an explicit
>need for another scope, I think that the request attribute will fill
>your needs.
suppose, i have put the list in the session scope in the Action class.
Now, how the JSTL would find it ?
Now, if i have <c:forEach items="${entryList}" var="blogEntry">
scan 1: the JSTL first scan request scope whether the lis is there or
not....if it fails
scan 2: the JSTL would scan session scope whether the lis is there or
not....if it fails
scan 3: the JSTL would scan page scope whether the lis is there or
not.....if it fails
scan 4: the JSTL would scan application scope whether the lis is
there or not.....
IF all of them fails, then NULL pointer exception.
is this approach JSTL follows while searching a list when no scope is
specified in the JSP.
thank you
Raymond DeCampo - 11 Jan 2006 20:11 GMT
>>No; I only brought up the session scope because you used it in your OP
>
[quoted text clipped - 40 lines]
> is this approach JSTL follows while searching a list when no scope is
> specified in the JSP.
It is something like that. I can't confirm a couple of things above,
but you have the general idea. Either dig through the specs or write
some examples to flesh out the other parts.
I don't know what the specific order is for searching the scopes. I
would imagine that page scope comes before session scope however. I
also can't confirm what the behavior is when the data is not found. I
would hope for a regular subclass of Exception, not
NullPointerException, which extends RuntimeException.
HTH,
Ray

Signature
This signature intentionally left blank.