You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ben <ne...@gmail.com> on 2004/10/27 04:43:15 UTC

Realm context in ActionForm

Hi

How do I obtain the Realm context or get the current realm in an
ActionForm? I would like to sign in the users after they have signed
up using my RegistrationActionForm.

Thanks,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Realm context in ActionForm

Posted by Arnaud Vandyck <ar...@ulg.ac.be>.
> On Wed, 27 Oct 2004 12:43:15 +1000, Ben <ne...@gmail.com> wrote:
>
>> How do I obtain the Realm context or get the current realm in an
>> ActionForm? I would like to sign in the users after they have signed
>> up using my RegistrationActionForm.

Tue, 26 Oct 2004 20:49:16 -0700, 
Craig McClanahan <cr...@gmail.com> wrote: 

> I presume you're talking about Tomcat and it's Realm implementation
> for container managed security?
>
> You cannot access it directly (although it wouldn't help you much if
> you could, because it has no APIs for user management) -- it is loaded
> by a class loader visible only to the servlet container.  What you can
> do, however, is establish your own DAO that talks to the same database
> that Tomcat is talking to ... that way, a new user that you add
> through your admin function is immediately available for Tomcat to use
> for authentication.

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#DataSourceRealm

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html#DataSourceRealm

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html#DataSourceRealm

-- 
Arnaud Vandyck
http://fosdem.org/
Free and Open Source Developers' European Meeting
February 26-27 2005,
Bruxelles, Belgium

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Realm context in ActionForm

Posted by Craig McClanahan <cr...@gmail.com>.
I presume you're talking about Tomcat and it's Realm implementation
for container managed security?

You cannot access it directly (although it wouldn't help you much if
you could, because it has no APIs for user management) -- it is loaded
by a class loader visible only to the servlet container.  What you can
do, however, is establish your own DAO that talks to the same database
that Tomcat is talking to ... that way, a new user that you add
through your admin function is immediately available for Tomcat to use
for authentication.

Craig


On Wed, 27 Oct 2004 12:43:15 +1000, Ben <ne...@gmail.com> wrote:
> Hi
> 
> How do I obtain the Realm context or get the current realm in an
> ActionForm? I would like to sign in the users after they have signed
> up using my RegistrationActionForm.
> 
> Thanks,
> Ben
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org