You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Shaw <MS...@centricasoftware.com> on 2002/07/11 23:16:24 UTC

server.xml, Realms, and WARs

I don't think my problem has a solution, but let me ask anyway:

I have a web-app that I deploy as a WAR, and this web-app uses its own Realm
implementation.  In my "server.xml" I specify the host's realm to use my
realm so that my web-app can be dynamically deployed (I don't define a
context entry in server.xml for it).  The problem is if I want to deploy
other web-apps in this host, they too must use the custom Realm.  Is there
anyway to use a custom Realm without explicitly defining it in the
server.xml?  Is there a way to defined my web-app context in my server.xml
and still be able to dynamically deploy it (via a WAR)?

One other question: is there a way to specify classpath parameters for a
dynamically deployed web-app to reference classes that aren't in the sever,
common, web-app libraries?

Thanks for any help with any these questions, I appreciated it.
-Mark

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: server.xml, Realms, and WARs

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 11 Jul 2002, Mark Shaw wrote:

> Date: Thu, 11 Jul 2002 14:16:24 -0700
> From: Mark Shaw <MS...@centricasoftware.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: 'Tomcat Users List' <to...@jakarta.apache.org>
> Subject: server.xml, Realms, and WARs
>
> I don't think my problem has a solution, but let me ask anyway:
>
> I have a web-app that I deploy as a WAR, and this web-app uses its own Realm
> implementation.  In my "server.xml" I specify the host's realm to use my
> realm so that my web-app can be dynamically deployed (I don't define a
> context entry in server.xml for it).  The problem is if I want to deploy
> other web-apps in this host, they too must use the custom Realm.  Is there
> anyway to use a custom Realm without explicitly defining it in the
> server.xml?  Is there a way to defined my web-app context in my server.xml
> and still be able to dynamically deploy it (via a WAR)?
>

In Tomcat 4.1.x you can do this, because it supports the ability to define
a "context configuration file" that contains just the <Context> element
(and it's nested content), which can be dynamically deployed along with
your WAR.  You could nest your custom <Realm> element inside this
<Context> element, and it would only apply to this webapp.  See the docs
on the manager webapp for more info.

Tomcat 4.0.x doesn't have any way to do this.

> One other question: is there a way to specify classpath parameters for a
> dynamically deployed web-app to reference classes that aren't in the sever,
> common, web-app libraries?
>

Not without modifying Tomcat sources.

> Thanks for any help with any these questions, I appreciated it.
> -Mark
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>