Custom Application Context Or Cite Inwards Jboss Or Wildfly

As far every bit I know in that place are iii ways to deploy an application inwards JBoss or Wildfly amongst a custom application context name.

1.) By adding jboss-web.xml inwards your spider web projection WEB-INF folder;
<?xml version="1.0" encoding="UTF-8"?> <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="       http://www.jboss.com/xml/ns/javaee       http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">    <context-root>/</context-root> </jboss-web> 

2.) Adding application.xml inwards your ear's META-INF folder:
<?xml version="1.0" encoding="UTF-8"?> <application version="5" xmlns="http://java.sun.com/xml/ns/javaee"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="       http://java.sun.com/xml/ns/javaee       http://java.sun.com/xml/ns/javaee/application_5.xsd">  <module>   <ejb>czetsuya-ejb.jar</ejb>  </module>  <module>   <web>    <web-uri>czetsuya.war</web-uri>    <context-root>/</context-root>   </web>  </module> </application> 

3.) In your ear's pom.xml:
<plugin>  <groupId>org.apache.maven.plugins</groupId>  <artifactId>maven-ear-plugin</artifactId>  <version>${version.ear.plugin}</version>  <configuration>   <!-- Tell Maven nosotros are using Java EE vi -->   <version>6</version>   <!-- Use Java EE ear libraries every bit needed. Java EE ear libraries are     inwards slow trend to packet whatever libraries needed inwards the ear, in addition to automatically     accept whatever modules (EJB-JARs in addition to WARs) purpose them -->   <defaultLibBundleDir>lib</defaultLibBundleDir>   <modules>     <webModule>     <groupId>com.kbs</groupId>     <artifactId>czetsuya-web</artifactId>     <contextRoot>/</contextRoot>    </webModule>    </modules>   <fileNameMapping>no-version</fileNameMapping>  </configuration> </plugin> 
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.