org.wso2.carbon.webapp.mgt
Class TomcatUtil

java.lang.Object
  extended by org.wso2.carbon.webapp.mgt.TomcatUtil

public class TomcatUtil
extends Object

A set of utility methods for interacting with Embedded Tomcat


Constructor Summary
TomcatUtil()
           
 
Method Summary
static void addWebappsDeployer(String webappsDir, TomcatGenericWebappsDeployer webappsDeployer)
          Add a TomcatGenericWebappsDeployer
static boolean checkUnpackWars()
          check unpack wars property
static String getApplicationNameFromContext(String contextName)
           
static Map<String,TomcatGenericWebappsDeployer> getWebappsDeployers()
          Retrieve the list of registered webapps deployers
static Boolean isVirtualHostRequest(String requestedHostName)
           
static void remapRequest(javax.servlet.http.HttpServletRequest request)
          This method is used in remapping a request with context at tomcat level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TomcatUtil

public TomcatUtil()
Method Detail

checkUnpackWars

public static boolean checkUnpackWars()
check unpack wars property

Returns:
true if webapp unpacking enabled.

addWebappsDeployer

public static void addWebappsDeployer(String webappsDir,
                                      TomcatGenericWebappsDeployer webappsDeployer)
Add a TomcatGenericWebappsDeployer

Parameters:
webappsDir - The directory in which the webapps are found
webappsDeployer - The corresponding TomcatGenericWebappsDeployer

getWebappsDeployers

public static Map<String,TomcatGenericWebappsDeployer> getWebappsDeployers()
Retrieve the list of registered webapps deployers

Returns:
an unmodifiable list of registered webapps deployers

remapRequest

public static void remapRequest(javax.servlet.http.HttpServletRequest request)
                         throws Exception
This method is used in remapping a request with context at tomcat level. This is mainly used with Lazy loading of tenants and Lazy loading of webapps, where we can remap a request for a lazy loaded webapp so that any request (GET, POST) parameters will not get lost with the first request.

Parameters:
request - - servlet request to be remapped for contexts
Throws:
Exception - - on error

getApplicationNameFromContext

public static String getApplicationNameFromContext(String contextName)

isVirtualHostRequest

public static Boolean isVirtualHostRequest(String requestedHostName)


Copyright © 2015 WSO2. All rights reserved.