org.apache.jk.config
Class WebXml2Jk

java.lang.Object
  extended byorg.apache.jk.config.WebXml2Jk

public class WebXml2Jk
extends java.lang.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 interface WebXml2Jk.MappingGenerator
           
static class WebXml2Jk.NullResolver
           
 
Constructor Summary
WebXml2Jk()
           
 
Method Summary
 void execute()
           
static org.w3c.dom.Node getChild(org.w3c.dom.Node parent, java.lang.String name)
          Get the first child
static java.lang.String getChildContent(org.w3c.dom.Node parent, java.lang.String name)
          Get the first child's content ( i.e. it's included TEXT node )
static java.lang.String getContent(org.w3c.dom.Node n)
          Get the content of a node
 java.io.File getJkDir()
           
static org.w3c.dom.Node getNext(org.w3c.dom.Node current)
          Get the node in the list of siblings
 org.w3c.dom.Node getWebXmlNode()
          Return the top level node
 java.util.Vector getWellcomeFiles()
          Extract the wellcome files from the web.xml
static void main(java.lang.String[] args)
           
static org.w3c.dom.Document readXml(java.io.File xmlF)
           
 void setContext(java.lang.String contextPath)
          Set the canonical name of the virtual host.
 void setDocBase(java.lang.String docBase)
          Set the base directory where the application is deployed ( on the web server ).
 void setGroup(java.lang.String route)
           
 void setHost(java.lang.String vhost)
          Set the canonycal name of the virtual host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebXml2Jk

public WebXml2Jk()
Method Detail

setHost

public void setHost(java.lang.String vhost)
Set the canonycal name of the virtual host.


setContext

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


setDocBase

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


setGroup

public void setGroup(java.lang.String route)

getWebXmlNode

public org.w3c.dom.Node getWebXmlNode()
Return the top level node


getJkDir

public java.io.File getJkDir()

getWellcomeFiles

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


execute

public void execute()

main

public static void main(java.lang.String[] args)

getContent

public static java.lang.String getContent(org.w3c.dom.Node n)
Get the content of a node


getChild

public static org.w3c.dom.Node getChild(org.w3c.dom.Node parent,
                                        java.lang.String name)
Get the first child


getChildContent

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


getNext

public static org.w3c.dom.Node getNext(org.w3c.dom.Node current)
Get the node in the list of siblings


readXml

public static org.w3c.dom.Document readXml(java.io.File xmlF)
                                    throws org.xml.sax.SAXException,
                                           java.io.IOException,
                                           javax.xml.parsers.ParserConfigurationException
Throws:
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.