Beépített rewrite rule engine életre keltése
http://mashb.wordpress.com/2010/03/04/creating-a-rewrite-rule-in-jboss/
Tomcat-Native beállítása JBoss alatt
http://community.jboss.org/wiki/UsingJBossWithTomcatNativeAndSSL
context.xml és hatásai JBoss Web Context alatt
Platforms
The table below is a comparison of locations a context.xml can be used in Tomcat and JBossAS. The base directory, CATALINA_HOME, is defined in JBossAS as:
- JBossAS 4.2.3 GA - JBOSS_HOME/server/config/deploy/jboss-web.deployer
- JBossAS 4.3 GA - JBOSS_HOME/server/config/deploy/jboss-web.deployer
- JBossAS 5.0.0 GA - JBOSS_HOME/server/config/deploy/jbossweb.sar
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="e0afe2bb-036c-4a2d-a75d-5c9b0cdd7957"><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="91f0c9b4-8de0-4208-9e30-87c01fb454a4"><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="77c53af1-b503-464d-baa9-7996a559da63"><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="d910475f-8d18-4c89-ac33-3faff6d642c8"><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="3a96c481-77b6-44f0-a5ac-23d880856e75"><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="3780357a-2184-4bdc-b6f9-7adaf13f163e"><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="93b02b1e-4999-47b2-b749-03387e05b6b1"><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 app
[deployed-web-app]/META-INF/context.xml - 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.
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.
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
Deploy a custom context by following these points:
- 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]/lib
- 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.xml
- 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
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.
Deploy the jar file in JBOSS_HOME/server/[config]/lib