Package rife.engine
Class TomcatServer
java.lang.Object
rife.engine.TomcatServer
Embedded Tomcat server that can directly start from a RIFE2 site.
- Since:
- 1.7.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddContext
(String docBase) Adds a web application location to the root context.Add a role for a user.Add a user for the in-memory realm.Adds a web application to the webapps directory.Configures the Tomcat base directory on which all others, such as thework
directory, will be derived.Configures the host name the server will be listening on.port
(int port) Configures the port the server will be listening to.Retrieves the hierarchical properties for this server instance.scanManifest
(boolean scanManifest) Configures whether JARs declared inClass-Path
MANIFEST.MF
entry of other scanned JARs will be scanned.Starts the embedded server.void
stop()
Stops the embedded server.
-
Constructor Details
-
TomcatServer
public TomcatServer()Instantiates a new embedded Tomcat server.- Since:
- 1.7.1
-
-
Method Details
-
addRole
Add a role for a user.- Parameters:
role
- the role nameuser
- the username- Returns:
- the instance of the server that's being configured
- Since:
- 1.7.1
-
addUser
Add a user for the in-memory realm.- Parameters:
user
- the usernamepass
- the password- Returns:
- the instance of the server that's being configured
- Since:
- 1.7.1
-
addWebapp
Adds a web application to the webapps directory.- Parameters:
docBase
- the base directory for the context, for static file- Returns:
- the instance of the server that's being configured
- Since:
- 1.7.1
- See Also:
-
addContext
Adds a web application location to the root context.- Parameters:
docBase
- the base directory for the context, for static file- Returns:
- the instance of the server that's being configured
- Since:
- 1.8.1
- See Also:
-
baseDir
Configures the Tomcat base directory on which all others, such as thework
directory, will be derived.- Parameters:
dir
- the base directory- Returns:
- the instance of the server that's being configured
- Since:
- 1.7.1
-
hostname
Configures the host name the server will be listening on.- Parameters:
host
- the default host name- Returns:
- the instance of the server that's being configured
- Since:
- 1.7.1
-
port
Configures the port the server will be listening to.- Parameters:
port
- the port number- Returns:
- the instance of the server that's being configured
- Since:
- 1.7.1
-
scanManifest
Configures whether JARs declared inClass-Path
MANIFEST.MF
entry of other scanned JARs will be scanned.By default, manifests are not scanned.
- Parameters:
scanManifest
-true
to scan manifests,false
otherwise- Returns:
- the instance of the server that's being configured
- Since:
- 1.8.0
-
properties
Retrieves the hierarchical properties for this server instance.- Returns:
- this server's collection of hierarchical properties
- Since:
- 1.7.1
-
start
Starts the embedded server.- Parameters:
site
- theSite
instance that the server will be set up for- Returns:
- the instance of the server that's being configured
- Since:
- 1.7.1
-
stop
public void stop()Stops the embedded server.- Since:
- 1.7.1
-