• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use EL

 
At Srivs
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using EL in struts framework.
i am trying to print a value that is in request attribute and i m retrieving in my jsp
in java class the code is:
ArrayList list= new ArrayList();
list.add("bablu");
list.add("bablu 1");
request.setAttribute("list",list);

and in jsp the code is:
${list}
but the problem is that my jsp is printing it as a normal text.

Please help me.
 
Collins Mbianda
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ankit !!!

If it print "${list}", it means that EL are ignored in your JSP.
You have to add allowed EL in your JSP by adding the directive:

or the equivalent XML syntax;


Hope it help.
[ January 26, 2008: Message edited by: Collins Mbianda ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to set the isELIgnored attribute. Make sure that your web.xml is configured to use Servlets 2.4, not 2.3. Look at this FAQ for more information on this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic