...
Location | Tomcat 5.5.x | JBossAS 4.3 | Tomcat 6.x | JBossAS 5.0.0 | ||||
---|---|---|---|---|---|---|---|---|
CATALINA_HOME/server.xml (Server/Host/Context) | - | + | - | + | ||||
CATALINA_HOME/conf/server.xml (Server/Host/Context) | + | - | + | - | ||||
CATALINA_HOME/context.xml | - | - | - | - | ||||
CATALINA_HOME/conf/context.xml | + | - | + | - | ||||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="70be7c82-5e8b-46f7-ba6a-4ff5a1796856"><ac:plain-text-body><![CDATA[ | CATALINA_HOME/conf/[Engine]/[Host]/context.xml | + | - | + | - | ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="94f3b3f8-ad3f-4ec9-b1bb-ff1d85dd7d24"><ac:plain-text-body><![CDATA[ | |
CATALINA_HOME/conf/[Engine]/[Host]/context.xml.default | + | - | + | - | ||||
]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b57cf2a3-6c6c-42cc-89bc-4992b2ca5693"><ac:plain-text-body><![CDATA[ | CATALINA_HOME/conf/[Engine]/[Host]/[ctxPath].xml | + | - | + | - | ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8d845268-7291-40df-a5ca-a5cce684eaac"><ac:plain-text-body><![CDATA[ |
JBOSS_HOME/server/[config]/conf/[Engine]/[Host]/context.xml | - | - | - | - | ||||
]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3db0dc52-a60d-4c05-a684-1996dfd9b0d5"><ac:plain-text-body><![CDATA[ | JBOSS_HOME/server/[config]/conf/[Engine]/[Host]/[ctxPath].xml | - | - | - | - | ]]></ac:plain-text-body></ac:structured - macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="712ec412-e1e2-420d-8ed2-afe311694ffd"><ac:plain-text - body><![CDATA[ |
[deployed-web-app]/META-INF/context.xml | + | - | + | - | ||||
]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7e02f0e5-ddc8-4b7e-be40-ee72872a06ca"><ac:plain-text-body><![CDATA[ | [deployed-web-app]/WEB-INF/context.xml | - | + | - | + | ]]></ac:plain-text-body></ac:structured-macro> |
Location Effects
This list explains the effect of each location
\[deployed-web-app\]/WEB-INF/context.xml - Applies only to the web appunmigrated-wiki-markupWiki Markup - \[deployed-web-app\]/META-INF/context.xml \- Applies only to the web appunmigrated-wiki-markup- Applies only to the web app
- CATALINA_HOME/conf/\[Engine\]/\[Host\]/context.xml.default - Applies to all web apps deployed on \ [Host\] by default. A context.xml deployed with a web app will over-ride.
CATALINA_HOME/server.xml (Server/Host/Context)\- Applies to all web apps deployed on \ [Host\]. Can be overridden by context.xml deployed with web app.unmigrated-wiki-markupWiki Markup - CATALINA_HOME/conf/server.xml (Server/Host/Context) - Applies to all web apps deployed on \ [Host\]. Can be overridden by context.xml deployed with a web app.
Wiki Markup - CATALINA_HOME/conf/context.xml - Applies to all web apps deployed on \ [Host\]. Can be overridden by context.xml deployed with a web app.\\
Deploying a custom context in JBossAS
...
- A custom context must extend o.a.catalina.core.StandardContext
- The custom context class must be deployed with a corresponding mbeans-descriptors.xml
The custom context and mbeans-descriptor.xml must be deployed in a JAR to JBOSS_HOME/server/\[config\]/libWiki Markup - The o.a.catalina.startup.ContextConfig must be extended if context configuration needs customization.
- JBossAS 5.0
Edit JBOSS_HOME/server/\[config\]/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xmlWiki Markup - Within the element <mbean name="WarDeployer" add the following properties
- Mandatory: <property name="contextMBeanCode">org.your.project.CustomContext<property>
- Optional: <property name"contextConfigMBeanCode">org.your.project.CustomContextConfig<property>
- JBossAS 4.3
- unmigrated-wiki-markup
- Edit JBOSS_HOME/server/\[config\]/deploy/jboss-web.deployer/META-INF/jboss-service.xml
- Within <mbean code="org.jboss.web.tomcat.service.JBossWeb" name="jboss.web:service=WebServer"
- Add <attribute name="ContextMBeanCode">org.your.project.CustomContext<attribute>
- Prepare a mbeans-descriptors.xml and include it in a jar file along with your custom context class.unmigrated-wiki-markup
- Deploy the jar file in JBOSS_HOME/server/\[config\]/lib