Re: Redirecting a port to a webapp

2009-11-25 Thread Pid
On 25/11/2009 07:24, Looijmans, Mike wrote: I think so too. My personal doubt is still about how Tomcat would try map a request that comes in as "/", "" being variable and being NOT "myapp". Since it does not find a match with "/myapp", and since obviously there cannot be an infinity of

RE: Redirecting a port to a webapp

2009-11-24 Thread Looijmans, Mike
> I think so too. My personal doubt is still about how Tomcat > would try map a request that comes in as "/", "" > being variable and being NOT "myapp". Since it does not find > a match with "/myapp", and since obviously there cannot be an > infinity of "/webapps/" apps pre-config

RE: Redirecting a port to a webapp

2009-11-24 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: Redirecting a port to a webapp > > Or, since :666 should be treated specially, you could arrange for only > the redirector webapp to be deployed on it, as ROOT. I think you missed much of the discus

Re: Redirecting a port to a webapp

2009-11-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 11/24/2009 9:21 AM, Caldarale, Charles R wrote: >> From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Redirecting >> a port to a webapp >> >> Since it does not find a match with "/myapp", and sin

RE: Redirecting a port to a webapp

2009-11-24 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Re: Redirecting a port to a webapp > > Since it does not find a match with "/myapp", and since > obviously there cannot be an infinity of "/webapps/" apps > pre-configured, would it then pass it to

Re: Redirecting a port to a webapp

2009-11-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 11/23/2009 10:57 AM, André Warnier wrote: > The first hurdle is that the HttpRequest is > immutable, so you can't just change its URL and let the call through to > the servlet(s). You have to subclass, or wrap, the original request, > and t

Re: Redirecting a port to a webapp

2009-11-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike, On 11/23/2009 7:17 AM, Looijmans, Mike wrote: > ... >> Note that you'll end up with two independent copies of the servlet >> in your two webapp directories, and they won't share things like >> Sessions between them. > > And, as I mentioned, I d

Re: Redirecting a port to a webapp

2009-11-24 Thread André Warnier
Peter Crowther wrote: 2009/11/24 Looijmans, Mike Because the "" is a random word, not a constant, nor the name of a servlet. Think wikipedia, the request might be for /foo or /bar or whatever, and the servlet uses that word for its own purposes (it will look it up in the database and return

Re: Redirecting a port to a webapp

2009-11-24 Thread Peter Crowther
2009/11/24 Looijmans, Mike > Because the "" is a random word, not a > constant, nor the name of a servlet. Think wikipedia, the request might > be for /foo or /bar or whatever, and the servlet uses that word for its > own purposes (it will look it up in the database and return something > inte

RE: Redirecting a port to a webapp

2009-11-24 Thread Looijmans, Mike
> Let's refresh the issue : > > A request comes into Tomcat for a URL "/". It comes in > either on port 80 or port 666. And you want it to be > processed by the webapp at "/myapp/". No: If it comes in at port 80, nothing "different" is supposed to happen. So / should do whatever /x

Re: Redirecting a port to a webapp

2009-11-23 Thread André Warnier
Looijmans, Mike wrote: ... Instead of introducing a third party component, it seems possible to write a custom Filter to do this. All it needs to do is look at the incoming port and if that equals 666 insert the "/myapp" into the url? The documentation on Filters is large but provides - again -

Re: Redirecting a port to a webapp

2009-11-23 Thread Peter Crowther
2009/11/23 Looijmans, Mike > > No. You want webapps/myapp to be treated as the ROOT context > > for a host. > > appBase="webapps/myapp" means look in the webapps/myapp > > directory to find contexts for this host. The ROOT context in > > that case would be webapps/myapp/ROOT > > > > As a general

RE: Redirecting a port to a webapp

2009-11-23 Thread Looijmans, Mike
> No. You want webapps/myapp to be treated as the ROOT context > for a host. > appBase="webapps/myapp" means look in the webapps/myapp > directory to find contexts for this host. The ROOT context in > that case would be webapps/myapp/ROOT > > As a general rule any configuration that boils down

Re: Redirecting a port to a webapp

2009-11-23 Thread Mark Thomas
Looijmans, Mike wrote: > >>> I tried this, just to be able to make some progress on the actual >>> project, but it does not work as expected. I copied >> the part >>> and replaced: >>> >>> >>> >>> with >>> >>> >> You're telling the Host to look for war files or exploded app >

RE: Redirecting a port to a webapp

2009-11-23 Thread Looijmans, Mike
he 400 response. There is also nothing in the response or its headers to further explain what's wrong with the request. Mike. > -Original Message- > From: Looijmans, Mike > Sent: maandag 23 november 2009 14:06 > To: Tomcat Users List > Subject: RE: Redirecting a port to a

RE: Redirecting a port to a webapp

2009-11-23 Thread Looijmans, Mike
> > I tried this, just to be able to make some progress on the actual > > project, but it does not work as expected. I copied > the part > > and replaced: > > > > > > > > with > > > > > > You're telling the Host to look for war files or exploded app > directories in "webapps

Re: Redirecting a port to a webapp

2009-11-23 Thread Pid
On 23/11/2009 13:06, Looijmans, Mike wrote: Because you want different sets of webapps served on your different connectors, I *think* you'll need two different Services in your server.xml: for port 80 for port 80 for port 80 for port 80, specifying base directory for

RE: Redirecting a port to a webapp

2009-11-23 Thread Looijmans, Mike
> Because you want different sets of webapps served on your > different connectors, I *think* you'll need two different > Services in your server.xml: > > >for port 80 > for port 80 > for port 80 >for port 80, specifying base directory for your > port 80 webapps > fo

RE: Redirecting a port to a webapp

2009-11-23 Thread Looijmans, Mike
... > Note that you'll end up with two independent copies of the > servlet in your two webapp directories, and they won't share > things like Sessions between them. And, as I mentioned, I don't want that to happen. > You might, however, be able to get what you want using a > combination of htt

Re: Redirecting a port to a webapp

2009-11-23 Thread André Warnier
Peter Crowther wrote: ... You might, however, be able to get what you want using a combination of http://tuckey.org/urlrewrite/ and two Connectors defined on the same Service. That indeed looks to me like a way, if you want to stay entirely within Tomcat. It would have the benefit that there is

Re: Redirecting a port to a webapp

2009-11-23 Thread Leon Rosenberg
On 23.11.2009, at 11:08, "Looijmans, Mike" wrote: Hello, After hours of googling and browsing documentation, i came to the conclusion that what i want is either so trivial that everybody knows how to do it, or so complicated that no one ever tried it... I want to accomplish the foll

Re: Redirecting a port to a webapp

2009-11-23 Thread Peter Crowther
2009/11/23 Looijmans, Mike > Hello, > > After hours of googling and browsing documentation, i came to the > conclusion that what i want is either so trivial that everybody knows how to > do it, or so complicated that no one ever tried it... > > I want to accomplish the following in Tomcat 5.5: >

Redirecting a port to a webapp

2009-11-23 Thread Looijmans, Mike
Hello, After hours of googling and browsing documentation, i came to the conclusion that what i want is either so trivial that everybody knows how to do it, or so complicated that no one ever tried it... I want to accomplish the following in Tomcat 5.5: http://myserver:80/xxx just does what