Migrate the Oracle WebLogic Server weblogic.xml Descriptor File Configurations to JBoss Enterprise Application Platform 6 or 7
Summary
The Orace WebLogic Server weblogic.xml
deployment descriptor file provides functionality that is not included in the standard Java EE specification. While there is no direct mapping of these descriptor elements, many of these features may be configured in the application deployment or JBoss server configuration files. This article provides examples of how to map a few common configurations. For more information on how to configure the JBoss server, refer to the Administration and Configuration Guide for JBoss Enterprise Application Platform 6 or 7 on https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/.
Example weblogic.xml File
This weblogic.xml
file is used for the examples below.
<weblogic-web-app>
<context-root>MyAppContextRoot</context-root>
<security-role-assignment>
<role-name>TestRole1</role-name>
<principal-name>TestRole1</principal-name>
</security-role-assignment>
<security-role-assignment>
<role-name>TestRole2</role-name>
<principal-name>TestRole2</principal-name>
</security-role-assignment>
<session-descriptor>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>3650</param-value>
</session-param>
</session-descriptor>
<container-descriptor>
<save-sessions-enabled>true</save-sessions-enabled>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<jsp-descriptor>
<jsp-param>
<param-name>keepgenerated</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>encoding</param-name>
<param-value>ISO8859_1</param-value>
</jsp-param>
</jsp-descriptor>
</weblogic-web-app>
Map weblogic.xml Configurations to JBoss
weblogic.xml | JBoss Equivalent |
---|---|
Specify the context root:
|
Specify the context root in the WEB-INF/jboss-web.xml file:
|
Map roles:
|
Use the RoleMappingLoginModule in the server configuration file:
Then add the following to the WEB-INF/jboss-web.xml file:
|
Specify Session Timeout:
|
Add the following to the WEB-INF/jboss-web.xml:
|
Specify class loading precedence:
|
Because the WAR has its own scoped class loader, the classes packaged in the WEB-INF/lib and WEB-INF/classes directories will always be loaded from inside the Web Application. There is no known alternative/relative configuration in JBoss.
|
Configure JSPs:
|
In JBoss EAP 6, you configure JSPs in the web subsystem of the server configuration file.
In JBoss EAP 7, you configure JSPs in the undertow subsystem of the server configuration file.
|
Comments