org.apache.jk.config

Class WebXml2Jk

public class WebXml2Jk extends Object

Read a web.xml file and generate the mappings for jk2. It can be used from the command line or ant. In order for the web server to serve static pages, all webapps must be deployed on the computer that runs Apache, IIS, etc. Dynamic pages can be executed on that computer or other servers in a pool, but even if the main server doesn't run tomcat, it must have all the static files and WEB-INF/web.xml. ( you could have a script remove everything else, including jsps - if security paranoia is present ). XXX We could have this in WEB-INF/urimap.properties.

Author: Costin Manolache

Nested Class Summary
static interfaceWebXml2Jk.MappingGenerator
static classWebXml2Jk.NullResolver
Method Summary
voidexecute()
static NodegetChild(Node parent, String name)
Get the first child
static StringgetChildContent(Node parent, String name)
Get the first child's content ( i.e. it's included TEXT node )
static StringgetContent(Node n)
Get the content of a node
FilegetJkDir()
static NodegetNext(Node current)
Get the node in the list of siblings
NodegetWebXmlNode()
Return the top level node
VectorgetWellcomeFiles()
Extract the wellcome files from the web.xml
static voidmain(String[] args)
static DocumentreadXml(File xmlF)
voidsetContext(String contextPath)
Set the canonical name of the virtual host.
voidsetDocBase(String docBase)
Set the base directory where the application is deployed ( on the web server ).
voidsetGroup(String route)
voidsetHost(String vhost)
Set the canonycal name of the virtual host.

Method Detail

execute

public void execute()

getChild

public static Node getChild(Node parent, String name)
Get the first child

getChildContent

public static String getChildContent(Node parent, String name)
Get the first child's content ( i.e. it's included TEXT node )

getContent

public static String getContent(Node n)
Get the content of a node

getJkDir

public File getJkDir()

getNext

public static Node getNext(Node current)
Get the node in the list of siblings

getWebXmlNode

public Node getWebXmlNode()
Return the top level node

getWellcomeFiles

public Vector getWellcomeFiles()
Extract the wellcome files from the web.xml

main

public static void main(String[] args)

readXml

public static Document readXml(File xmlF)

setContext

public void setContext(String contextPath)
Set the canonical name of the virtual host.

setDocBase

public void setDocBase(String docBase)
Set the base directory where the application is deployed ( on the web server ).

setGroup

public void setGroup(String route)

setHost

public void setHost(String vhost)
Set the canonycal name of the virtual host.
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.