aspose file tools*
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
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: 61227
    
  66

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: 1018
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