This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes EL jsp scope issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "EL jsp scope issue" Watch "EL jsp scope issue" New topic
Author

EL jsp scope issue

Mauricio Lopes Bonetti
Greenhorn

Joined: May 07, 2012
Posts: 2


That code should print "Sara". Am I wrong? It prints nothing.
"list" is in pageScope. EL should not look for it?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60788
    
  65

Mauricio Lopes Bonetti wrote:That code should print "Sara". Am I wrong?

You are wrong.

"list" is in pageScope.

It is not. Where did you place it into page scope?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mauricio Lopes Bonetti
Greenhorn

Joined: May 07, 2012
Posts: 2
That's the generated Servlet:



Can't I get local objects using EL without specifying a scope?
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
Declaring it as a local java variable on the page does not add it as an attribute in any scope.
If you want to access it in EL, you need to put it there explicitly.




And now of course to complete the example, you pull the scriptlet code out into a servlet where it belongs, and forward to the JSP.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EL jsp scope issue
 
Similar Threads
Struts1: Nested/Indexed properties issue
WA #1.....word association
EL doubt?
el-ignored doubt
can you help me about EL please