• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

What is the difference?

 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Stop it! You're embarassing me! And you are embarrassing this tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic