Yes, you are on the right track, you need a different namespace for each
application if you want independent applications.
There can be only one Domain.xml per classloader but if you use the tomcat
realm (for user integration) then you alway use the tomcat main classloader
and that means one domain.xml per VM.

But we have multiple namespaces to support multiple independent
application.
Just create <namespace name="app1"> in domain.xml and set the namespace
parameter of the servlet (in web.xml) to app1.
    <init-param>
      <param-name>namespace</param-name>
      <param-value>app1</param-value>
      <description>
        Name of the Slide namespace that should be accessed by this
servlet.
        If this parameter is provided, make sure the corresponding
namespace
        is defined in the domain configuration file. Otherwise, the default

        namespace will be used, if one exists.
      </description>
    </init-param>

You also want to define multiple realms in your server.xml in a container
with same name as you slide namespace like:
<context name="app1" .....  >
      <Realm className="wrappers.catalina.SlideRealm"/>
...
</context>

This second item is needed to let tomcat know where to get its user info
(on a context level and not on a global level).

This third item gives a better message to the user. Change the realm-name
in web.xml:
<realm-name>App1 Slide DAV Server</realm-name>

I haven't tried this setup but it should work...


Dirk



Tina Yang wrote:

> Hi Stef,
>
> thanx for the quick reply.  Your suggestions are fine, but
>
> > 2. Using a basic Domain.xml with 3 users for each of your application
> > (e.g. : app1=user1 cannot access ressources for app2=user2)
> >
>
> I have the problem that I cannot use different usernames for the
> different applications, e.g. there's a user 'admin' in each app but the
> admin for app1 may not access files in app2 and vice versa.
>
> I think that it would be best if the WebDavServlet could be configured
> (eg. with slide.properties) to use a specific namespace.
>
> More comments appreciated,
>
> Tina.

Reply via email to