public class QuickStartDescriptorGenerator
extends java.lang.Object
Generate an effective web.xml from a WebAppContext, including all components from web.xml, web-fragment.xmls annotations etc.
If generating quickstart for a different java platform than the current running platform, then the org.eclipse.jetty.annotations.javaTargetPlatform attribute should be set on the Context with the platform number of the target JVM (eg 8).
Modifier and Type | Field and Description |
---|---|
protected int |
_count |
protected java.lang.String |
_extraXML |
protected boolean |
_generateOrigin |
protected java.lang.String |
_originAttribute |
protected WebAppContext |
_webApp |
static java.lang.String |
DEFAULT_ORIGIN_ATTRIBUTE_NAME |
static java.lang.String |
DEFAULT_QUICKSTART_DESCRIPTOR_NAME |
static java.lang.String |
ORIGIN |
Constructor and Description |
---|
QuickStartDescriptorGenerator(WebAppContext w,
java.lang.String extraXML,
java.lang.String originAttribute,
boolean generateOrigin) |
Modifier and Type | Method and Description |
---|---|
void |
generateQuickStartWebXml(java.io.OutputStream stream)
Perform the generation of the xml file
|
java.util.Map<java.lang.String,java.lang.String> |
origin(MetaData md,
java.lang.String name)
Find the origin (web.xml, fragment, annotation etc) of a web artifact from MetaData.
|
public static final java.lang.String ORIGIN
public static final java.lang.String DEFAULT_QUICKSTART_DESCRIPTOR_NAME
public static final java.lang.String DEFAULT_ORIGIN_ATTRIBUTE_NAME
protected WebAppContext _webApp
protected java.lang.String _extraXML
protected java.lang.String _originAttribute
protected boolean _generateOrigin
protected int _count
public QuickStartDescriptorGenerator(WebAppContext w, java.lang.String extraXML, java.lang.String originAttribute, boolean generateOrigin)
w
- the source WebAppContextextraXML
- any extra xml snippet to appendoriginAttribute
- param value to use for the context param origin attributegenerateOrigin
- true
to generate the origin attributepublic void generateQuickStartWebXml(java.io.OutputStream stream) throws java.io.FileNotFoundException, java.io.IOException
stream
- the stream to generate the quickstart-web.xml tojava.io.IOException
- if unable to generate the quickstart-web.xmljava.io.FileNotFoundException
- if unable to find the filepublic java.util.Map<java.lang.String,java.lang.String> origin(MetaData md, java.lang.String name)
md
- the metadataname
- the nameCopyright © 1995–2023 Webtide. All rights reserved.