• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Failed to evaluate EL

 
Faber Siagian
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64832
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read through the JSP FAQ to make sure that your application is properly set up?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64832
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. Why would you be using the [] notation in this case as opposed to:or even more simply as:
?
 
Faber Siagian
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64832
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i will check it out. By the way thanks Bear for your help.
 
sridhar ponnusamy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64832
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic