• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

c:forEach tag

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I had written a servlet to set the attribute as follows:

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;



and the code for forEach.jsp is :



but instead of the complete table i am getting the following out put:

Movie List :

${movie}


Can you tell me where am i wrong?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EL may not be enabled. Maybe you're using Servlet 2.3.
If you can use 2.4, check how to configure web.xml here :
http://faq.javaranch.com/view?ServletsWebXml

This will enable EL by default.
 
tarun bansal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot

Indeed it is the problem with EL enabling
after adding following lines to wb.xml it is working

<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-enabled>true</scripting-enabled>
<scripting-enabled>true</scripting-enabled>
</jsp-property-group>
</jsp-config>
 
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic