public class QuickStartDescriptorGenerator extends 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 String |
_extraXML |
protected boolean |
_generateOrigin |
protected String |
_originAttribute |
protected WebAppContext |
_webApp |
static String |
DEFAULT_ORIGIN_ATTRIBUTE_NAME |
static String |
DEFAULT_QUICKSTART_DESCRIPTOR_NAME |
static String |
ORIGIN |
| Constructor and Description |
|---|
QuickStartDescriptorGenerator(WebAppContext w,
String extraXML,
String originAttribute,
boolean generateOrigin) |
| Modifier and Type | Method and Description |
|---|---|
void |
generateQuickStartWebXml(OutputStream stream)
Perform the generation of the xml file
|
Map<String,String> |
origin(MetaData md,
String name)
Find the origin (web.xml, fragment, annotation etc) of a web artifact from MetaData.
|
public static final String ORIGIN
public static final String DEFAULT_QUICKSTART_DESCRIPTOR_NAME
public static final String DEFAULT_ORIGIN_ATTRIBUTE_NAME
protected WebAppContext _webApp
protected String _extraXML
protected String _originAttribute
protected boolean _generateOrigin
protected int _count
public QuickStartDescriptorGenerator(WebAppContext w, String extraXML, 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(OutputStream stream) throws FileNotFoundException, IOException
stream - the stream to generate the quickstart-web.xml toIOException - if unable to generate the quickstart-web.xmlFileNotFoundException - if unable to find the fileCopyright © 1995–2018 Webtide. All rights reserved.