-
Contributing Member
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.
-
Expert Member
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
-
Junior Member
Re: which technique is perfect?
-
Junior Member
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.
-
Junior Member
Re: which technique is perfect?
Session r best.. it is secure.. and also no limits..
-
Junior Member
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.
-
Junior Member
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.
-
Junior Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules