You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Guntupalli Shanti <sg...@cisco.com> on 2001/07/18 05:19:37 UTC
Apache-tomcat context mapping
Hi,
Here is my problem.
In apache's config file I should be able to map 2 different URI's to one
context in my Tomcat.
something like
APJServMount /examples/servlet apjv12://dev:8080/examples
APJServMount /examples1/servlet apjv12://dev:8080/examples
so that any requests coming in with examples/servlet or /examples1/servlet
should go to the same context examples
I can have another context examples1 in my Tomcat whose docbase is also
same as examples. But If I do that the
servlets are getting initialized twice (which doesn't work for me)
Any idea, how to do it?
I am running Apache 1.3.14 (with mod_jserv) talking to tomcat 3.2 on Sun
solaris.
Thanks...Shanti
Re: Apache-tomcat context mapping
Posted by Dmitri Colebatch <di...@bigpond.net.au>.
I'm no apache expert, but from my limited experience with mod_rewrite I'm
pretty sure, almost 100% sure, that the browser knows nothing about
it. For the browser to know about it apache would have to send back
something other than a 200 response (I think). But as is best with all
things - try it and see what happens (o:
cheesr
dim
On Wed, 18 Jul 2001, Guntupalli Shanti wrote:
> Hi Dim
>
> Thanks for the reply.
>
> I have a question on mod_rewrite..if the URL is rewritten then does the
> location box (URL box ) on the browser show the new URL
> or the old one? (Meaning all the relative links in my page point to the old
> URI or the new one?)
>
> Thanks again
> Shanti
>
> At 03:09 PM 7/18/2001 +1000, you wrote:
> >mod_rewrite? I think the problem is that the request will get to tomcat,
> >and tomcat will not have /example1 mapped...
> >
> >cheers
> >dim
> >
> >On Tue, 17 Jul 2001, Guntupalli Shanti wrote:
> >
> > > Hi,
> > >
> > > Here is my problem.
> > >
> > > In apache's config file I should be able to map 2 different URI's to one
> > > context in my Tomcat.
> > > something like
> > >
> > > APJServMount /examples/servlet apjv12://dev:8080/examples
> > > APJServMount /examples1/servlet apjv12://dev:8080/examples
> > >
> > > so that any requests coming in with examples/servlet or /examples1/servlet
> > > should go to the same context examples
> > >
> > > I can have another context examples1 in my Tomcat whose docbase is also
> > > same as examples. But If I do that the
> > > servlets are getting initialized twice (which doesn't work for me)
> > >
> > > Any idea, how to do it?
> > >
> > > I am running Apache 1.3.14 (with mod_jserv) talking to tomcat 3.2 on Sun
> > > solaris.
> > >
> > > Thanks...Shanti
> > >
> > >
>
>
Re: Apache-tomcat context mapping
Posted by Guntupalli Shanti <sg...@cisco.com>.
Hi Dim
Thanks for the reply.
I have a question on mod_rewrite..if the URL is rewritten then does the
location box (URL box ) on the browser show the new URL
or the old one? (Meaning all the relative links in my page point to the old
URI or the new one?)
Thanks again
Shanti
At 03:09 PM 7/18/2001 +1000, you wrote:
>mod_rewrite? I think the problem is that the request will get to tomcat,
>and tomcat will not have /example1 mapped...
>
>cheers
>dim
>
>On Tue, 17 Jul 2001, Guntupalli Shanti wrote:
>
> > Hi,
> >
> > Here is my problem.
> >
> > In apache's config file I should be able to map 2 different URI's to one
> > context in my Tomcat.
> > something like
> >
> > APJServMount /examples/servlet apjv12://dev:8080/examples
> > APJServMount /examples1/servlet apjv12://dev:8080/examples
> >
> > so that any requests coming in with examples/servlet or /examples1/servlet
> > should go to the same context examples
> >
> > I can have another context examples1 in my Tomcat whose docbase is also
> > same as examples. But If I do that the
> > servlets are getting initialized twice (which doesn't work for me)
> >
> > Any idea, how to do it?
> >
> > I am running Apache 1.3.14 (with mod_jserv) talking to tomcat 3.2 on Sun
> > solaris.
> >
> > Thanks...Shanti
> >
> >
Re: Apache-tomcat context mapping
Posted by Dmitri Colebatch <di...@bigpond.net.au>.
mod_rewrite? I think the problem is that the request will get to tomcat,
and tomcat will not have /example1 mapped...
cheers
dim
On Tue, 17 Jul 2001, Guntupalli Shanti wrote:
> Hi,
>
> Here is my problem.
>
> In apache's config file I should be able to map 2 different URI's to one
> context in my Tomcat.
> something like
>
> APJServMount /examples/servlet apjv12://dev:8080/examples
> APJServMount /examples1/servlet apjv12://dev:8080/examples
>
> so that any requests coming in with examples/servlet or /examples1/servlet
> should go to the same context examples
>
> I can have another context examples1 in my Tomcat whose docbase is also
> same as examples. But If I do that the
> servlets are getting initialized twice (which doesn't work for me)
>
> Any idea, how to do it?
>
> I am running Apache 1.3.14 (with mod_jserv) talking to tomcat 3.2 on Sun
> solaris.
>
> Thanks...Shanti
>
>