MCPcopy Create free account
hub / github.com/apache/tomcat / getResource

Method getResource

java/jakarta/servlet/ServletContext.java:188–188  ·  view source on GitHub ↗

Returns a URL to the resource that is mapped to a specified path. The path must begin with a "/" and is interpreted as relative to the current context root. This method allows the servlet container to make a resource available to servlets from any source. Resources can be located on a local or r

(String path)

Source from the content-addressed store, hash-verified

186 * @exception MalformedURLException if the pathname is not given in the correct form
187 */
188 URL getResource(String path) throws MalformedURLException;
189
190 /**
191 * Returns the resource located at the named path as an <code>InputStream</code> object.

Callers 15

doGetMethod · 0.95
doGetMethod · 0.95
getURLConnectionMethod · 0.95
requestHandlerMethod · 0.95
lifecycleEventMethod · 0.65
urlForMethod · 0.65
doTestMethod · 0.65
doGetMethod · 0.65
testWithOrderingMethod · 0.65
testParseConfigFileMethod · 0.65
paramClassResourceMethod · 0.65

Implementers 5

TesterServletContexttest/org/apache/tomcat/unittest/Tester
JspCServletContextjava/org/apache/jasper/servlet/JspCSer
NoPluggabilityServletContextjava/org/apache/catalina/core/Standard
ApplicationContextjava/org/apache/catalina/core/Applicat
ApplicationContextFacadejava/org/apache/catalina/core/Applicat

Calls

no outgoing calls

Tested by 15

doGetMethod · 0.76
doGetMethod · 0.76
urlForMethod · 0.52
doTestMethod · 0.52
doGetMethod · 0.52
testWithOrderingMethod · 0.52
testParseConfigFileMethod · 0.52
paramClassResourceMethod · 0.52
getResourceMethod · 0.52
doGetMethod · 0.52
testGetResourceEmptyMethod · 0.52