You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rob Gregory <Ro...@ibsolutions.com> on 2010/11/09 17:22:19 UTC

Single webapp multiple contexts

Hello Tomcat Users,

 

I am trying to create multiple 'dynamic' contexts using just a single
code base. For example we currently deploy a webapps within a context of
let's say 'A'. This listens quite happily for requests coming in the
form of http://localhost/A/index.htm. What I need to be able to do is
have this same code base also listen for requests in the form of
http://localhost/B/index.htm. I have played with using 'fake'
context.xml e.g.

 

A.xml = <Context useHttpOnly="true"  docBase="C:/0600/ieseries.war"
path="/A" />

B.xml = <Context useHttpOnly="true"  docBase="C:/0600/ieseries.war"
path="/B" />

 

This seems to work but the war is expanded into both contexts and what I
really need is a single code base preferably without the requirement of
using a .war file. I have looked at virtual hosts but this seems to
involve changing the host name which is also not what I am trying to
achieve. 

 

Using Tomcat 6.0.29 under Java(TM) SE Runtime Environment (build
1.6.0_14-b08). CATALINA_HOME is C:/0600.

 

Can anyone give me a gentle push in the right direction if this is at
all possible.

 

Thanks in advance.

 

Rob

 

 


Re: Single webapp multiple contexts

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/11/9 Christopher Schultz <ch...@christopherschultz.net>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mark,
>
> On 11/9/2010 12:49 PM, Mark Thomas wrote:
>> On 09/11/2010 17:30, Rob Gregory wrote:
>>
>>> I have tried what you suggest but the result is that each context
>>> defined in CATALINA_BASE/conf/<enginename>/<hostname> get
>>> deployed/expanded into webapps which results in much more disk space
>>> usage.
>>

Into webapps, or into work?

>> Hmm. That isn't meant to happen. Please create a Bugzilla entry for that
>> one and I'll get it fixed.
>
> How about adding unpackWAR="false" to your <Context>?
>

And antiResourceLocking="false", antiJARLocking="false" if you ever
used that. (Those flags cause copying of resources. You won't need
them if you do not plan to undeploy your app while Tomcat is running).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Single webapp multiple contexts

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

On 11/9/2010 12:49 PM, Mark Thomas wrote:
> On 09/11/2010 17:30, Rob Gregory wrote:
> 
>> I have tried what you suggest but the result is that each context
>> defined in CATALINA_BASE/conf/<enginename>/<hostname> get
>> deployed/expanded into webapps which results in much more disk space
>> usage.
> 
> Hmm. That isn't meant to happen. Please create a Bugzilla entry for that
> one and I'll get it fixed.

How about adding unpackWAR="false" to your <Context>?

Rob,
> I want a single webapp instance e.g. c:\tomcat\webapps\myapp which can
> listen for requests coming from http://localhost/A/index.htm and the
> same webapp to listen for requests coming from
> http://localhsot/B/index.htm, etc. 

Are you using any kind of load-balancing service in front of Tomcat? If
so, you could rewrite URLs on the front-end to point to the same
deployed context. What is the advantage of using multiple URLs to refer
to this webapp? Do you use the URL for some sort of customization?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzZrw8ACgkQ9CaO5/Lv0PAuuACfd0Ka15GiNHufZTYL1PTzWySM
lFYAoK0y37eDE66K/Z+2jFX5H8H3tKcL
=D115
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Single webapp multiple contexts

Posted by Mark Thomas <ma...@apache.org>.
On 09/11/2010 17:30, Rob Gregory wrote:
> Hi Mark, 
> 
> I presume you are the same Mark that has committed the fixes made in the
> changelog?

Correct.

> I have tried what you suggest but the result is that each context
> defined in CATALINA_BASE/conf/<enginename>/<hostname> get
> deployed/expanded into webapps which results in much more disk space
> usage.

Hmm. That isn't meant to happen. Please create a Bugzilla entry for that
one and I'll get it fixed.

> Is there any way to achieve the same result as was previously
> possible within Tomcat 5.5.9 where I could have a context declared
> within CATALINA_BASE/conf/<enginename>/<hostname> but have that
> point/map to an already deployed webapp without it deploying another
> copy of the codebase or seeing the warning that is now output from
> Tomcat 6. Also using a .war file is a real pain for me because of how we
> deploy the different parts of our application.

Try using a directory rather than a WAR and have your context.xml files
point to that.

All of this should be covered in [1] & [2]. I'm guessing that those docs
aren't sufficiently clear. Suggestions for improvements welcome.

Mark

[1] http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
[2]
http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Automatic%20Application%20Deployment


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Single webapp multiple contexts

Posted by Rob Gregory <Ro...@ibsolutions.com>.
Hi Mark, 

I presume you are the same Mark that has committed the fixes made in the
changelog? 

I have tried what you suggest but the result is that each context
defined in CATALINA_BASE/conf/<enginename>/<hostname> get
deployed/expanded into webapps which results in much more disk space
usage. Is there any way to achieve the same result as was previously
possible within Tomcat 5.5.9 where I could have a context declared
within CATALINA_BASE/conf/<enginename>/<hostname> but have that
point/map to an already deployed webapp without it deploying another
copy of the codebase or seeing the warning that is now output from
Tomcat 6. Also using a .war file is a real pain for me because of how we
deploy the different parts of our application.

Many Thanks for your time.
Rob



> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: 09 November 2010 17:22
> To: Tomcat Users List
> Subject: Re: Single webapp multiple contexts
> 
> On 09/11/2010 17:18, Caldarale, Charles R wrote:
> > From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com]
> > Subject: Single webapp multiple contexts
> >
> > I am trying to create multiple 'dynamic' contexts using just a
single
> > code base. For example we currently deploy a webapps within a
context of
> > let's say 'A'. This listens quite happily for requests coming in the
> > form of http://localhost/A/index.htm. What I need to be able to do
is
> > have this same code base also listen for requests in the form of
> > http://localhost/B/index.htm.
> >
> > You don't say if you want a single webapp instance, or a separate
instance
> for each URI path.  Assuming the latter, the only safe way to do it is
to have
> separate .war files or directories; anything else will cause timing
problems.
> Just copy the .war file (or directory) as needed to the properly named
> location, and get rid of the <Context> elements from server.xml
(almost always
> a bad place for them).
> 
> Although if you want a single WAR but multiple deployments of that
WAR,
> place it somewhere outside the appBase and create multiple references
to
> it in CATALINA_BASE/conf/<enginename>/<hostname>
> 
> Mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Single webapp multiple contexts

Posted by Mark Thomas <ma...@apache.org>.
On 09/11/2010 17:18, Caldarale, Charles R wrote:
> From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com] 
> Subject: Single webapp multiple contexts
> 
> I am trying to create multiple 'dynamic' contexts using just a single
> code base. For example we currently deploy a webapps within a context of
> let's say 'A'. This listens quite happily for requests coming in the
> form of http://localhost/A/index.htm. What I need to be able to do is
> have this same code base also listen for requests in the form of
> http://localhost/B/index.htm.
> 
> You don't say if you want a single webapp instance, or a separate instance for each URI path.  Assuming the latter, the only safe way to do it is to have separate .war files or directories; anything else will cause timing problems.  Just copy the .war file (or directory) as needed to the properly named location, and get rid of the <Context> elements from server.xml (almost always a bad place for them).

Although if you want a single WAR but multiple deployments of that WAR,
place it somewhere outside the appBase and create multiple references to
it in CATALINA_BASE/conf/<enginename>/<hostname>

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Single webapp multiple contexts

Posted by Rob Gregory <Ro...@ibsolutions.com>.
Hi Chuck and thanks for replying.

I want a single webapp instance e.g. c:\tomcat\webapps\myapp which can
listen for requests coming from http://localhost/A/index.htm and the
same webapp to listen for requests coming from
http://localhsot/B/index.htm, etc. 

Regards
Rob

> -----Original Message-----
> From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
> Sent: 09 November 2010 17:19
> To: Tomcat Users List
> Subject: RE: Single webapp multiple contexts
> 
> From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com]
> Subject: Single webapp multiple contexts
> 
> I am trying to create multiple 'dynamic' contexts using just a single
> code base. For example we currently deploy a webapps within a context
of
> let's say 'A'. This listens quite happily for requests coming in the
> form of http://localhost/A/index.htm. What I need to be able to do is
> have this same code base also listen for requests in the form of
> http://localhost/B/index.htm.
> 
> You don't say if you want a single webapp instance, or a separate
instance for
> each URI path.  Assuming the latter, the only safe way to do it is to
have
> separate .war files or directories; anything else will cause timing
problems.
> Just copy the .war file (or directory) as needed to the properly named
> location, and get rid of the <Context> elements from server.xml
(almost always
> a bad place for them).
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Single webapp multiple contexts

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com] 
Subject: Single webapp multiple contexts

I am trying to create multiple 'dynamic' contexts using just a single
code base. For example we currently deploy a webapps within a context of
let's say 'A'. This listens quite happily for requests coming in the
form of http://localhost/A/index.htm. What I need to be able to do is
have this same code base also listen for requests in the form of
http://localhost/B/index.htm.

You don't say if you want a single webapp instance, or a separate instance for each URI path.  Assuming the latter, the only safe way to do it is to have separate .war files or directories; anything else will cause timing problems.  Just copy the .war file (or directory) as needed to the properly named location, and get rid of the <Context> elements from server.xml (almost always a bad place for them).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Single webapp multiple contexts

Posted by André Warnier <aw...@ice-sa.com>.
Hi.
Quite apart from all the other answers you already got, check the UrlRewriteFilter at 
www.tuckey.org, to see if it does not provide an alternative way of doing what you want.


Rob Gregory wrote:
> Hello Tomcat Users,
> 
>  
> 
> I am trying to create multiple 'dynamic' contexts using just a single
> code base. For example we currently deploy a webapps within a context of
> let's say 'A'. This listens quite happily for requests coming in the
> form of http://localhost/A/index.htm. What I need to be able to do is
> have this same code base also listen for requests in the form of
> http://localhost/B/index.htm. I have played with using 'fake'
> context.xml e.g.
> 
>  
> 
> A.xml = <Context useHttpOnly="true"  docBase="C:/0600/ieseries.war"
> path="/A" />
> 
> B.xml = <Context useHttpOnly="true"  docBase="C:/0600/ieseries.war"
> path="/B" />
> 
>  
> 
> This seems to work but the war is expanded into both contexts and what I
> really need is a single code base preferably without the requirement of
> using a .war file. I have looked at virtual hosts but this seems to
> involve changing the host name which is also not what I am trying to
> achieve. 
> 
>  
> 
> Using Tomcat 6.0.29 under Java(TM) SE Runtime Environment (build
> 1.6.0_14-b08). CATALINA_HOME is C:/0600.
> 
>  
> 
> Can anyone give me a gentle push in the right direction if this is at
> all possible.
> 
>  
> 
> Thanks in advance.
> 
>  
> 
> Rob
> 
>  
> 
>  
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Single webapp multiple contexts

Posted by Rob Gregory <Ro...@ibsolutions.com>.
The following entries are within the Changelog so it looks like what I
am trying to do is now invalid? Can anyone suggest an alternative way to
achieve the same result of a single code base with multiple contexts?

Change Logs:-

Make context deployment error message for fixDocBase() more meaningful.
(markt)

38570: When checking docBase against appBase, make sure we check for an
exact match against the appBase. (markt)  

39013: When testing for invalid docBase, test for an exact match with
the appBase dir. (markt)  

42678: Only ignore docBase if it really is a subdir of appBase. Patch
provided by juergen. (markt)


> -----Original Message-----
> From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com]
> Sent: 09 November 2010 16:44
> To: Tomcat Users List
> Subject: RE: Single webapp multiple contexts
> 
> Just to expand on this a little. I have previously had something
working
> but that was on Tomcat 5.5.9, The same trick no longer seems to work
> under 6.0.29.
> 
> I basically created a context like
> 
> <Context swallowOutput="false" reloadable="false" useHttpOnly="true"
> path="/B"
> 	docBase="${catalina.home}/webapps/myapp" />
> 
> which used an already deployed copy of our webapp. This did work under
> 5.5.9 but fails with the following error under 6.0.29. Has this
> functionality changed and if so is this sort of trick not a good idea?
> 
> INFO: Deploying configuration descriptor A.xml
> 09-Nov-2010 16:37:21 org.apache.catalina.startup.HostConfig
> deployDescriptor
> WARNING: A docBase C:\intweb\0600\webapps\myapp inside the host
appBase
> has be
> en specified, and will be ignored
> 09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext
> resourcesStart
> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Document base
> C:\intweb\0600\webapps\A does
> not exist or is not a readable directory
>         at
> org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.
> java:142)
>         at
> org.apache.catalina.core.StandardContext.resourcesStart(StandardConte
> xt.java:4249)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> 418)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> .java:791)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
> 1)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
> 
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
> va:637)
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
> ava:563)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498
> )
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> :321)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> eSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> 
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> 
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445
> )
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:5
> 19)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710
> )
>         at
org.apache.catalina.startup.Catalina.start(Catalina.java:581)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>         at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> 09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext start
> SEVERE: Error in resourceStart()
> 09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext start
> SEVERE: Error getConfigured
> 09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext start
> SEVERE: Context [/A] startup failed due to previous errors
> 
> Thanks
> Rob
> 
> 
> > From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com]
> > Sent: 09 November 2010 16:22
> > To: Tomcat Users List
> > Subject: Single webapp multiple contexts
> >
> > Hello Tomcat Users,
> >
> >
> >
> > I am trying to create multiple 'dynamic' contexts using just a
single
> > code base. For example we currently deploy a webapps within a
context
> of
> > let's say 'A'. This listens quite happily for requests coming in the
> > form of http://localhost/A/index.htm. What I need to be able to do
is
> > have this same code base also listen for requests in the form of
> > http://localhost/B/index.htm. I have played with using 'fake'
> > context.xml e.g.
> >
> >
> >
> > A.xml = <Context useHttpOnly="true"  docBase="C:/0600/ieseries.war"
> > path="/A" />
> >
> > B.xml = <Context useHttpOnly="true"  docBase="C:/0600/ieseries.war"
> > path="/B" />
> >
> >
> >
> > This seems to work but the war is expanded into both contexts and
what
> I
> > really need is a single code base preferably without the requirement
> of
> > using a .war file. I have looked at virtual hosts but this seems to
> > involve changing the host name which is also not what I am trying to
> > achieve.
> >
> >
> >
> > Using Tomcat 6.0.29 under Java(TM) SE Runtime Environment (build
> > 1.6.0_14-b08). CATALINA_HOME is C:/0600.
> >
> >
> >
> > Can anyone give me a gentle push in the right direction if this is
at
> > all possible.
> >
> >
> >
> > Thanks in advance.
> >
> >
> >
> > Rob
> >
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Single webapp multiple contexts

Posted by Rob Gregory <Ro...@ibsolutions.com>.
Just to expand on this a little. I have previously had something working
but that was on Tomcat 5.5.9, The same trick no longer seems to work
under 6.0.29. 

I basically created a context like 

<Context swallowOutput="false" reloadable="false" useHttpOnly="true"
path="/B" 
	docBase="${catalina.home}/webapps/myapp" />

which used an already deployed copy of our webapp. This did work under
5.5.9 but fails with the following error under 6.0.29. Has this
functionality changed and if so is this sort of trick not a good idea?

INFO: Deploying configuration descriptor A.xml
09-Nov-2010 16:37:21 org.apache.catalina.startup.HostConfig
deployDescriptor
WARNING: A docBase C:\intweb\0600\webapps\myapp inside the host appBase
has be
en specified, and will be ignored
09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext
resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base
C:\intweb\0600\webapps\A does
not exist or is not a readable directory
        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.
java:142)
        at
org.apache.catalina.core.StandardContext.resourcesStart(StandardConte
xt.java:4249)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
418)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:791)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
1)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)

        at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja
va:637)
        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
ava:563)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498
)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:321)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445
)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:5
19)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext start
SEVERE: Context [/A] startup failed due to previous errors

Thanks
Rob


> From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com]
> Sent: 09 November 2010 16:22
> To: Tomcat Users List
> Subject: Single webapp multiple contexts
> 
> Hello Tomcat Users,
> 
> 
> 
> I am trying to create multiple 'dynamic' contexts using just a single
> code base. For example we currently deploy a webapps within a context
of
> let's say 'A'. This listens quite happily for requests coming in the
> form of http://localhost/A/index.htm. What I need to be able to do is
> have this same code base also listen for requests in the form of
> http://localhost/B/index.htm. I have played with using 'fake'
> context.xml e.g.
> 
> 
> 
> A.xml = <Context useHttpOnly="true"  docBase="C:/0600/ieseries.war"
> path="/A" />
> 
> B.xml = <Context useHttpOnly="true"  docBase="C:/0600/ieseries.war"
> path="/B" />
> 
> 
> 
> This seems to work but the war is expanded into both contexts and what
I
> really need is a single code base preferably without the requirement
of
> using a .war file. I have looked at virtual hosts but this seems to
> involve changing the host name which is also not what I am trying to
> achieve.
> 
> 
> 
> Using Tomcat 6.0.29 under Java(TM) SE Runtime Environment (build
> 1.6.0_14-b08). CATALINA_HOME is C:/0600.
> 
> 
> 
> Can anyone give me a gentle push in the right direction if this is at
> all possible.
> 
> 
> 
> Thanks in advance.
> 
> 
> 
> Rob
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org