com.zfabrik.servletjsp
Class Constants

java.lang.Object
  extended by com.zfabrik.servletjsp.Constants

public final class Constants
extends Object

Web applications are components of type com.zfabrik.ee.webapp.

Technically the Web app handling in z2 is just a thin wrapper around Jetty WebAppContexts.

A Web app can have the following web app specific properties:

webapp.server
The server component this web app is supposed to run on. This property is required. The usual value is environment/webServer.
webapp.path
The context path of the Web app. This property is required. It MUST start with a "/".
webapp.requiredPaths
A Web app may specify a comma separated list of other Web apps that it requires to run. This is very useful if Web app re-use each others resources. The required Web apps are specified by there context path, e.g. webapp.requiredPaths=/a, /second, /somemore.
Typically a Web app will define some system state participation, e.g.
 com.zfabrik.systemState.participation=environment/webWorkerUp
 
that defines under what circumstances the Web app will actually be initialized.

Web apps components have a resource folder. That folder must contain a sub folder WebContent that holds the standard Java Web application structure of an expanded WAR file. In particular the WebContent folder typically has a WEB-INF sub folder that contains the deployment descriptor web.xml.

A typical Web app component looks like this:

 z.properties
 WebContent/
        WEB-INF/
                web.xml
        index.html
 

All definitions in the WebContent folder will be interpreted by Jetty. Jetty specific deployment descriptors (and anything else Jetty specific) can be supplied as described in the Jetty documentation.

Following the standard, Web app components may provide libraries and Java classes in WebContent/WEB-INF/lib and WebContent/WEB-INF/classes resp.

In z2 however the Web app component does not hold the Web app's Java source code. Instead the component's default Java component serves as the main venue to provide the Web app's implementation. See also IJavaComponent.


Field Summary
static String ATTRIBUTE_IS_PAGE_IMPRESSION
          set this in the request as attribute to mark a request as a page impression
static String PATH
          The context path of the Web app.
static String PROXY_CONTEXT_PATH
          header field to specify context path used by the client request.
static String REQUIRED_PATHS
          A Web app may specify a comma separated list of other Web apps that it requires to run.
static String SERVER
          The server component this web app is supposed to run on.
static String WEBAPP_TYPE
          Component type of web apps.
 
Constructor Summary
Constants()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEBAPP_TYPE

public static final String WEBAPP_TYPE
Component type of web apps.

See Also:
Constant Field Values

PROXY_CONTEXT_PATH

public static final String PROXY_CONTEXT_PATH
header field to specify context path used by the client request. This is to be set by reverse proxies to help the backend translate good urls.

See Also:
Constant Field Values

ATTRIBUTE_IS_PAGE_IMPRESSION

public static final String ATTRIBUTE_IS_PAGE_IMPRESSION
set this in the request as attribute to mark a request as a page impression

See Also:
Constant Field Values

REQUIRED_PATHS

public static final String REQUIRED_PATHS
A Web app may specify a comma separated list of other Web apps that it requires to run. This is very useful if Web app re-use each others resources. The required Web apps are specified by there context path, e.g. webapp.requiredPaths=/a, /second, /somemore.

See Also:
Constant Field Values

PATH

public static final String PATH
The context path of the Web app. This property is required. It MUST start with a "/".

See Also:
Constant Field Values

SERVER

public static final String SERVER
The server component this web app is supposed to run on. This property is required. The usual value is environment/webServer.

See Also:
Constant Field Values
Constructor Detail

Constants

public Constants()