aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Problem about EL .... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Problem about EL ...." Watch "Problem about EL ...." New topic
Author

Problem about EL ....

Jack Lam
Greenhorn

Joined: Jul 09, 2004
Posts: 17
Hi everyone,

i have a problem in studying El...

when i create a Map in <% %> area:
<%
SortedMap map = new SortedMap;
map.put("key", "value");
%>
and want to display the data by using EL
${map.key}

but it show me nothing....
what is the reason?
it can show me ${header["user-agent"]}
that mean the page can run El at my tomcat..

also, do EL only for display the date?
(for replace the <%= XX %> tag)
how do i create instance by using EL?

i always get confuse with the format ${aaa.bbb.ccc}

thanks


SCJP 1.4 , SCWCD (in progress)
Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
The map created in the scriptlet was never stored in one of the JSP scopes.

<%
Map map = new HashMap();
map.put("key", "value");
pageContext.setAttribute("map", map);
%>

<c ut value='${map["key"]}'/>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem about EL ....
 
Similar Threads
Get different scope attribute by using EL
displaytag help, sorting map objects
Accessing Attribute Values
c:forEach session's map
problem with c:set tag