public class TurbineServletService extends TurbineBaseService implements ServletService
This class provides a context service when the application is run in a ServletContainer. It is mainly a wrapper around the ServletContext API.
This class requires Servlet API 2.1 or better.
configuration, name, serviceBrokerinitableBroker, isInitializedSERVICE_NAME| Constructor and Description |
|---|
TurbineServletService() |
| Modifier and Type | Method and Description |
|---|---|
String |
expandRelative(String path)
Expands a string that points to a relative path or path list,
leaving it as an absolute path based on the servlet context.
|
String |
getContextPath()
Returns the context path for this
Turbine application.
|
String |
getRealPath(String uri)
Returns the complete filesystem path for a
given URI
|
URL |
getResource(String uri)
Returns an URL object for a given URI string.
|
InputStream |
getResourceAsStream(String uri)
Same as getResource except that it returns an InputStream
|
String |
getServerName()
Returns the server name that this
Turbine application is running
on.
|
String |
getServerPort()
Returns the port that this Turbine
application is running through
on the server.
|
String |
getServerScheme()
Returns the server scheme for this
Turbine application.
|
ServletConfig |
getServletConfig()
Returns the servlet config used by this
Turbine web application.
|
ServletContext |
getServletContext()
Returns the servlet context used by this
Turbine web application.
|
void |
init()
Load all configured components and initialize them.
|
init, init, shutdowngetConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBrokergetInit, getInitableBroker, setInit, setInitableBrokerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfiguration, getName, getProperties, setName, setServiceBrokergetInit, init, setInitableBroker, shutdownpublic TurbineServletService()
public void init()
init in interface Initableinit in class TurbineBaseServicepublic URL getResource(String uri)
getResource in interface ServletServiceuri - the URI to resolve as an URLServletContext.getResource(java.lang.String)public InputStream getResourceAsStream(String uri)
getResourceAsStream in interface ServletServiceuri - the URI to resolveServletContext.getResourceAsStream(java.lang.String)public String getRealPath(String uri)
getRealPath in interface ServletServiceuri - the URI to resolveServletContext.getRealPath(java.lang.String)public ServletConfig getServletConfig()
getServletConfig in interface ServletServicepublic ServletContext getServletContext()
getServletContext in interface ServletServicepublic String getServerScheme()
getServerScheme in interface ServletServicepublic String getServerName()
getServerName in interface ServletServicepublic String getServerPort()
getServerPort in interface ServletServicepublic String getContextPath()
getContextPath in interface ServletServicepublic String expandRelative(String path)
path - The String containing a path or path list.Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.