File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:usebean

 
Deepika Wadhwa
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic