File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Failed to evaluate EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Failed to evaluate EL" Watch "Failed to evaluate EL" New topic
Author

Failed to evaluate EL

Faber Siagian
Ranch Hand

Joined: Jul 08, 2008
Posts: 52
I've created a simple Expression Language example :



The servlet already set an attribute named "person" and its value is a bean object. Also, the request
is already forwarded to the jsp correctly.

But unfortunately, the result is not what i expect. The browser gives me :

Person name is : ${requestScope["person"].name}

Did i miss something here ?


Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 (88 %)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Have you read through the JSP FAQ to make sure that your application is properly set up?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

P.S. Why would you be using the [] notation in this case as opposed to:or even more simply as:
?
Faber Siagian
Ranch Hand

Joined: Jul 08, 2008
Posts: 52
Just want to try finding an attribute in the request scope, instead of page or session or application scope.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Then you do want to use the requestScope map, but it's not necessary to use the [] notation. It's certainly not wrong, just kind of odd.

Have you checked through the FAQ yet to see if your setup is correct. Pay particular attention to how the deployment descriptor is declared.
Faber Siagian
Ranch Hand

Joined: Jul 08, 2008
Posts: 52
i will check it out. By the way thanks Bear for your help.
sridhar ponnusamy
Greenhorn

Joined: Sep 07, 2008
Posts: 19
There are two things ,which makes EL not evaluated.

1)Entry in web.xml
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored> true </el-ignored>
</jsp-property-group>
</jsp-config>

2)<%@ page isELIgnored=�true� %>

please check for it...


scjp 1.5 --> 93%<br />scwcd 1.5 --> preparing.....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

Originally posted by sridhar ponnusamy:
There are two things ,which makes EL not evaluated.
There are many ways to get the setup wrong in order to cause this.
 
Consider Paul's rocket mass heater.
 
subject: Failed to evaluate EL
 
Similar Threads
getProperty question
again accessing map values in EL
Doubts
Arithmetic value of "" in EL expressions
page 360 if property="*"