org.utgenome.shell.tomcat
Class TomcatServer

java.lang.Object
  extended by org.utgenome.shell.tomcat.TomcatServer

public class TomcatServer
extends Object

Embedded Tomcat Server

Author:
leo

Nested Class Summary
static class TomcatServer.Opt
           
 
Constructor Summary
TomcatServer(int port)
          Creates a TomcatServer instance with the specified port
TomcatServer(TomcatServerConfiguration configuration)
          Configures the tomcat server
 
Method Summary
 void addContext(String contextPath, String docBase)
           
 File findDir(String resourceName)
           
static void main(String[] args)
          entry point for running Tomcat from CUI
 void registerWAR(String contextPath, String pathToTheWarFile)
           
 void setConfiguration(TomcatServerConfiguration configuration)
           
 void start()
          Starts a Tomcat server
 void stop()
          Stops the tomcat server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TomcatServer

public TomcatServer(int port)
             throws org.xerial.core.XerialException
Creates a TomcatServer instance with the specified port

Parameters:
port - port used by the tomcat
Throws:
org.xerial.core.XerialException

TomcatServer

public TomcatServer(TomcatServerConfiguration configuration)
             throws org.xerial.core.XerialException
Configures the tomcat server

Parameters:
configuration - configuration parameters
Throws:
org.xerial.core.XerialException
Method Detail

main

public static void main(String[] args)
entry point for running Tomcat from CUI

Parameters:
args -

setConfiguration

public void setConfiguration(TomcatServerConfiguration configuration)

start

public void start()
           throws org.xerial.core.XerialException
Starts a Tomcat server

Throws:
TomcatException - when failed to launch tomcat
org.xerial.core.XerialException

registerWAR

public void registerWAR(String contextPath,
                        String pathToTheWarFile)
                 throws org.xerial.core.XerialException
Throws:
org.xerial.core.XerialException

addContext

public void addContext(String contextPath,
                       String docBase)
                throws org.xerial.core.XerialException
Throws:
org.xerial.core.XerialException

stop

public void stop()
          throws org.xerial.core.XerialException
Stops the tomcat server

Throws:
TomcatException - failed to stop tomcat
org.xerial.core.XerialException

findDir

public File findDir(String resourceName)


Copyright © 2007-2012 utgenome.org. All Rights Reserved.