It's not a secret anymore!
The moose likes Struts and the fly likes is it good practice? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "is it good practice?" Watch "is it good practice?" New topic

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



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
author & internet detective

Joined: May 26, 2003
Posts: 33102

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: is it good practice?
jQuery in Action, 3rd edition