difference between session scope and request scope

difference between session scope and request scope

What is the difference between session scope and request scope when saving formbean ?

View Answers

November 22, 2010 at 12:40 PM

Hi friends,

In the request scope the ActionForm is available only the end of the request/response. When response has been received by the client, than you can not access more data. If you want to keep the form data around for longer, than a single request you can have ActonForm in session scope. By default the actionform is in session scope until unless you define scope.

when the scope is request,the values of formbean would be available for the current request. when the scope is session,the values of formbean would be available throughout the session.

Thanks.









Related Tutorials/Questions & Answers:
difference between session scope and request scope
difference between session scope and request scope   What is the difference between session scope and request scope when saving formbean
Session scope
-It makes the data available to the given page. Request Scope-It shares the data.... Session scope-It limits the data to the given user, it is accessible from any...Session scope  Hii i m java beginner i just started learning java
Advertisements
How to get the request scope values? - Struts
How to get the request scope values?  Get value in Struts
scope in jsp
scope in jsp  could anyone tell me a practical example to understand the scope(page, application, session etc.) in jsp. ALso let me know when to use what scope. it is bit confusing
Scope
Scope       A method's visibility is known as method scope. We can say that it defines whether a object can invoke as well as any subclass can override the method or not. The scope
Using Beans And Request Scope
Using Beans And Request Scope          The scope in which the Bean exists.... request: In this scope bean object is placed in the ServletRequest object
Using Beans And Session Scope
Using Beans And Session Scope          The scope in which the Bean exists... we have been provided with the four scope of a bean. session: In this the bean
Using Beans And Session Scope
Using Beans And Session Scope          The scope in which the Bean exists and the variable named in id is available. The  default value of scope is page. We
Setting Variable Scope
only. request: The scope of request of will exists upto the request...Setting Variable Scope In this section we will learn about the different scope... in different scope. If you store the values in the application scope
Servlet Scope object
Servlet Scope object  Which scope object(Request, Session, Application, Page) to use if (a) I want to maintain the user profile that the customer needs to enter in multiple pages. (b) I wish to validate the user id
Jsp Scope Variables - Java Interview Questions
Jsp Scope Variables  what is the importance of page,session,request n application scope variables in JSP?Am not understanding where which scope... the data available to the given page. Request Scope-It shares the data between all
Mean by Bean Scope
Mean by Bean Scope  What is Bean Scope
jsp scope variables - JSP-Interview Questions
jsp scope variables  what is the importance of page,session,request n... the same page where it was created. If you use request scope, the jsp object can be accessed from any page that serves the request. If you session scope
scope of strategic management
scope of strategic management  What is the need and scope of the strategic management for an organisation or industry
ModuleNotFoundError: No module named 'scope'
ModuleNotFoundError: No module named 'scope'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'scope' How to remove the ModuleNotFoundError: No module named 'scope'
php variable scope
php variable scope  How can i access a variable from scope of another function
Jsp Scope Variables - JSP-Interview Questions
Jsp Scope Variables  what is the importance of page,session,request n application scope variables in JSP?Am not understanding where which scope variable we have to use in programs..let me know when we have to use them seperately
scope of Java Swing in IT ?
scope of Java Swing in IT ?  Hi....... I am fresher ,now I m working in Java Swing developing desktop apps. I am confused abt use of Java Swing... the "How much scope of Java Swing in IT now ?" & wht should i do
What is the scope for big data?
What is the scope for big data?  Hi, I am beginner in Data Science... is the scope for big data? Try to provide me good examples or tutorials links so that I can learn the topic "What is the scope for big data?". Also
Struts 2 Session Scope
Struts 2 Session Scope      ... Framework that displays some messages with session. The current application... been set. It displays a message from the session's set attribute. Here
Project Scope Management
or not. The scope statement is the basis of the agreement between the project... the expansion or shrinking of the scope as per the need. Moreover, a change request...Project Scope Management includes the processes and the procedures
ModuleNotFoundError: No module named 'ast-scope'
ModuleNotFoundError: No module named 'ast-scope'  Hi, My Python... 'ast-scope' How to remove the ModuleNotFoundError: No module named 'ast-scope' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'scope-coupler'
ModuleNotFoundError: No module named 'scope-coupler'  Hi, My... 'scope-coupler' How to remove the ModuleNotFoundError: No module named 'scope-coupler' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'scope-coupler'
ModuleNotFoundError: No module named 'scope-coupler'  Hi, My... 'scope-coupler' How to remove the ModuleNotFoundError: No module named 'scope-coupler' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'scope-plot'
ModuleNotFoundError: No module named 'scope-plot'  Hi, My Python... 'scope-plot' How to remove the ModuleNotFoundError: No module named 'scope-plot' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'tele-scope'
ModuleNotFoundError: No module named 'tele-scope'  Hi, My Python... 'tele-scope' How to remove the ModuleNotFoundError: No module named 'tele-scope' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'tele-scope'
ModuleNotFoundError: No module named 'tele-scope'  Hi, My Python... 'tele-scope' How to remove the ModuleNotFoundError: No module named 'tele-scope' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'torch-scope'
ModuleNotFoundError: No module named 'torch-scope'  Hi, My Python... 'torch-scope' How to remove the ModuleNotFoundError: No module named 'torch-scope' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'ast-scope'
ModuleNotFoundError: No module named 'ast-scope'  Hi, My Python... 'ast-scope' How to remove the ModuleNotFoundError: No module named 'ast-scope' error? Thanks   Hi, In your python environment you
Difference between getCurrentSession() and openSession() in Hibernate ?
Difference between getCurrentSession() and openSession() in Hibernate ?  What is difference between getCurrentSession() and openSession... to a Hibernate Session bound by Hibernate behind the scenes, to the transaction scope
Variables Scope in SQL Procedure
Variables Scope in SQL Procedure         Variable Scope in SQL Procedure is used to define the scope of a variable used in SQL.ADS_TO_REPLACE_1
Spring Bean Scope Default
Spring Bean Scope There are five different types of bean scopes (i.e. singleton, prototype, request, session, global session) supported by the spring framework. Apart of these five the Spring?s core scope is singleton and prototype
Spring Bean Scope Prototype
Spring Bean Scope There are five different types of bean scopes (i.e. singleton, prototype, request, session, global session) supported by the spring framework. Apart of these five the Spring?s core scope is singleton and prototype
Flex Variable Scope
Scope of the variable defines the accessibility of the variable across the application. The global variable has global access to the application and local... or class is assigned the scope of the function or class itself
Application scope variable inside ServletConfigListener
Application scope variable inside ServletConfigListener  Hi, The below code on your website states how to run a code at timed intervals. Suppose I want to set a application scope variable inside the run method in this code. How
What is the access scope of a protected method?
What is the access scope of a protected method?  Hi, What is the access scope of a protected method? thanks   Hi, In Java program, A protected method can be accessed by the classes within the package
Using Beans And Application Scope
Using Beans And Application Scope          The scope in which the Bean exists and the variable named in id is available. The  default value of scope is page
Does javaScript have the concept level scope?
Does javaScript have the concept level scope?  Does javaScript have the concept level scope
Variables Scope in SQL Procedure
Variables Scope in SQL Procedure       Variable Scope in SQL Procedure is used to define the scope of a variable used in SQL. Understand with ExampleADS
Using Beans And Page Scope
Using Beans And Page Scope          The scope in which the Bean exists and the variable named in id is available. The  default value of scope
ModuleNotFoundError: No module named 'scope-injected-contextmanager'
ModuleNotFoundError: No module named 'scope-injected-contextmanager'  ...: No module named 'scope-injected-contextmanager' How to remove the ModuleNotFoundError: No module named 'scope-injected-contextmanager' error
ModuleNotFoundError: No module named 'scope-injected-contextmanager'
ModuleNotFoundError: No module named 'scope-injected-contextmanager'  ...: No module named 'scope-injected-contextmanager' How to remove the ModuleNotFoundError: No module named 'scope-injected-contextmanager' error
ModuleNotFoundError: No module named 'Sill-E-Scope'
ModuleNotFoundError: No module named 'Sill-E-Scope'  Hi, My Python... 'Sill-E-Scope' How to remove the ModuleNotFoundError: No module named 'Sill-E-Scope' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'galileo-scope-components'
ModuleNotFoundError: No module named 'galileo-scope-components'  Hi...: No module named 'galileo-scope-components' How to remove the ModuleNotFoundError: No module named 'galileo-scope-components' error? Thanks  
Difference between error and exception ????????
Difference between error and exception ?  Can we handle a error in java if yes than give an code of an example? Difference between error..., or repaired. They are usually beyond the scope of your application code
Difference between DispatchAction and LookupDispatchAction
Difference between DispatchAction and LookupDispatchAction  What is the Difference between DispatchAction and LookupDispatchAction
difference between SessionState and ViewState
difference between SessionState and ViewState  What is the difference between SessionState and ViewState
difference between ForwardAction and IncludeAction
difference between ForwardAction and IncludeAction  What is the difference between ForwardAction and IncludeAction
Difference between struts and JSF
Difference between struts and JSF  What is the difference between struts and JSF
difference between == and === operators?
difference between == and === operators?  Is (====) operator available in java or not? difference between

Ads