Package org.apache.velocity.tools.view
Interface JeeConfig
-
- All Known Implementing Classes:
JeeContextConfig,JeeFilterConfig,JeeServletConfig
public interface JeeConfigBecause sometimes you don't care about the difference between a servlet and a filter. Why isn't there a common interface for
FilterConfigandServletConfigalready? Sheesh.Anyway, this also adds the ability to fake everything if you don't have either a FilterConfig or a ServletConfig handy. Just implement it and override the methods that return things you care about. Oh, and if you don't have any init-params at all, just use
JeeContextConfigasServletContextis the only really essential thing for creating aVelocityView.- Since:
- 2.0
- Version:
- $Id$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringfindInitParameter(String key)Looks for the specified init-param in the servlet/filter config (i.e.StringgetInitParameter(String name)Returns an initialization parameter.EnumerationgetInitParameterNames()Returns all the parameter names.StringgetName()Returns the name of the servlet (or filter) being used.javax.servlet.ServletContextgetServletContext()Returns the servlet context.
-
-
-
Method Detail
-
getInitParameter
String getInitParameter(String name)
Returns an initialization parameter.- Parameters:
name- The name of the initialization parameter.- Returns:
- The value of the parameter.
-
findInitParameter
String findInitParameter(String key)
Looks for the specified init-param in the servlet/filter config (i.e. callsgetInitParameter(java.lang.String)). If no such init-param is found there, it checks theServletContext's init-params for the specified parameter.- Parameters:
key- The name of the initialization parameter.- Returns:
- The value of the initialization parameter.
-
getInitParameterNames
Enumeration getInitParameterNames()
Returns all the parameter names.- Returns:
- The enumeration containing the parameter names.
-
getName
String getName()
Returns the name of the servlet (or filter) being used.- Returns:
- The name of the configuration.
-
getServletContext
javax.servlet.ServletContext getServletContext()
Returns the servlet context.- Returns:
- The servlet context.
-
-