Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

useBean doubt?

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

The following is from David Bridgewater's book,

When we use <jsp:useBean> standard action, how the bean actually references the object can be on any of the ways as below,

1. As a local variable in the method, whose name comes from value of the id
attribute (so theDog becomes a local variable).
2. As an attribute in some scope or other�page, request, session, or
application. In this case, theDog is the name of the attribute.

I'm not able to understand the second way?
[ July 06, 2007: Message edited by: Jothi Shankar Kumar Sankararaj ]
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any help guys!
 
anil kumar
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Shankar


If you use "type" attribute in the <jsp:useBean> it checks the scope.By default the scope is page scope.

If you set the scope as a request.setAttribute("some thing","some thing"),in some servlet.
And you set the <jsp:useBean> scope attribute as request.Then it checks the request scope.




Thanks

Anil Kumar

[ July 06, 2007: Message edited by: anil kumar ]
[ July 06, 2007: Message edited by: anil kumar ]
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I'm looking for justification on the second point that I had mentioned above!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't even understand which method he is talking about in the first point...
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course it is the _jspservice() method
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic