| Author |
is it good practice?
|
Madhu Sudhana
Ranch Hand
Joined: Apr 16, 2006
Posts: 127
|
|
Hi Ranchers Is it a good practice to make use of the following code in action clsses reuest.getParameter("abcd"); request.setAttribute("abcd"); session.setAttribute("abcd"); session.getAttribute("abcd"); if not how can we do it??? I need a reply soooon thank you
|
"And the trouble is, if you don't risk anything, you risk even more." -- Erica Jong.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26193
|
|
Sudhana, Two things in this: 1) It is prefered to use form.getXXX() rather than request.getParameter() 2) You usually don't want to put the same attribute in both the request and session. I'm not sure if you are actually doing this or just used "abcd" to represent any name.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: is it good practice?
|
|
|