• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

c:forEach tag

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
reply
    Bookmark Topic Watch Topic
  • New Topic