This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaBean Scope in JSP pages

 
Reema Patel
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I'm struck at understanding the scope of a JavaBean used inside a standard action element.

For example, considet the following code snippet:

To my surprise, the page works fine. I think the JSP engine should not have even compiled the page, cause the scope of the two elements is different. It should have flaged a compilation error.....

After digging into the work directory this is what I found from the generated servlet:

Pls. help...
[ October 21, 2006: Message edited by: Reema Patel ]
 
Reema Patel
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since nobody has posted a reply...let me try to do some study here.
The same code with some modification now causes compilation error:


I'm still lost as to why does it happen so........
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic