Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Struts difference between session scope and request scope

Have Programming Question? Ask it here!
 
 
 


Clark
difference between session scope and request scope
1 Answer(s)      3 years and 9 months ago
Posted in : Struts


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


Advertisement
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
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
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
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
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
Setting Variable Scope
page:  The scope of the page exists upto the current page only. request: The scope of request of will exists upto the request session...Setting Variable Scope In this section we will learn about the different 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
Mean by Bean Scope
Mean by Bean Scope  What is Bean Scope
scope of strategic management
scope of strategic management  What is the need and scope of the strategic management for an organisation or industry
php variable scope
php variable scope  How can i access a variable from scope of another function
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
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 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
Struts 2 Session Scope
Struts 2 Session Scope      ... Framework that displays some messages with session. The current application... the session's set attribute. Here is the code for the JSP form: AjaxTest.jsp <
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
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 Example
Project Scope Management
of the scope as per the need. Moreover, a change request could be a result of many...Project Scope Management includes the processes and the procedures... project scope management includes four steps: Initiation: It is the first step
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
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
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
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
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 Example
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
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
Does javaScript have the concept level scope?
Does javaScript have the concept level scope?  Does javaScript have the concept level scope
PHP Variable Scope
PHP Variable Scope: In every language every variable has a scope, may be within a block or within the whole program etc.  Generally the scope...; is static variable,  the scope of a static variable exists only in a local
Scope and popularity of e-commerce
Scope and popularity of e-commerce The scope of e-commerce is to transact online. Transaction through online can be either on products or services. Most of us are aware of buying products online through some sites like e-bay
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
Scope of ERP in the modern business era
Scope of ERP in the modern business era ERP covers a wide range of business and typically it fulfills all the business demand. For customizing ERP completely, the users have to make some changes in the implemented service package. Here
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 == and === operators?
difference between == and === operators?  Is (====) operator available in java or not? difference between
Difference between struts and JSF
Difference between struts and JSF  What is the difference between struts and JSF
difference between ForwardAction and IncludeAction
difference between ForwardAction and IncludeAction  What is the difference between ForwardAction and IncludeAction
difference between SessionState and ViewState
difference between SessionState and ViewState  What is the difference between SessionState and ViewState
Difference between DispatchAction and LookupDispatchAction
Difference between DispatchAction and LookupDispatchAction  What is the Difference between DispatchAction and LookupDispatchAction
Session Object from request
relevant class. is there any reason for getting session object from request...Session Object from request  Why are we getting session object from request object? Why are we adding cookie object into response object? Why are we
Error : javax.servlet.jsp.JspException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
in any scope at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938...-pattern> </servlet-mapping> <session-config> <session-timeout>35</session-timeout> </session-config> <mime-mapping>
What is the difference between the >> and >>> operators?
What is the difference between the >> and >>> operators?   hi, What is the difference between the >> and >>> operators? Thanks
Difference between 3d and 4d
Difference between 3d and 4d  what is the difference between 3d and 4d
difference between varchar & varchar2?
difference between varchar & varchar2?  What is the difference between varchar & varchar2
Difference between Timer and Thread?
Difference between Timer and Thread?  Can anyone tell me about the difference between Timer and Thread, Why we need to have Timer in case we have Thread implimentation startegy in Java
Difference between Mysql and SQL
Difference between Mysql and SQL  hello, What is the difference between Mysql and SQL??   hii, SQL is structural quary language but mysql is database package
Difference between and merge and update in hibernate
Difference between and merge and update in hibernate  What is difference between and merge and update in hibernate?   Use update() if you are sure that the session does not contain an already persistent instance
difference between lock and synchronization
difference between lock and synchronization  Hi, I am new in java please anyone tell me difference between lock and synchronization in java. its urgent. Thank in advance   Please visit the following link: Lock
Difference between JSP and Servlets
Difference between JSP and Servlets  What is the difference between JSP and Servlets ?   JSP is used mainly for presentation only. A JSP can only be HttpServlet that means the only supported protocol in JSP is HTTP
Difference between SCJP Exams
Difference between SCJP Exams  What is the differences between SCJP 5 (310 - 055) exam and SCJP 6 (310 - 065) exam??? Thank You In Adv
 

 

 

DMCA.com