Java Reference
In-Depth Information
getResource()
has one parameter:
B
•
java.lang.String
It returns this value:
•
java.net.URL
It throws this exception:
•
java.net.MalformedURLException
The
getResourceAsStream()
Method
public java.io.InputStream
getResourceAsStream(java.lang.String path)
The
getResourceAsStream()
method returns an
InputStream
object, which allows access to
the resource matching the passed in URL path.
getResourceAsStream()
throws no exceptions.
It has one parameter:
•
java.lang.String
It returns this value:
•
java.io.InputStream
The
getRequestDispatcher()
Method
public RequestDispatcher
getRequestDispatcher(java.lang.String urlpath)
The
getRequestDispatcher()
method returns a
RequestDispatcher
object based on the
passed-in URL path.
getRequestDispatcher()
throws no exceptions.
It has one parameter:
•
java.lang.String
It returns this value:
•
RequestDispatcher
The
log(java.lang.String msg)
Method
public void log(java.lang.String msg)
This
log()
method writes the passed-in message to the context's log. The location of the log is
servlet-engine specific.
log()
returns no value and throws no exceptions.