You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Simon Laws <si...@googlemail.com> on 2007/11/19 11:22:42 UTC

URLs in servlet containers was: Starting a domain manager on a url including a path?

I've just committed changes to the Jetty and Tomcat host containers.
(r596243 and r596246) to ensure that URLs are formed correctly when context
is included in the Node URI, e.g.

http://localhost:8080/somecontext

is combined with

mycomponent/myservice

to give

http://localhost:8080/somecontext/mycomponent/myservice

Tomcat was working OK in most circumstances but the original changes to
jetty meant it was exposing services as

http://localhost:8080/somecontext/somecontext/mycomponent/myservice

I've reverted the original changes so that the context is not set on the
server but is added to the servlet path in getURLMapping(String)  as it
needs to be set back into the binding uri. If we want to set the context to
the server we will have tomake more changes so that the binding can
manipulate the complete URL and not get it confused with the context when
the servlet is registered.


Regards

Simon

Re: URLs in servlet containers was: Starting a domain manager on a url including a path?

Posted by Simon Laws <si...@googlemail.com>.
On Nov 19, 2007 11:44 AM, Simon Laws <si...@googlemail.com> wrote:

>
>
> On Nov 19, 2007 11:29 AM, ant elder <an...@gmail.com> wrote:
>
> > On Nov 19, 2007 10:22 AM, Simon Laws <si...@googlemail.com> wrote:
> >
> > > I've just committed changes to the Jetty and Tomcat host containers.
> > > (r596243 and r596246) to ensure that URLs are formed correctly when
> > > context
> > > is included in the Node URI, e.g.
> > >
> > > http://localhost:8080/somecontext
> > >
> > > is combined with
> > >
> > > mycomponent/myservice
> > >
> > > to give
> > >
> > > http://localhost:8080/somecontext/mycomponent/myservice
> > >
> > > Tomcat was working OK in most circumstances but the original changes
> > to
> > > jetty meant it was exposing services as
> > >
> > > http://localhost:8080/somecontext/somecontext/mycomponent/myservice
> > >
> > > I've reverted the original changes so that the context is not set on
> > the
> > > server but is added to the servlet path in getURLMapping(String)  as
> > it
> > > needs to be set back into the binding uri. If we want to set the
> > context
> > > to
> > > the server we will have tomake more changes so that the binding can
> > > manipulate the complete URL and not get it confused with the context
> > when
> > > the servlet is registered.
> > >
> >
> > After this the calculator-distributed sample no longer works for me nor
> > Tomcat using nodes with paths in the urls. Whats the reasons we can't
> > get
> > Jetty to work with the context path on the http server?  I'm  wondering
> > if
> > that might be easier, it also has to be the way the webapp host works as
> > we
> > can't change the context path of the webapp, but i don't want to go off
> > looking at this if you've already tried it and hit blocking issues?
> >
> >   ...ant
> >
> I'm seeing the calculator-distributed issue too. I've not hit a blocking
> issue. To make contexts work as intended we need to be a bit smarter at the
> way the URL is resolved as we need to resolve the URL provided by the
> servler with the default URL that the server now has. If you want to look
> into that that would be great as I haven't got back to it yet.
>
> Simon
>
I have a fix for the calculator-distributed problem. It's unrelated to the
jetty problem and it to do with accidentally having loaded a composite
twice. Need a test to prevent that. Just doing a full build now.

Simon

Simon

Re: URLs in servlet containers was: Starting a domain manager on a url including a path?

Posted by Simon Laws <si...@googlemail.com>.
On Nov 19, 2007 11:29 AM, ant elder <an...@gmail.com> wrote:

> On Nov 19, 2007 10:22 AM, Simon Laws <si...@googlemail.com> wrote:
>
> > I've just committed changes to the Jetty and Tomcat host containers.
> > (r596243 and r596246) to ensure that URLs are formed correctly when
> > context
> > is included in the Node URI, e.g.
> >
> > http://localhost:8080/somecontext
> >
> > is combined with
> >
> > mycomponent/myservice
> >
> > to give
> >
> > http://localhost:8080/somecontext/mycomponent/myservice
> >
> > Tomcat was working OK in most circumstances but the original changes to
> > jetty meant it was exposing services as
> >
> > http://localhost:8080/somecontext/somecontext/mycomponent/myservice
> >
> > I've reverted the original changes so that the context is not set on the
> > server but is added to the servlet path in getURLMapping(String)  as it
> > needs to be set back into the binding uri. If we want to set the context
> > to
> > the server we will have tomake more changes so that the binding can
> > manipulate the complete URL and not get it confused with the context
> when
> > the servlet is registered.
> >
>
> After this the calculator-distributed sample no longer works for me nor
> Tomcat using nodes with paths in the urls. Whats the reasons we can't get
> Jetty to work with the context path on the http server?  I'm  wondering if
> that might be easier, it also has to be the way the webapp host works as
> we
> can't change the context path of the webapp, but i don't want to go off
> looking at this if you've already tried it and hit blocking issues?
>
>   ...ant
>
I'm seeing the calculator-distributed issue too. I've not hit a blocking
issue. To make contexts work as intended we need to be a bit smarter at the
way the URL is resolved as we need to resolve the URL provided by the
servler with the default URL that the server now has. If you want to look
into that that would be great as I haven't got back to it yet.

Simon

Re: URLs in servlet containers was: Starting a domain manager on a url including a path?

Posted by ant elder <an...@gmail.com>.
On Nov 19, 2007 10:22 AM, Simon Laws <si...@googlemail.com> wrote:

> I've just committed changes to the Jetty and Tomcat host containers.
> (r596243 and r596246) to ensure that URLs are formed correctly when
> context
> is included in the Node URI, e.g.
>
> http://localhost:8080/somecontext
>
> is combined with
>
> mycomponent/myservice
>
> to give
>
> http://localhost:8080/somecontext/mycomponent/myservice
>
> Tomcat was working OK in most circumstances but the original changes to
> jetty meant it was exposing services as
>
> http://localhost:8080/somecontext/somecontext/mycomponent/myservice
>
> I've reverted the original changes so that the context is not set on the
> server but is added to the servlet path in getURLMapping(String)  as it
> needs to be set back into the binding uri. If we want to set the context
> to
> the server we will have tomake more changes so that the binding can
> manipulate the complete URL and not get it confused with the context when
> the servlet is registered.
>

After this the calculator-distributed sample no longer works for me nor
Tomcat using nodes with paths in the urls. Whats the reasons we can't get
Jetty to work with the context path on the http server?  I'm  wondering if
that might be easier, it also has to be the way the webapp host works as we
can't change the context path of the webapp, but i don't want to go off
looking at this if you've already tried it and hit blocking issues?

   ...ant