This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes question  about the method to get ServletContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "question  about the method to get ServletContext" Watch "question  about the method to get ServletContext" New topic
Author

question about the method to get ServletContext

jeffrey z. lee
Ranch Hand

Joined: Mar 21, 2002
Posts: 40
Hi,
there is a method getContext(java.lang.String uripath) in ServletContext, and getServletContext() in ServletConfig.what is their difference ?


jeffrey z. lee
Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: question about the method to get ServletContext
 
It's not a secret anymore!