public class ServletWarClientHelper extends EntityClientHelper
war:///path/to/my/resource/entry.txt
Response response = getContext().getClientDispatcher().get("war:///myDir/test.txt");
if (response.isEntityAvailable()) {
//Do what you want to do.
}
| Constructor and Description |
|---|
ServletWarClientHelper(Client client,
javax.servlet.ServletContext servletContext)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Entity |
getEntity(String decodedPath)
Returns a local entity for the given path.
|
javax.servlet.ServletContext |
getServletContext()
Returns the Servlet context.
|
void |
handleLocal(Request request,
Response response,
String decodedPath)
Handles a local call.
|
createReference, getReencodedVariantEntityName, handleEntityGetgetDefaultLanguage, getTimeToLive, handlegetConnectorService, getContext, getProtocols, start, stop, updategetAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelpedpublic ServletWarClientHelper(Client client, javax.servlet.ServletContext servletContext)
client - The client to help.servletContext - The Servlet context.public Entity getEntity(String decodedPath)
EntityClientHelpergetEntity in class EntityClientHelperdecodedPath - The path of the entity.public javax.servlet.ServletContext getServletContext()
public void handleLocal(Request request, Response response, String decodedPath)
LocalClientHelperhandleLocal in class EntityClientHelperrequest - The request to handle.response - The response to update.decodedPath - The decoded local path.Copyright © 2005–2016. All rights reserved.