This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp:usebean" Watch "jsp:usebean" New topic


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 ?
2) request
or any other ?
thanx in advance,
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
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.

author of:
I agree. Here's the link:
subject: jsp:usebean
Similar Threads
display all items from a list
Using bean:define
c:set with target
<jsp:usebean ... body
Standard Action tags?