[jboss-dev-forums] [Design of JBoss/Tomcat Integration] - Re: Webapp under root context eg. http://localhost/

cococ do-not-reply at jboss.com
Fri Jan 12 13:04:34 EST 2007


There are several ways to do this.

If your webapp is part of an EAR file, then the webapp's context root can be defined in the EAR's META-INF/application.xml file (see: http://docs.jboss.org/jbossas/guides/webguide/r2/en/html_single/#d0e777).

<application>
  |   ...
  |   <module>
  |     <web>
  |      <web-uri>my.war</web-uri>
  |      <context-root>m</context-root>
  |     </web>
  |   </module>
  | </application>
  | 

If your webapp is not packaged in an EAR, but deployed as just a webapp, then the context-root can be defined in WEB-INF/jboss-web.xml of the webapp.

<jboss-web>
  |   <context-root>my</context-root>
  | </jboss-web>
  | 

You don't typically deploy a webapp inside of a SAR since this is a service archive (at least I'm not familiar with that practice), either wrap the webapp in an EAR, or deploy it singularly.


Christopher

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001059#4001059

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001059



More information about the jboss-dev-forums mailing list