|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.struts.tiles.TilesUtilImpl
Default implementation of TilesUtil. This class contains default implementation of utilities. This implementation is intended to be used without Struts.
Field Summary | |
static java.lang.String |
DEFINITIONS_FACTORY
Constant name used to store factory in servlet context |
protected org.apache.commons.logging.Log |
log
Commons Logging instance. |
Constructor Summary | |
TilesUtilImpl()
|
Method Summary | |
java.lang.Class |
applicationClass(java.lang.String className)
Deprecated. Use RequestUtils.applicationClass() instead. |
protected DefinitionsFactory |
createDefinitionFactoryInstance(java.lang.String classname)
Create Definition factory of specified classname. |
DefinitionsFactory |
createDefinitionsFactory(javax.servlet.ServletContext servletContext,
DefinitionsFactoryConfig factoryConfig)
Create Definition factory from specified configuration object. |
void |
doForward(java.lang.String uri,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext)
Do a forward using request dispatcher. |
void |
doInclude(java.lang.String uri,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext)
Do an include using request dispatcher. |
static void |
doInclude(java.lang.String uri,
javax.servlet.jsp.PageContext pageContext)
Do an include using PageContext.include(). |
DefinitionsFactory |
getDefinitionsFactory(javax.servlet.ServletRequest request,
javax.servlet.ServletContext servletContext)
Get definition factory from appropriate servlet context. |
protected void |
makeDefinitionsFactoryAccessible(DefinitionsFactory factory,
javax.servlet.ServletContext servletContext)
Make definition factory accessible to Tags. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.commons.logging.Log log
public static final java.lang.String DEFINITIONS_FACTORY
Constructor Detail |
public TilesUtilImpl()
Method Detail |
public void doForward(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext) throws java.io.IOException, javax.servlet.ServletException
uri
- Uri or Definition name to forward.request
- Current page request.servletContext
- Current servlet context.
java.io.IOException
javax.servlet.ServletException
public void doInclude(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext) throws java.io.IOException, javax.servlet.ServletException
uri
- Uri or Definition name to forward.request
- Current page request.response
- Current page response.servletContext
- Current servlet context.
java.io.IOException
javax.servlet.ServletException
public static void doInclude(java.lang.String uri, javax.servlet.jsp.PageContext pageContext) throws java.io.IOException, javax.servlet.ServletException
uri
- Uri or Definition name to forward.
java.io.IOException
javax.servlet.ServletException
public DefinitionsFactory getDefinitionsFactory(javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext)
null
if not found.public DefinitionsFactory createDefinitionsFactory(javax.servlet.ServletContext servletContext, DefinitionsFactoryConfig factoryConfig) throws DefinitionsFactoryException
makeDefinitionsFactoryAccessible(DefinitionsFactory, ServletContext)
.
Factory creation is done by createDefinitionFactoryInstance(String)
.
servletContext
- Servlet Context passed to newly created factory.factoryConfig
- Configuration object passed to factory.
DefinitionsFactoryException
- If an error occur while initializing factoryprotected DefinitionsFactory createDefinitionFactoryInstance(java.lang.String classname) throws DefinitionsFactoryException
DefinitionsFactory
class.
The factory is wrapped appropriately with ComponentDefinitionsFactoryWrapper
if it is an instance of the deprecated ComponentDefinitionsFactory class.
classname
- Class name of the factory to create.
DefinitionsFactoryException
- If an error occur while initializing factoryprotected void makeDefinitionsFactoryAccessible(DefinitionsFactory factory, javax.servlet.ServletContext servletContext)
factory
- Factory to be made accessible.servletContext
- Current servlet context.public java.lang.Class applicationClass(java.lang.String className) throws java.lang.ClassNotFoundException
Class
object for the specified fully qualified
class name from the underlying class loader.
className
- Fully qualified class name to be loaded.
java.lang.ClassNotFoundException
- if the class cannot be found
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |