• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

What is the difference?

 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What is the difference between
getAttributeNames()
getParameterNames() and
Are they both same or different?
thanks,
Ramdhan Yadav K
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No , they are not the same
getAttributeNames return a list of available attributes in the servlet context
getParameterNames return a list of all the parameters (the one in past in the URL) to the servlet
for more details, refer to the J2EE documentaion.
and search for the two methods above.
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Maitham,
I don't think attributes available through HttpServletRequest has anythig to do with servlet context. What i observed is that setAttribute() and getAttribute() available in HttpServletRequest is a way of passing objects via. a request while dispatching/forwarding the request to other servlets or web components. I guess with this functionality we can reduce the burdon on session by not overloading them with lots of objects. Correct me if i am wrong!
thanks,
Ram Dhan Yadav K
 
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic