This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

EL not working in my jsp  RSS feed

 
Ranch Hand
Posts: 257
Hibernate Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all,

As per my undersatanding of EL, would give the same result as or


but in my jsp the EL one is not working while all the others are working fine. Kindly help me to identify how to get this EL working. is there any thing I am doing wrong? or do I need to add any jars to get the EL working.

The JSP code



Output

 
Ranch Hand
Posts: 437
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Salil.
The reasons of ignoring EL may be:
1)If your web.xml has an entry <el-ignored>true</el-ignored>,
or
2) Version declaration problems of web.xml. See this.
 
Salil Vverma
Ranch Hand
Posts: 257
Hibernate Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Chinmaya,
My web.xml does not have the entry of <el-ignored>true</el-ignored> alternatively web-app tag in my web.xml was not defined as mentioned in your given faq. When I try to add the web-app entry I get the following error message. and it does not let the application deployed in glassfish..

Error message -
Multiple annotations found at this line:
- Attribute "xmlns:xsi" must be declared for element type "web-app".
- Attribute "version" must be declared for element type "web-app".
- Attribute "xmlns" must be declared for element type "web-app".
- Attribute "xsi:schemaLocation" must be declared for element type "web-app".

The web.xml with these annotation is as attached below. Kindly let us know what change should I do in my web.xml to get this issue resolved.



 
Chinmaya Chowdary
Ranch Hand
Posts: 437
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Salil.

<?xml version="1.0" encoding="ISO-8859-1"?>


Please remove above enry in web.xml and try.
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Salil,

I was also facing the same problem. What I did was I delcared isELEgnored="false" in my page deractive and it started working.
this is not a very good option though as I don't want to specify it for every JSP page.

Amruta
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also remove the DOCTYPE from web.xml. See the deployment descriptor declaration here

Amru Jahagirdar wrote:Hi Salil,
I was also facing the same problem. What I did was I delcared isELEgnored="false" in my page deractive and it started working.
this is not a very good option though as I don't want to specify it for every JSP page.
Amruta


Yes, that's not a good option.
 
Salil Vverma
Ranch Hand
Posts: 257
Hibernate Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Christophe,

Thanks for your help, the below web.xml worked fine for me and EL started working.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!