This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSP and the fly likes transfer object between scriplet and jstl Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply Bookmark "transfer object between scriplet and jstl" Watch "transfer object between scriplet and jstl" New topic
Author

transfer object between scriplet and jstl

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 758
how to transfer object between scriplet and jstl(1.1) ?

For example:
<%
Integer a = 1;
pageContext.setAttribute("a",a,pageContext.PAGE_SCOPE);
%>
<c:if test='${pageContext.a > 0}'>
...
</c:if>
-- the error message is , pageContext.a is not existed.

Why? Thanks.
Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 758
I got the answer.

We need to use pageScope instead of pageContext.

Thanks.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: transfer object between scriplet and jstl
 
Similar Threads
how to change image using jsp
ForEach: how to get array data ?
JSP and String manipulation
getting Date out with JSTL
Content of JSTL test attributes