You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Libor Arndt <li...@gswdev.cz> on 2007/01/19 12:53:36 UTC

Is there a way to get access to request object without servlet?

I need to have access to request in a JAAS logim module.
Is there something similar in Tomcat like in JBosss:

PolicyContext.getContext(key)?

thanks a lot for any advice

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


Re: Is there a way to get access to request object without servlet?

Posted by Reinhard Moosauer <re...@mib1.de>.
Hi,

JBoss implements this with ThreadLocal-Variables.
Tomcat does not use them like JBoss, but you can quite easily do it by 
yourself.
see java.lang.ThreadLocal

There may be pitfalls, mainly caused by the very limited lifetime of a request 
object. But for a loginModule this could be appropriate.

hope this helps

R.

Am Freitag, 19. Januar 2007 12:53 schrieb Libor Arndt:
> I need to have access to request in a JAAS logim module.
> Is there something similar in Tomcat like in JBosss:
>
> PolicyContext.getContext(key)?
>
> thanks a lot for any advice
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
-- 
Reinhard Moosauer
IT Beratung

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


Re: Is there a way to get access to request object without servlet?

Posted by Pid <p...@pidster.com>.
Caldarale, Charles R wrote:
>> From: Libor Arndt [mailto:libor.arndt@gswdev.cz] 
>> Subject: Is there a way to get access to request object 
>> without servlet?
>>
>> I need to have access to request in a JAAS logim module.
>> Is there something similar in Tomcat like in JBosss:

If you're trying to implement JAAS, one would assume you've read:

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

?


> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 


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


RE: Is there a way to get access to request object without servlet?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Libor Arndt [mailto:libor.arndt@gswdev.cz] 
> Subject: Is there a way to get access to request object 
> without servlet?
> 
> I need to have access to request in a JAAS logim module.
> Is there something similar in Tomcat like in JBosss:

You should be able to configure a filter or valve to process each
request.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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