RE: How to start a Realm from a servlet or a filter

2004-04-09 Thread Daniel Huang
Realm is not accessible to servlet or filter. In anther word, you can't do what you are trying to do. Let's suppose for a second that your code could work, then I can write a servlet to replace your realm or any realm tomcat is using. And image what could happen if the tomcat manager interface is

RE: How to start a Realm from a servlet or a filter

2004-04-09 Thread Shapira, Yoav
Hi, Realm is not accessible to servlet or filter. In anther word, you can't do what you are trying to do. How authoritative and conclusive. And wrong. Realms and all other tomcat internals are accessible to any code you write. You just have to mark your webapp as privileged and in some

RE: How to start a Realm from a servlet or a filter

2004-04-09 Thread Zsolt Koppany
Hi Yoav, How authoritative and conclusive. And wrong. Realms and all other tomcat internals are accessible to any code you write. You just have to mark your webapp as privileged and in some instances (depending on your code) place portions of your code in the common rather than your

RE: How to start a Realm from a servlet or a filter

2004-04-09 Thread Shapira, Yoav
Hi, And how can I access or start a Realm? What is up with this list? Do people don't know how to read JavaDocs, or do they simply not care? Sigh... Server server = ServerFactory.getServer(); Service service = server.findService(Catalina); Container serviceContainer = service.getContainer();

RE: How to start a Realm from a servlet or a filter

2004-04-09 Thread Zsolt Koppany
Yoav, I have written this code, but srv is always an empty array. I use tomcat-5.0.19 Server server = ServerFactory.getServer(); Service service = server.findService(Catalina); Service[] srv = server.findServices(); for (int i = 0; i srv.length; i++) {