• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL problem

 
Hrishikesh Maluskar
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->
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 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.
 
khushhal yadav
Ranch Hand
Posts: 242
Java Mac 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 Ubuntu VI Editor
    • 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
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Pie
    Posts: 65342
    97
    IntelliJ IDE Java jQuery Mac Mac OS X
    • 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
    Java Mac 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

     
    Shailesh Narkhede
    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 Ubuntu VI Editor
    • 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
    Java Mac 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

     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic