org.apache.turbine.services.servlet
Class TurbineServlet

java.lang.Object
  extended byorg.apache.turbine.services.servlet.TurbineServlet

public class TurbineServlet
extends java.lang.Object

Simple static accessor to the EngineContextService

Version:
$Id: TurbineServlet.java 534527 2007-05-02 16:10:59Z tv $
Author:
Kevin A. Burton, Raphaël Luta, Jeff Brekke, Jason van Zyl

Constructor Summary
TurbineServlet()
           
 
Method Summary
static java.lang.String getContextPath()
          Returns the context path for this Turbine application.
static java.lang.String getRealPath(java.lang.String path)
          Returns the complete filesystem path for a given URI
static java.net.URL getResource(java.lang.String uri)
          Returns an URL object for a given URI string.
static java.io.InputStream getResourceAsStream(java.lang.String uri)
          Same as getResource except that it returns an InputStream
static java.lang.String getServerName()
          Returns the server name that this Turbine application is running on.
static java.lang.String getServerPort()
          Returns the port that this Turbine application is running through on the server.
static java.lang.String getServerScheme()
          Returns the server scheme for this Turbine application.
protected static ServletService getService()
          Utility method for accessing the service implementation
static javax.servlet.ServletConfig getServletConfig()
          Returns the servlet config used by this Turbine web application.
static javax.servlet.ServletContext getServletContext()
          Returns the servlet context used by this Turbine web application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TurbineServlet

public TurbineServlet()
Method Detail

getService

protected static ServletService getService()
Utility method for accessing the service implementation

Returns:
a ServletService implementation instance

getResource

public static java.net.URL getResource(java.lang.String uri)
Returns an URL object for a given URI string. This URI is considered relative to the context.

Parameters:
uri - the URI to resolve as an URL
Returns:
an URL object or null is the uri is malformed or can't be resolved

getResourceAsStream

public static java.io.InputStream getResourceAsStream(java.lang.String uri)
Same as getResource except that it returns an InputStream

Parameters:
uri - the URI to resolve
Returns:
an InputStream on the URI content or null
See Also:
ServletContext.getResourceAsStream(java.lang.String)

getRealPath

public static java.lang.String getRealPath(java.lang.String path)
Returns the complete filesystem path for a given URI

Returns:
the full system path of this URI
See Also:
ServletContext.getRealPath(java.lang.String)

getServletConfig

public static javax.servlet.ServletConfig getServletConfig()
Returns the servlet config used by this Turbine web application.

Returns:
turbine servlet config

getServletContext

public static javax.servlet.ServletContext getServletContext()
Returns the servlet context used by this Turbine web application.

Returns:
turbine servlet context

getServerScheme

public static java.lang.String getServerScheme()
Returns the server scheme for this Turbine application. This will either be http or https.

Returns:
String

getServerName

public static java.lang.String getServerName()
Returns the server name that this Turbine application is running on.

Returns:
String

getServerPort

public static java.lang.String getServerPort()
Returns the port that this Turbine application is running through on the server.

Returns:
String

getContextPath

public static java.lang.String getContextPath()
Returns the context path for this Turbine application.

Returns:
String


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.