wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 12759
    
    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
 
Similar Threads
display all items from a list
Using bean:define
c:set with target
<jsp:usebean ... body
Standard Action tags?