|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.web.util.resource.ServletContextLocator
public class ServletContextLocator
Locator based on ServletContext.
| Constructor Summary | |
|---|---|
ServletContextLocator(javax.servlet.ServletContext ctx)
|
|
ServletContextLocator(javax.servlet.ServletContext ctx,
java.lang.String dir)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getDirectory()
Returns the directory used to resolve the relative path, or null if relative path is not allowed. |
java.net.URL |
getResource(java.lang.String name)
Finds the resource with the given name. |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Returns an input stream for reading the specified resource. |
javax.servlet.ServletContext |
getServletContext()
Returns the servlet context. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServletContextLocator(javax.servlet.ServletContext ctx)
public ServletContextLocator(javax.servlet.ServletContext ctx,
java.lang.String dir)
dir - the directory used when relative path is specified
(for getResource(java.lang.String) and getResourceAsStream(java.lang.String)).
It must be null, empty, or starts with /.| Method Detail |
|---|
public javax.servlet.ServletContext getServletContext()
public java.lang.String getDirectory()
LocatorNote: if the returned directory is not null, it must end with '/'.
getDirectory in interface Locatorpublic java.net.URL getResource(java.lang.String name)
Locator
getResource in interface Locatorpublic java.io.InputStream getResourceAsStream(java.lang.String name)
Locator
getResourceAsStream in interface Locatorpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||