Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JSTL problem

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have written the code as follows but i am getting ${movie} as output instead of abc1 abc2 xyz3 xyz4

Java code->


JSP code->
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check that your web.xml is correctly configured. See this FAQ, especially this page.
 
Ranch Hand
Posts: 242
Mac Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hrishikesh ,

In addition to the <el-ignored> tag in your DD (web.xml), please also check isELIgnored atrribute of page directive. That has to be false.

One of the following may be the cause for the problem, you are facing:

  • <el-ignored> tag in your web.xml is set to true.
  • isELIgnored attribute for the page directive of your jsp is set to true.
  • Or the version of the JSP you are having is less than 2.1, as prior to version 2.1 EL were not supported for jsp.


  • Regards,
    Khushhal



     
    Christophe Verré
    Sheriff
    Posts: 14691
    16
    Eclipse IDE VI Editor Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    In addition to the <el-ignored> tag in your DD (web.xml), please also check isELIgnored atrribute of page directive. That has to be false.


    You don't need the el-ignored tag, nor the isELIgnored attribute. So if they exist, remove them.

    Or the version of the JSP you are having is less than 2.1, as prior to version 2.1 EL were not supported for jsp.


    This exam is about JSP2.0
     
    Marshal
    Posts: 67451
    173
    Mac Mac OS X IntelliJ IDE jQuery Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    khushhal yadav wrote: as prior to version 2.1 EL were not supported for jsp.


    Not correct. The EL is supported as of JSP 2.0.
     
    khushhal yadav
    Ranch Hand
    Posts: 242
    Mac Java Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks for correction Bear Bibeault and Christophe Verré

    I meant to write that only (prior to version 2.0) but while writing got it wrong.

    Regards,
    Khushhal
     
    Hrishikesh Maluskar
    Ranch Hand
    Posts: 115
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    i configured my web.xml file....now also its showing the same earlier output
     
    Hrishikesh Maluskar
    Ranch Hand
    Posts: 115
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    i got the solution...we have to include the following code in our JSP

     
    Ranch Hand
    Posts: 368
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    But by default isELIgnored="false"
    so why that is giving problem ?
     
    Christophe Verré
    Sheriff
    Posts: 14691
    16
    Eclipse IDE VI Editor Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    i got the solution...


    No, it's not a solution, because you don't need this anymore.
    Please post your web.xml.
     
    Hrishikesh Maluskar
    Ranch Hand
    Posts: 115
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    here is my web.xml
     
    khushhal yadav
    Ranch Hand
    Posts: 242
    Mac Java Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Hrishikesh,

    Shailesh is right about the statement he made.

    But would like to know one thing, if earlier did you write something like this explicitly in your jsp



    Now this is the only thing that is left which can cause the EL expression from being displayed properly..

    Regards,
    Khushhal

     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic