JSP useBean and Scope Types

The beans can be declared in JSP as following:

<jsp:useBean id=”name” class=”mypackage.MyClass” scope=”request”/>

Scope parameter indicates the context in which the bean should be made available. There are four different possible kinds of useBean scope, “page” scope being the default one.

“page”
Availability: The bean is only available on the current page
Storage: The bean is stored in the PageContext of the current page

“request”
Availability: The bean is only available for the current client request
Storage: The bean is stored in the ServletRequest object

“session”
Availability:The object is available to all pages during the life of the current HttpSession.
Storage: The bean is stored in HttpSession object

“application”
Availability: The bean available to all pages that share the same context.
Storage: The bean is stored in ServletContext object

[My Video Promotion]
Tagged , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

One Response to Complete Tutorial On Using SOAP-UI to Mock Web Service Request / Response

  1. Pingback: Twenty Differences Between SOAP and REST Webservice - Java and Android Programming Blog @ iCodeJava.com

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.