tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Configuring Embedded Tomcat
Date Mon, 10 Jan 2011 18:45:25 GMT
On 10/01/2011 18:43, Christopher Gross wrote:
> I added the security role:
>         MemoryRealm mr = new MemoryRealm();
>         mr.setPathname(path + "/conf/tomcat-users.xml");
>         Context sp = embedded.createContext("/Monitor", path +
> "/webapps/monitor");
>         sp.setRealm(mr);
>         sp.addSecurityRole("admin");
>         host.addChild(sp);
> 
> Is there anything else that I need to do for the Context?

You need to set up some security constraints in web.xml

Mark

> 
> -- Chris
> 
> 
> On Mon, Jan 10, 2011 at 1:37 PM, Mark Thomas <markt@apache.org> wrote:
> 
>> On 10/01/2011 18:16, Christopher Gross wrote:
>>> I created a MemoryRealm object, pointed it to my tomcat-users.xml file,
>>> added that realm to the embedded (no luck) and to the specific context
>> (no
>>> luck either).  For both, it just plain loads the page -- doesn't ask me
>> to
>>> do any type of logging in.
>>>
>>> Are you just using your own experience to help me, or are you aware of
>> any
>>> documentation that I could peruse, instead of lobbing questions at you a
>> few
>>> times a day? :)
>>
>> Have you configured your app to require authentication? IF not the realm
>> will never be used.
>>
>> Mark
>>
>>>
>>> -- Chris
>>>
>>>
>>> On Mon, Jan 10, 2011 at 12:48 PM, Pid <pid@pidster.com> wrote:
>>>
>>>> Can you not create a org.apache.catalina.realms.MemoryRealm and set the
>>>> path to the xml file?
>>>>
>>>>
>>>> p
>>>>
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message