wood burning stoves 2.0*
The moose likes JSP and the fly likes transfer object between scriplet and jstl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
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: 798
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: 798
I got the answer.

We need to use pageScope instead of pageContext.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: transfer object between scriplet and jstl
 
Similar Threads
ForEach: how to get array data ?
Content of JSTL test attributes
getting Date out with JSTL
how to change image using jsp
JSP and String manipulation