Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3873166
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:00:19+00:00 2026-05-19T22:00:19+00:00

How do I make transfer of a class object from one page to another

  • 0

How do I make transfer of a class object from one page to another in a jsp while doing server process too,

eg let be there a page1.jsp it have a commandObject page1 of a class Page

I then fill some of its value in page1.jsp,

I then want the same object to be transfered to another page say page2.jsp
and on that page I fill the remaining values of page1 object and then persist it to data base.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T22:00:20+00:00Added an answer on May 19, 2026 at 10:00 pm

    If you don’t wan’t to (or can’t) use a Singleton bean, how about using the request or session scopes? They are custom-made for this kind of scenario.

    3.5.4.2 Request scope

    Consider the following bean
    definition:

    <bean id="loginAction" class="com.foo.LoginAction" scope="request"/>
    

    The Spring container
    creates a new instance of the
    LoginAction bean by using the
    loginAction bean definition for each
    and every HTTP request. That is, the
    loginAction bean is scoped at the HTTP
    request level. You can change the
    internal state of the instance that is
    created as much as you want, because
    other instances created from the same
    loginAction bean definition will not
    see these changes in state; they are
    particular to an individual request.
    When the request completes processing,
    the bean that is scoped to the request
    is discarded.


    3.5.4.3 Session scope

    Consider the following bean
    definition:

    <bean id="userPreferences" class="com.foo.UserPreferences" scope="session"/> 
    

    The Spring container
    creates a new instance of the
    UserPreferences bean by using the
    userPreferences bean definition for
    the lifetime of a single HTTP Session.
    In other words, the userPreferences
    bean is effectively scoped at the HTTP
    Session level. As with request-scoped
    beans, you can change the internal
    state of the instance that is created
    as much as you want, knowing that
    other HTTP Session instances that are
    also using instances created from the
    same userPreferences bean definition
    do not see these changes in state,
    because they are particular to an
    individual HTTP Session. When the HTTP
    Session is eventually discarded, the
    bean that is scoped to that particular
    HTTP Session is also discarded.

    Source:

    • Request, session, and global session
      scopes
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I make a distributed embedded application that will make use of several micro-controllers. The
I am trying to load a html page through UIWebview.I need to disable all
I am playing with TFS 2010, and am trying to setup a build process
I'm doing some changes on my routes, and suddenly the following is appearing in
I want to use a temp directory that will be unique to this build.
I have a snippet to create a 'Like' button for our news site: <iframe
I am writing a query to fetch results for all the values in a
After having read Ian Boyd 's constructor series questions ( 1 , 2 ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.