On 1/10/11 5:33 PM, Christopher Gross wrote:
> The Realm class is "read only" (according to the API). There isn't a w=
ay
> for me to set the path to the tomcat-users.xml file (or anything else f=
or
> that matter).
>=20
> I'm not seeing a function in the Engine/Embedded/Context object to have=
it
> load the tomcat-users.xml file either (though the context does let me a=
dd a
> security role, though it doesn't seem to really do anything at this poi=
nt).
>=20
> I'm attempting to go through the actual Tomcat code to see if I can loo=
k at
> the code that it uses to get everything started up so that I can build =
from
> that. I'm out of other ideas and things to try.
>=20
> -- Chris
>=20
>=20
> On Mon, Jan 10, 2011 at 12:22 PM, Pid <pid@pidster.com> wrote:
>=20
>> On 1/10/11 2:28 PM, Christopher Gross wrote:
>>> It is specified there -- but I don't have a server.xml file set up.
>> Since
>>> I'm using the embedded version, I set up the tomcat on the fly and ju=
st
>> have
>>> the java code start it.
>>
>> What's stopping you from programmatically creating the Realm and addin=
g
>> it to the Host?
Can you not create a org.apache.catalina.realms.MemoryRealm and set the
path to the xml file?
p
>> p
>>
>>
>>> I looked at the server.xml file that comes with the standard tomcat
>>> installation, and I see the the UserDatabaseRealm portion. Can I put=
>> that
>>> into the web.xml file? Or is there a way for me to enter that into t=
he
>>> embedded module?
>>>
>>> I'm not sure on what to do here. Right now it "works", but I'm tryin=
g to
>>> get it so that I can have 2 different users and have them see 2 diffe=
rent
>>> web apps. I don't often do sys admin/configuration stuff, I'd rather=
be
>>> coding (but I'm waiting for other people to finish up their portions,=
so
>> I'm
>>> adding in other niceties that I can get done before I can move on to =
the
>>> next big part.)
>>
>>
>=20
|