You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by pa...@targetgroup.net on 2006/06/12 11:44:42 UTC

Can't override context-root for web app at deployment time

I'm deploying an EAR and want to override the default context root for a 
contained web app called TPRWeb with a context root of TPRWeb, to a 
context root of TPRWeb


a) is the following geronimo-app-lication.xml correct ?
b) if it is, why when I deploy does the application root remain as TPRWeb 
not TPRWebTest ?

<?xml version="1.0" encoding="UTF-8"?>
<application
  xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
  xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
  xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
  configId="SV2Test"
  application-name="Target Select Test"
  inverseClassloading="false">
 
 
   <dependency>
      <uri>sv2/testproperties/1.1/jar</uri>
    </dependency>
 
  <module>
    <web>TPRWeb.war</web>
    <web-app
         xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
         configId="TPRWeb">
 
         <context-root>TPRWebTest</context-root>
 
    </web-app>
  </module>
 
</application>

Target
www.targetgroup.net

**********************************************************************
DISCLAIMER.
This message is intended only for the use of the Addressee and may
contain information that is PRIVILEGED and CONFIDENTIAL. 
If you are not the intended recipient you must not copy, 
distribute or take any action or reliance upon it. 
The content of this message may also contain personal 
views of an employee of this company and does
not necessarily represent the view of the company.
**********************************************************************
This message has been scanned by Norton Anti-Virus. 
It has also been scanned by MAILsweeper to enforce our e-mail 
policy. If you have any concerns or comments about the content 
of this message, please  e-mail support@targetgroup.net.
**********************************************************************



_____________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com

Re: Can't override context-root for web app at deployment time

Posted by pa...@targetgroup.net.
I absolutely agree with the comments on the JIRA entry on this. As it 
stands we have to modify the EAR to change the context-root in the 
application context, whereas the deployer should be able to over-ride this 
(in our case via the geronimo-application.xml).

In Websphere 6 the deployer can over-ride this in two ways, via the 
application assembly tool which is basically a tool that allows you to 
unzip an EAR, change internal deployment descriptors, and rebuild the EAR 
(i.e. changing the EAR), or the context root can be changed during 
deployment (during a web based wizard) or after deployment (via the web 
based admin console. To my mind the later two cases are analogous to using 
the geronimo-application.xml deployment descriptor at deployment time.

Target
www.targetgroup.net

**********************************************************************
DISCLAIMER.
This message is intended only for the use of the Addressee and may
contain information that is PRIVILEGED and CONFIDENTIAL. 
If you are not the intended recipient you must not copy, 
distribute or take any action or reliance upon it. 
The content of this message may also contain personal 
views of an employee of this company and does
not necessarily represent the view of the company.
**********************************************************************
This message has been scanned by Norton Anti-Virus. 
It has also been scanned by MAILsweeper to enforce our e-mail 
policy. If you have any concerns or comments about the content 
of this message, please  e-mail support@targetgroup.net.
**********************************************************************



_____________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com

Re: Can't override context-root for web app at deployment time

Posted by David Jencks <da...@yahoo.com>.
On Jun 12, 2006, at 5:38 AM, paul.newport@targetgroup.net wrote:

>
> OK thanks, it's in the application.xml as well (as something  
> different) but had hoped the one in the geronimo xml file would  
> have overriden it. I think we can guess which gets priority given  
> my issue !

Several other people have requested that the geronimo plan take  
precedence over application.xml.  I think that's reasonable, but we  
don't have consensus yet.  See http://issues.apache.org/jira/browse/ 
GERONIMO-1470

thanks
david jencks

> Target
> www.targetgroup.net
> **********************************************************************
> DISCLAIMER.
> This message is intended only for the use of the Addressee and may
> contain information that is PRIVILEGED and CONFIDENTIAL.
> If you are not the intended recipient you must not copy,
> distribute or take any action or reliance upon it.
> The content of this message may also contain personal
> views of an employee of this company and does
> not necessarily represent the view of the company.
> **********************************************************************
> This message has been scanned by Norton Anti-Virus.
> It has also been scanned by MAILsweeper to enforce our e-mail
> policy. If you have any concerns or comments about the content
> of this message, please e-mail support@targetgroup.net.
> **********************************************************************
>
> _____________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com


Re: Can't override context-root for web app at deployment time

Posted by pa...@targetgroup.net.
OK thanks, it's in the application.xml as well (as something different) 
but had hoped the one in the geronimo xml file would have overriden it. I 
think we can guess which gets priority given my issue !

Target
www.targetgroup.net

**********************************************************************
DISCLAIMER.
This message is intended only for the use of the Addressee and may
contain information that is PRIVILEGED and CONFIDENTIAL. 
If you are not the intended recipient you must not copy, 
distribute or take any action or reliance upon it. 
The content of this message may also contain personal 
views of an employee of this company and does
not necessarily represent the view of the company.
**********************************************************************
This message has been scanned by Norton Anti-Virus. 
It has also been scanned by MAILsweeper to enforce our e-mail 
policy. If you have any concerns or comments about the content 
of this message, please  e-mail support@targetgroup.net.
**********************************************************************



_____________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com

Re: Can't override context-root for web app at deployment time

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
If you're using an EAR and you want to change the context-root, the
better way is to change it in application.xml.  That will be portable
across all app servers.  (And if there's something set there, it may
be overriding anything you specify in the web plan anyway; I'm not
sure which has precedence.)

Thanks,
    Aaron

On 6/12/06, paul.newport@targetgroup.net <pa...@targetgroup.net> wrote:
>
> I'm deploying an EAR and want to override the default context root for a
> contained web app called TPRWeb with a context root of TPRWeb, to a context
> root of TPRWeb
>
>
> a) is the following geronimo-app-lication.xml correct ?
> b) if it is, why when I deploy does the application root remain as TPRWeb
> not TPRWebTest ?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <application
>
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
>
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
>
> xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
>   configId="SV2Test"
>   application-name="Target Select Test"
>   inverseClassloading="false">
>
>
>    <dependency>
>       <uri>sv2/testproperties/1.1/jar</uri>
>     </dependency>
>
>   <module>
>     <web>TPRWeb.war</web>
>     <web-app
>
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
>
> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
>          configId="TPRWeb">
>
>          <context-root>TPRWebTest</context-root>
>
>     </web-app>
>   </module>
>
> </application>
>
> Target
>
> www.targetgroup.net
>
>
>
> **********************************************************************
>
> DISCLAIMER.
>
> This message is intended only for the use of the Addressee and may
>
> contain information that is PRIVILEGED and CONFIDENTIAL.
>
> If you are not the intended recipient you must not copy,
>
> distribute or take any action or reliance upon it.
>
> The content of this message may also contain personal
>
> views of an employee of this company and does
>
> not necessarily represent the view of the company.
>
> **********************************************************************
>
> This message has been scanned by Norton Anti-Virus.
>
> It has also been scanned by MAILsweeper to enforce our e-mail
>
> policy. If you have any concerns or comments about the content
>
> of this message, please e-mail support@targetgroup.net.
>
> **********************************************************************
> _____________________________________________________________________
>  This email has been scanned for all viruses by the MessageLabs Email
>  Security System. For more information on a proactive email security
>  service working around the clock, around the globe, visit
>  http://www.messagelabs.com
>