• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

"scope" attribute in jsp:useBean tag

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am getting complex about the "scope" attribute in jsp:useBean tag.
For example,

<jsp:useBean id="item" class="Item" scope="session" />

In the preceding code, will the jsp engine place "item"(instance of Item) in the session scope? or will the jsp engine search it in the session scope? Someone explain to me please...

(sorry if my question is not clear)


 
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yewint Ko wrote:Hi all,
I am getting complex about the "scope" attribute in jsp:useBean tag.
For example,

<jsp:useBean id="item" class="Item" scope="session" />

In the preceding code, will the jsp engine place "item"(instance of Item) in the session scope? or will the jsp engine search it in the session scope? Someone explain to me please...

(sorry if my question is not clear)



your question is clear but the text is not clear

in fact jsp:useBean tag does both the things . at first it will look in to the specified session for it and then if not available there , it will create it and put it in the specified scope.

avi sinha
 
Yewint Ko
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, thanks avi.....
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic