jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes jsp:usebean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp:usebean" Watch "jsp:usebean" New topic
Author

jsp:usebean

Deepika Wadhwa
Ranch Hand

Joined: Aug 05, 2000
Posts: 57

Hi all,
I want to prevent the Bean from being available for use to any scriptlet defined within a JSP page, Which one of the following <jsp:useBean> scope attributes should i use ?
1)session
2) request
or any other ?
thanx in advance,
Deepika
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
If I am understanding your question correctly, you can't.
A single JSP page gets turned into a servlet class with a monster _jspService method that contains all of the scriptlet code bits.
Any bean will be accessible throughout _jspService.
On the other hand if you mean that you want the use of the bean restricted to a particular request-response cycle, use page or request scope.
Bill

------------------
author of:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp:usebean