Iam not able to understand the real meaning of getResource() n getResourceAsStream()methods in ServletContext.
In the api its given
The resource content is returned directly, so be aware that requesting a .jsp page returns the JSP source code. Use a RequestDispatcher instead to include results of an execution.
This method allows the servlet container to make a resource available to servlets from any source. Resources can be located on a local or remote file system, in a database, or in a .war file.
In HFSJ its given tht these methods may not be used to access resources in jar files instead v shuld use classloader's getResource() n getResourceAsStream()methods .
But in the api spec its given :Resources can be located in a .war file.
Can anyone pls expalin me the main purpose of these methods n distiction b/w classloaders methods..