This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about the method to get ServletContext

 
jeffrey z. lee
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
there is a method getContext(java.lang.String uripath) in ServletContext, and getServletContext() in ServletConfig.what is their difference ?
 
Bala Krishna
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeff,
The getServletContext() in ServletConfig returns a reference to the ServletContext object for [I] the same [italics] web application. The method in ServletContext takes a path to OTHER web applications in the same server, and returns a reference to that OTHER web application hosted on the same server. Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic