Re: having webapp reachable at two URLs

2004-05-12 Thread Mats Henrikson
Tim, Mike,

  If you use Apache in front with jk, could you supply two different
  jkmount directives ?  (I'm actually asking a question, since I don't
  know).  ;)

 No. Jk can't rewrite the request. But mod_rewrite can.
 
 In fact - based on the problem below - using mod_rewrite would probably be 
 the easiest.

Aha, you have figured out what I am trying to do then, and now this
email will get a bit more complex...

I'm using Apache2 and mod_jk to connect to Tomcat. The reason I need the
webapp deployed at two different URL's in Tomcat is that I need two
different Location blocks in Apache to deal with two different ways of
authenticating users. 

Like you said though, I haven't found a way to do this using mod_jk,
which would be the best and simplest way to do it otherwise. 

So, I looked into mod_rewrite, and successfully managed to set it up so
that I can reach the webapp from two different URL's, and mod_rewite
then forwards to the same JkMount. However, the mod_rewrite directives
are evaluated very early in the connection process, before any
Location blocks are considered. This means that by the time Apache
starts thinking about which Location block to use, the URL has already
been rewritten, and so the same block is considered no matter which
initial URL was used by the user, effectively bypassing the extra
Location I wanted them to go through.

So I gave up on the mod_rewrite, and started considering if I could
deploy the same context at two different URL's in Tomcat instead, but if
anybody has a better idea which might work please speak up!

Regards,
-- 
Mats Henrikson
Unix Systems Programmer
Systems Development  Support
Oxford University Computing Services


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: having webapp reachable at two URLs

2004-05-12 Thread Shapira, Yoav

Hi,
Have you considered tomcat's balancer webapp?  It does the same stuff as
I mentioned before with the filter, only the code is there for you, you
just need to configure it.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Mats Henrikson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 2:54 AM
To: Tomcat Users List
Subject: Re: having webapp reachable at two URLs

Tim, Mike,

  If you use Apache in front with jk, could you supply two different
  jkmount directives ?  (I'm actually asking a question, since I
don't
  know).  ;)

 No. Jk can't rewrite the request. But mod_rewrite can.

 In fact - based on the problem below - using mod_rewrite would
probably
be
 the easiest.

Aha, you have figured out what I am trying to do then, and now this
email will get a bit more complex...

I'm using Apache2 and mod_jk to connect to Tomcat. The reason I need
the
webapp deployed at two different URL's in Tomcat is that I need two
different Location blocks in Apache to deal with two different ways
of
authenticating users.

Like you said though, I haven't found a way to do this using mod_jk,
which would be the best and simplest way to do it otherwise.

So, I looked into mod_rewrite, and successfully managed to set it up so
that I can reach the webapp from two different URL's, and mod_rewite
then forwards to the same JkMount. However, the mod_rewrite directives
are evaluated very early in the connection process, before any
Location blocks are considered. This means that by the time Apache
starts thinking about which Location block to use, the URL has
already
been rewritten, and so the same block is considered no matter which
initial URL was used by the user, effectively bypassing the extra
Location I wanted them to go through.

So I gave up on the mod_rewrite, and started considering if I could
deploy the same context at two different URL's in Tomcat instead, but
if
anybody has a better idea which might work please speak up!

Regards,
--
Mats Henrikson
Unix Systems Programmer
Systems Development  Support
Oxford University Computing Services


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: having webapp reachable at two URLs

2004-05-12 Thread Mats Henrikson
Yoav,

 Have you considered tomcat's balancer webapp?  

Hmmm, no, I am still using Tomcat4 so I didn't actually know it existed,
the docs make it look interesting though. 

 It does the same stuff as
 I mentioned before with the filter, only the code is there for you, you
 just need to configure it.

Which sounds like altogether a much better idea. 

I will check it out, thanks for the tip!

Mats


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: having webapp reachable at two URLs

2004-05-12 Thread Mats Henrikson
Yoav,

  Have you considered tomcat's balancer webapp?  

Right, from what I can tell from the docs it seems that the Tomcat
balancer webapp cheats, and actually send a redirect back to the client.
Unfortunately that wont do what I need it to do, as all it can do then
is redirect the client back to the single URL where the app is deployed,
and they would get the wrong Location block from the apache config. 

Thanks for the idea though!

Mats


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: having webapp reachable at two URLs

2004-05-11 Thread Mats Henrikson
Right, I managed to find some more info on this pointing me in the
direction of setting up two different contexts in server.xml, with the
same docBase but different path. However, as doing this would also
double the database connections etc, is there a way of doing this with
just a single context at two URLs?

Mats

On Tue, 2004-05-11 at 17:00, Mats Henrikson wrote:
 Hi,
 
 I want to make a certain Tomcat webapp available at two different URLs,
 but still be coming from the same source. I seem to remember having seen
 documentation on how to do this, but I can't find it now. I am using
 Tomcat 4.1.30.
 
 Say I have the following being served by a Tomcat instance:
 
 http://my.server.com/special-webapp/
 
 but I also want the special-webapp to be reachable from:
 
 http://my.server.com/different-url-webapp/
 
 but I don't want to have to deploy the files at two different places in
 the $CATALINA_HOME/webapps/ directory. 
 
 Could anybody point me in the right direction please?
 
 Mats
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: having webapp reachable at two URLs

2004-05-11 Thread Shapira, Yoav

Hi,
You can have a simple redirect filter mapped to /* in one context that
just redirects to the other.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Mats Henrikson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 11, 2004 12:16 PM
To: Tomcat Users List
Subject: Re: having webapp reachable at two URLs

Right, I managed to find some more info on this pointing me in the
direction of setting up two different contexts in server.xml, with the
same docBase but different path. However, as doing this would also
double the database connections etc, is there a way of doing this with
just a single context at two URLs?

Mats

On Tue, 2004-05-11 at 17:00, Mats Henrikson wrote:
 Hi,

 I want to make a certain Tomcat webapp available at two different
URLs,
 but still be coming from the same source. I seem to remember having
seen
 documentation on how to do this, but I can't find it now. I am using
 Tomcat 4.1.30.

 Say I have the following being served by a Tomcat instance:

 http://my.server.com/special-webapp/

 but I also want the special-webapp to be reachable from:

 http://my.server.com/different-url-webapp/

 but I don't want to have to deploy the files at two different places
in
 the $CATALINA_HOME/webapps/ directory.

 Could anybody point me in the right direction please?

 Mats



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: having webapp reachable at two URLs

2004-05-11 Thread Mats Henrikson
Yoav,

 You can have a simple redirect filter mapped to /* in one context that
 just redirects to the other.

This sounds like a good way to do it, but I can't seem to find any docs
on how to do redirects from inside a context definition. Am I missing
something obvious here?

Mats


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: having webapp reachable at two URLs

2004-05-11 Thread Shapira, Yoav

Howdy,

 You can have a simple redirect filter mapped to /* in one context
that
 just redirects to the other.

This sounds like a good way to do it, but I can't seem to find any docs
on how to do redirects from inside a context definition. Am I missing
something obvious here?

Yeah: my solution isn't just configuration.  It involves code and
deploying a small but real web application on one context (just the
filter) and your other (real) webapp on the other context.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: having webapp reachable at two URLs

2004-05-11 Thread Mike Curwen
If you use Apache in front with jk, could you supply two different
jkmount directives ?  (I'm actually asking a question, since I don't
know).  ;)
 


 -Original Message-
 From: Mats Henrikson [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 11, 2004 11:00 AM
 To: Tomcat User
 Subject: having webapp reachable at two URLs
 
 
 Hi,
 
 I want to make a certain Tomcat webapp available at two 
 different URLs, but still be coming from the same source. I 
 seem to remember having seen documentation on how to do this, 
 but I can't find it now. I am using Tomcat 4.1.30.
 
 Say I have the following being served by a Tomcat instance:
 
http://my.server.com/special-webapp/

but I also want the special-webapp to be reachable from:

http://my.server.com/different-url-webapp/

but I don't want to have to deploy the files at two different places in
the $CATALINA_HOME/webapps/ directory. 

Could anybody point me in the right direction please?

Mats



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: having webapp reachable at two URLs

2004-05-11 Thread Tim Funk
No. Jk can't rewrite the request. But mod_rewrite can.

In fact - based on the problem below - using mod_rewrite would probably be 
the easiest.

-Tim

Mike Curwen wrote:

If you use Apache in front with jk, could you supply two different
jkmount directives ?  (I'm actually asking a question, since I don't
know).  ;)
 



-Original Message-
From: Mats Henrikson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 11, 2004 11:00 AM
To: Tomcat User
Subject: having webapp reachable at two URLs

Hi,

I want to make a certain Tomcat webapp available at two 
different URLs, but still be coming from the same source. I 
seem to remember having seen documentation on how to do this, 
but I can't find it now. I am using Tomcat 4.1.30.

Say I have the following being served by a Tomcat instance:

http://my.server.com/special-webapp/

but I also want the special-webapp to be reachable from:

http://my.server.com/different-url-webapp/

but I don't want to have to deploy the files at two different places in
the $CATALINA_HOME/webapps/ directory. 

Could anybody point me in the right direction please?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]