Rather, the EL operates upon scoped variables -- that is, objects places in one of the context scopes: page, request, session or application.
Typically scoped variables are created by the page controller for a JSP via the setAttribute() method of the appropriate scoped context.
Isn't local variable a page scoped variable? If not can you please explain the differnce between a local variable and page scoped variable.
thanks, appreciate your help
That is not correct.
Originally posted by saps rao:
I thought the local variables declared using a scriptlet in a JSP will have a page scope. And hence EL can access them.
Isn't local variable a page scoped variable?
Already explained. Scriplet code, including variables, become the method body of the servlet's service() method.
If not can you please explain the differnce between a local variable and page scoped variable.
Page-scoped variables are objects stored in the page context.
[ May 24, 2007: Message edited by: Bear Bibeault ]
In your case EL variable "one" does not exists, which means an empty string. As a try (and ONLY as a try), you may add the following scriptlet code in order to get your page working:
pageContext.setAttribute("one", new Integer(one))