You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ALEXANDROS KOTSIRAS <AL...@prodigy.net> on 2000/10/13 04:01:51 UTC

Can i use JDBC realm to protect .ram files ? ?

Hi want to protect Real Player meta files with Tomcat's JDBC Realm. 
Is it possible  ? ?
By default it only protects .jsp and servlets. 
I want Tomcat to pop-up the login box when the user sends a request to http://host/context/media/metafile.ram 

I know it can be done via the Apache password protection mechanism but  i am only interested in Database authentication because i want to let the user register via HTML form and select a username/passowrd by himself. 
Tomcat's implementation with Users/Roles tables  fits very nice but it only protects JSP and servets.
Any ideas ? ?
Thanks,
Alex

Re: Can i use JDBC realm to protect .ram files ? ?

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
ALEXANDROS KOTSIRAS wrote:

> Hi want to protect Real Player meta files with Tomcat's JDBC Realm.Is
> it possible  ? ?By default it only protects .jsp and servlets.I want
> Tomcat to pop-up the login box when the user sends a request to
> http://host/context/media/metafile.ram I know it can be done via the
> Apache password protection mechanism but  i am only interested in
> Database authentication because i want to let the user register via
> HTML form and select a username/passowrd by himself.Tomcat's
> implementation with Users/Roles tables fits very nice but it only
> protects JSP and servets.Any ideas ? ?Thanks,Alex

Tomcat enforces the rules you define in your <security-constraint>
elements.  In particular, you can define a <url-pattern> to which a
particular constraint applies.  You've got a couple of choices -- define
a pattern "/media/*" to protect all files in the /media subdirectory (no
matter what type they are), or define a pattern "*.ram" to protect all
RealAudio files (no matter what directory they are in).

Craig McClanahan

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat