Results 1 to 8 of 8

Thread: which technique is perfect?

  1. #1
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    which technique is perfect?

    I want to move data from one page to another page. I have two ways..

    1. Using session object
    2. Using hidden form field

    Tell me which one is more useful and best ?

    ------------------
    suresh

    Last edited by psuresh1982; 02-03-2007 at 08:46 AM.

  2. #2
    Expert Member
    Join Date
    Oct 2005
    Answers
    383

    Re: which technique is perfect?

    there are four (and not two) techniques
    1)hidden form
    2)cookies
    3)httpsession
    4)urlrewriting

    best is to use httpsession.

    since hiddenform increases the complexity of code.
    cookies are not secure and can b disabled by client

    so go with sessions

    :)
    NEVER SAY DIE.

  3. #3
    Junior Member
    Join Date
    Sep 2008
    Answers
    1

    Re: which technique is perfect?

    Sessions r the best


  4. #4
    Junior Member
    Join Date
    Jul 2008
    Answers
    10

    Re: which technique is perfect?

    To share the data in jsp from one page to another page,you can use any two technique from below-

    (1) request object.
    (2) session object.

    both object have setAttribute(String name,Object value) and an Object getAttribute(String name) method.


  5. #5
    Junior Member
    Join Date
    Apr 2008
    Answers
    1

    Re: which technique is perfect?

    Session r best.. it is secure.. and also no limits..


  6. #6
    Junior Member
    Join Date
    Oct 2011
    Answers
    2

    Re: which technique is perfect?

    Depends on the amount of data you are transferring. If data is limited to couple of attributes than session would be perfect, but if amount of data is too much then session would create overhead and in that case hidden fields should be used.


  7. #7
    Junior Member
    Join Date
    Oct 2011
    Answers
    2

    Re: which technique is perfect?

    hidden form servlet is used for small uesr interface with data ,internally at the last page all the fields are available so if u want to send any data from one servlet to any of the servlet session is the best choice i think.


  8. #8
    Junior Member
    Join Date
    Oct 2011
    Answers
    2

    Re: which technique is perfect?

    if control is not redirecting from one jsp to another jsp storing to request attribute is useless, but if we store it into session variable it can be retrieved in any of the cases.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact