Multi-level context starting at ROOT

View: New views
10 Messages — Rating Filter:   Alert me  

Multi-level context starting at ROOT

by Maurice Yarrow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Tomcat Users Group

I have no problem configuring a multi-level context originating
at the context uri level, e.g.:

    http://www.domain.com/context/multi-level-sub-context/servletname

and I have no problem creating a web-app context at the ROOT level, e.g.:

    http://www.domain.com/servletname

These above have been configured of course using context xml
files in conf/Catalina/localhost.

Problem:
Have not been able to find any correct context xml file configuration
(or naming) that will give a multi-level sub context starting at
the ROOT level, .e.g.:

    http://www.domain.com/multi-level-sub-context/servletname

as well as the above

    http://www.domain.com/servletname

So: question is:
Can this be done ?
How is it configured ?
What are the respective context xml files named ?

Thanks

Maurice Yarrow

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


Re: Multi-level context starting at ROOT

by Konstantin Kolinko :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/4 Maurice Yarrow <Maurice.Yarrow@...>:
> Hello Tomcat Users Group
>
> I have no problem configuring a multi-level context originating
> at the context uri level, e.g.:
>
>   http://www.domain.com/context/multi-level-sub-context/servletname
>

See http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
and search for character '#' there.

Though maybe you mean something different...

Are you using a standalone Tomcat, or you have another webserver before it?

What is your configuration, and what are the versions?


Best regards,
Konstantin Kolinko

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


Re: Multi-level context starting at ROOT

by Pid Ster :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 04/11/2009 11:13, Maurice Yarrow wrote:

> Hello Tomcat Users Group
>
> I have no problem configuring a multi-level context originating
> at the context uri level, e.g.:
>
> http://www.domain.com/context/multi-level-sub-context/servletname
>
> and I have no problem creating a web-app context at the ROOT level, e.g.:
>
> http://www.domain.com/servletname
>
> These above have been configured of course using context xml
> files in conf/Catalina/localhost.
>
> Problem:
> Have not been able to find any correct context xml file configuration
> (or naming) that will give a multi-level sub context starting at
> the ROOT level, .e.g.:
>
> http://www.domain.com/multi-level-sub-context/servletname

It's a separate context, just not a multi-level one.

  "multi-level-sub-context.war"


p

> as well as the above
>
> http://www.domain.com/servletname
>
> So: question is:
> Can this be done ?
> How is it configured ?
> What are the respective context xml files named ?
>
> Thanks
>
> Maurice Yarrow
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


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


Re: Multi-level context starting at ROOT

by Maurice Yarrow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko:

Thanks for your replies.
However, I evidently did not clearly state the problem I am having:
I can define the following context xml files in conf/Catalina/localhost:

    contextname.xml

and

    contextname#multi-level-contextname.xml

and these work as documented, i.e.:

    http://www.domain.com/contextname/servletname

and

    http://www.domain.com/contextname/multi-level-contextname/servletname

I can also create a context xml in conf/Catalina/localhost called

    ROOT.xml which defines the ROOT web app to be at www.domain.com.

This works fine at

    http://www.domain.com/servletname

for example.
But when I define a multi-level-context under ROOT with

    ROOT#multi-level-context.xml

a not-found is returned from

    http://www.domain.com/multi-level-contextname/servletname

I believe this is actually one of the (apparently) unsolved threads in
the Spring users group, and appears to an issue only with the advent
of the "#" hash sign instead of the "_" underscore sign formerly used
in earlier Tomcats (I am using 6.0.18).

Maurice Yarrow

Pid wrote:

> On 04/11/2009 11:13, Maurice Yarrow wrote:
>> Hello Tomcat Users Group
>>
>> I have no problem configuring a multi-level context originating
>> at the context uri level, e.g.:
>>
>> http://www.domain.com/context/multi-level-sub-context/servletname
>>
>> and I have no problem creating a web-app context at the ROOT level,
>> e.g.:
>>
>> http://www.domain.com/servletname
>>
>> These above have been configured of course using context xml
>> files in conf/Catalina/localhost.
>>
>> Problem:
>> Have not been able to find any correct context xml file configuration
>> (or naming) that will give a multi-level sub context starting at
>> the ROOT level, .e.g.:
>>
>> http://www.domain.com/multi-level-sub-context/servletname
>
> It's a separate context, just not a multi-level one.
>
>  "multi-level-sub-context.war"
>
>
> p
>
>> as well as the above
>>
>> http://www.domain.com/servletname
>>
>> So: question is:
>> Can this be done ?
>> How is it configured ?
>> What are the respective context xml files named ?
>>
>> Thanks
>>
>> Maurice Yarrow
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.698 / Virus Database: 270.14.49/2480 - Release Date: 11/03/09 23:37:00
>
>  


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


Re: Multi-level context starting at ROOT

by David Smith-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm still wondering why you'd want to do ROOT#multilevelcontext.xml when
it's functionally the same as multilevelcontext.xml.  What use case do
you have for such a thing?

--David

Maurice Yarrow wrote:

> Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko:
>
> Thanks for your replies.
> However, I evidently did not clearly state the problem I am having:
> I can define the following context xml files in conf/Catalina/localhost:
>
>    contextname.xml
>
> and
>
>    contextname#multi-level-contextname.xml
>
> and these work as documented, i.e.:
>
>    http://www.domain.com/contextname/servletname
>
> and
>
>    http://www.domain.com/contextname/multi-level-contextname/servletname
>
> I can also create a context xml in conf/Catalina/localhost called
>
>    ROOT.xml which defines the ROOT web app to be at www.domain.com.
>
> This works fine at
>
>    http://www.domain.com/servletname
>
> for example.
> But when I define a multi-level-context under ROOT with
>
>    ROOT#multi-level-context.xml
>
> a not-found is returned from
>
>    http://www.domain.com/multi-level-contextname/servletname
>
> I believe this is actually one of the (apparently) unsolved threads in
> the Spring users group, and appears to an issue only with the advent
> of the "#" hash sign instead of the "_" underscore sign formerly used
> in earlier Tomcats (I am using 6.0.18).
>
> Maurice Yarrow
>
> Pid wrote:
>> On 04/11/2009 11:13, Maurice Yarrow wrote:
>>> Hello Tomcat Users Group
>>>
>>> I have no problem configuring a multi-level context originating
>>> at the context uri level, e.g.:
>>>
>>> http://www.domain.com/context/multi-level-sub-context/servletname
>>>
>>> and I have no problem creating a web-app context at the ROOT level,
>>> e.g.:
>>>
>>> http://www.domain.com/servletname
>>>
>>> These above have been configured of course using context xml
>>> files in conf/Catalina/localhost.
>>>
>>> Problem:
>>> Have not been able to find any correct context xml file configuration
>>> (or naming) that will give a multi-level sub context starting at
>>> the ROOT level, .e.g.:
>>>
>>> http://www.domain.com/multi-level-sub-context/servletname
>>
>> It's a separate context, just not a multi-level one.
>>
>>  "multi-level-sub-context.war"
>>
>>
>> p
>>
>>> as well as the above
>>>
>>> http://www.domain.com/servletname
>>>
>>> So: question is:
>>> Can this be done ?
>>> How is it configured ?
>>> What are the respective context xml files named ?
>>>
>>> Thanks
>>>
>>> Maurice Yarrow
>>>


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


Re: Multi-level context starting at ROOT

by Maurice Yarrow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Tomcat User Group and in particular, David Smith:

My use-case is embedding meshcms inside my primary web app and
in a way that they can both share the same session.

David, I appear to correctly understand and use the

    contextname#multi-level-contextname.xml

context file, but I am not acquainted with "multilevelcontext.xml".  How
is this implemented
(example?) and what is its relationship to a user-defined ROOT context ?

Regards,
Maurice
 

David Smith wrote:

> I'm still wondering why you'd want to do ROOT#multilevelcontext.xml when
> it's functionally the same as multilevelcontext.xml.  What use case do
> you have for such a thing?
>
> --David
>
> Maurice Yarrow wrote:
>  
>> Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko:
>>
>> Thanks for your replies.
>> However, I evidently did not clearly state the problem I am having:
>> I can define the following context xml files in conf/Catalina/localhost:
>>
>>    contextname.xml
>>
>> and
>>
>>    contextname#multi-level-contextname.xml
>>
>> and these work as documented, i.e.:
>>
>>    http://www.domain.com/contextname/servletname
>>
>> and
>>
>>    http://www.domain.com/contextname/multi-level-contextname/servletname
>>
>> I can also create a context xml in conf/Catalina/localhost called
>>
>>    ROOT.xml which defines the ROOT web app to be at www.domain.com.
>>
>> This works fine at
>>
>>    http://www.domain.com/servletname
>>
>> for example.
>> But when I define a multi-level-context under ROOT with
>>
>>    ROOT#multi-level-context.xml
>>
>> a not-found is returned from
>>
>>    http://www.domain.com/multi-level-contextname/servletname
>>
>> I believe this is actually one of the (apparently) unsolved threads in
>> the Spring users group, and appears to an issue only with the advent
>> of the "#" hash sign instead of the "_" underscore sign formerly used
>> in earlier Tomcats (I am using 6.0.18).
>>
>> Maurice Yarrow
>>
>> Pid wrote:
>>    
>>> On 04/11/2009 11:13, Maurice Yarrow wrote:
>>>      
>>>> Hello Tomcat Users Group
>>>>
>>>> I have no problem configuring a multi-level context originating
>>>> at the context uri level, e.g.:
>>>>
>>>> http://www.domain.com/context/multi-level-sub-context/servletname
>>>>
>>>> and I have no problem creating a web-app context at the ROOT level,
>>>> e.g.:
>>>>
>>>> http://www.domain.com/servletname
>>>>
>>>> These above have been configured of course using context xml
>>>> files in conf/Catalina/localhost.
>>>>
>>>> Problem:
>>>> Have not been able to find any correct context xml file configuration
>>>> (or naming) that will give a multi-level sub context starting at
>>>> the ROOT level, .e.g.:
>>>>
>>>> http://www.domain.com/multi-level-sub-context/servletname
>>>>        
>>> It's a separate context, just not a multi-level one.
>>>
>>>  "multi-level-sub-context.war"
>>>
>>>
>>> p
>>>
>>>      
>>>> as well as the above
>>>>
>>>> http://www.domain.com/servletname
>>>>
>>>> So: question is:
>>>> Can this be done ?
>>>> How is it configured ?
>>>> What are the respective context xml files named ?
>>>>
>>>> Thanks
>>>>
>>>> Maurice Yarrow
>>>>
>>>>        
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>  
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.698 / Virus Database: 270.14.49/2480 - Release Date: 11/03/09 23:37:00
>
>  


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


Re: Multi-level context starting at ROOT

by David Smith-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> ... but I am not acquainted with "multilevelcontext.xml".
I'm just using your description as written below w/o the hyphens.

> ROOT#multi-level-context.xml

So what you really want is for your ROOT app and this other app to share
the same session.  Hmmmm....  I so rarely do much of anything with
sessions.  Maybe someone here can address that question since it appears
to be what you really want.

--David

Maurice Yarrow wrote:

> Hello Tomcat User Group and in particular, David Smith:
>
> My use-case is embedding meshcms inside my primary web app and
> in a way that they can both share the same session.
>
> David, I appear to correctly understand and use the
>
>    contextname#multi-level-contextname.xml
>
> context file, but I am not acquainted with "multilevelcontext.xml".
> How is this implemented
> (example?) and what is its relationship to a user-defined ROOT context ?
>
> Regards,
> Maurice
>
>
> David Smith wrote:
>> I'm still wondering why you'd want to do ROOT#multilevelcontext.xml when
>> it's functionally the same as multilevelcontext.xml.  What use case do
>> you have for such a thing?
>>
>> --David
>>
>> Maurice Yarrow wrote:
>>  
>>> Hello Tomcat Users Grp and in particular, Pid and Konstantin Kolinko:
>>>
>>> Thanks for your replies.
>>> However, I evidently did not clearly state the problem I am having:
>>> I can define the following context xml files in
>>> conf/Catalina/localhost:
>>>
>>>    contextname.xml
>>>
>>> and
>>>
>>>    contextname#multi-level-contextname.xml
>>>
>>> and these work as documented, i.e.:
>>>
>>>    http://www.domain.com/contextname/servletname
>>>
>>> and
>>>
>>>  
>>> http://www.domain.com/contextname/multi-level-contextname/servletname
>>>
>>> I can also create a context xml in conf/Catalina/localhost called
>>>
>>>    ROOT.xml which defines the ROOT web app to be at www.domain.com.
>>>
>>> This works fine at
>>>
>>>    http://www.domain.com/servletname
>>>
>>> for example.
>>> But when I define a multi-level-context under ROOT with
>>>
>>>    ROOT#multi-level-context.xml
>>>
>>> a not-found is returned from
>>>
>>>    http://www.domain.com/multi-level-contextname/servletname
>>>
>>> I believe this is actually one of the (apparently) unsolved threads in
>>> the Spring users group, and appears to an issue only with the advent
>>> of the "#" hash sign instead of the "_" underscore sign formerly used
>>> in earlier Tomcats (I am using 6.0.18).
>>>
>>> Maurice Yarrow
>>>
>>> Pid wrote:
>>>    
>>>> On 04/11/2009 11:13, Maurice Yarrow wrote:
>>>>      
>>>>> Hello Tomcat Users Group
>>>>>
>>>>> I have no problem configuring a multi-level context originating
>>>>> at the context uri level, e.g.:
>>>>>
>>>>> http://www.domain.com/context/multi-level-sub-context/servletname
>>>>>
>>>>> and I have no problem creating a web-app context at the ROOT level,
>>>>> e.g.:
>>>>>
>>>>> http://www.domain.com/servletname
>>>>>
>>>>> These above have been configured of course using context xml
>>>>> files in conf/Catalina/localhost.
>>>>>
>>>>> Problem:
>>>>> Have not been able to find any correct context xml file configuration
>>>>> (or naming) that will give a multi-level sub context starting at
>>>>> the ROOT level, .e.g.:
>>>>>
>>>>> http://www.domain.com/multi-level-sub-context/servletname
>>>>>        
>>>> It's a separate context, just not a multi-level one.
>>>>
>>>>  "multi-level-sub-context.war"
>>>>
>>>>
>>>> p
>>>>
>>>>      
>>>>> as well as the above
>>>>>
>>>>> http://www.domain.com/servletname
>>>>>
>>>>> So: question is:
>>>>> Can this be done ?
>>>>> How is it configured ?
>>>>> What are the respective context xml files named ?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Maurice Yarrow
>>>>>
>>>>>        
>>
>>


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


RE: Multi-level context starting at ROOT

by Caldarale, Charles R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> From: Maurice Yarrow [mailto:Maurice.Yarrow@...]
> Subject: Re: Multi-level context starting at ROOT
>
> My use-case is embedding meshcms inside my primary web app and
> in a way that they can both share the same session.

If you think multi-level contexts share sessions with other contexts with the same prefix, you're mistaken; all contexts are independent, regardless of whatever similarities their URL paths might have.

My understanding of the servlet spec is that session sharing across contexts is not allowed.  Tomcat does have provision for single sign-on, which may be what you're looking for.
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Single%20Sign%20On%20Valve

 - 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@...
For additional commands, e-mail: users-help@...


Re: Multi-level context starting at ROOT

by Maurice Yarrow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Tomcat Users Group and Chuck Caldarale and David Smith:

Chuck, thanks for clearing this up for me.  I guess a simple session obj
test
would have sufficed to test equality of the two session objects so obtained
from a context and similarly path-named multi-level-subcontext.

Nevertheless, sessions aside, I still have no working context xml
configuration
that allow a multi-level-subcontext to be specified inside a ROOT-level
web app,
even though such a multi-level-subcontext works fine inside a
context-level web
app (example:   http://www.domain.com/context and
http://www.domain.com/context/multi-level-subcontext)

Maurice


Caldarale, Charles R wrote:

>> From: Maurice Yarrow [mailto:Maurice.Yarrow@...]
>> Subject: Re: Multi-level context starting at ROOT
>>
>> My use-case is embedding meshcms inside my primary web app and
>> in a way that they can both share the same session.
>>    
>
> If you think multi-level contexts share sessions with other contexts with the same prefix, you're mistaken; all contexts are independent, regardless of whatever similarities their URL paths might have.
>
> My understanding of the servlet spec is that session sharing across contexts is not allowed.  Tomcat does have provision for single sign-on, which may be what you're looking for.
> http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Single%20Sign%20On%20Valve
>
>  - 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@...
> For additional commands, e-mail: users-help@...
>  
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.698 / Virus Database: 270.14.49/2480 - Release Date: 11/03/09 23:37:00
>
>  


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


RE: Multi-level context starting at ROOT

by Caldarale, Charles R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> From: Maurice Yarrow [mailto:Maurice.Yarrow@...]
> Subject: Re: Multi-level context starting at ROOT
>
> I still have no working context xml configuration that allow
> a multi-level-subcontext to be specified inside a ROOT-level
> web app, even though such a multi-level-subcontext works fine
> inside a context-level web app
> (example:   http://www.domain.com/context and
> http://www.domain.com/context/multi-level-subcontext)

I think you're still confused; there's no context "inside" another one - all contexts are completely independent.  The two URI paths you cite above are for two separate, disjoint contexts - they do not interact, share anything, or otherwise have any relationship with each other beyond the names they are accessed with.  (Note that the term "subcontext" is both meaningless and misleading.)

 - 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@...
For additional commands, e-mail: users-help@...