• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is it good practice?

 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic