Re: Retrieving tomcat realm from org.apache.catalina.Server object
in the ${CATALINA_HOME}/webapps/myapp/META-INF/context.xml i've also tried ${CATALINA_HOME}/conf/Catalina/localhost/myapp.xml these places seem to be where tomcat 5.5 expects to find the element. i had it in the server.xml at one point, but tomcat 5.5 doesnt recommend that. > where you set your web context parameter? > > On 10/14/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> Nope, nothing in the logs. >> But I have a feeling its something to do with permissions. >> I've given privilged access to the webapp, cant think of anything else. >> Another weird thing is, whether I set the context's privileged="true" or >> "false" it behaves the same way >> >> I am using Tomcat 5.5 , has anything changed since earlier versions in >> this regard? >> >> >> >> > Is there any error info in log files? Would it be permission problem? >> ... >> > make sure all needed tomcat libs are readable by your webapp ... >> > >> > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> >> >> yes, it does look ok except for the findServices(). >> >> In fact, as I mentioned earlier i tried calling >> >> server.getGlobalNamingResources(), getPort(), getInfo() on the server >> >> and they all seem to return the right stuff. >> >> Its just the services. >> >> >> >> I've set privileged="true" on my webapp context. >> >> >> >> Can't figure out if I missed anything else. >> >> >> >> >> >> > is the server instance ok? >> >> > >> >> > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> I've tried that too. >> >> >> findServices() returns an array of length 0. >> >> >> >> >> >> >> >> >> >> >> >> > I dont see any problem, >> >> >> >>In fact, server.findServices() always returns an empty array of >> >> >> services. >> >> >> >>But my server.xml does define a Catalina service. >> >> >> > try to use findServices() and get first service of the service >> array >> >> and >> >> >> see >> >> >> > if still null ... >> >> >> > >> >> >> > >> >> >> > >> >> >> > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> >> wrote: >> >> >> >> >> >> >> >> Hello, >> >> >> >> >> >> >> >> I would like to retrieve the tomcat realm object from the Server >> >> >> object. >> >> >> >> Below is the code snippet I use ... >> >> >> >> >> >> >> >> __ >> >> >> >> >> >> >> >> Server server = ServerFactory.getServer(); >> >> >> >> Service service = server.findService("Catalina"); >> >> >> >> Engine engine = (Engine) service.getContainer(); >> >> >> >> //engine.getRealm(); >> >> >> >> >> >> >> >> Host host = (Host) engine.findChild(engine.getDefaultHost()); >> >> >> >> Context context = (Context) host.findChild("enetaware"); >> >> >> >> Realm realm = context.getRealm(); >> >> >> >> ___ >> >> >> >> >> >> >> >> But at line 2 here server.findService returns a null. >> >> >> >> In fact, server.findServices() always returns an empty array of >> >> >> services. >> >> >> >> But my server.xml does define a Catalina service. >> >> >> >> >> >> >> >> Other methods like server.getGlobalNamingResources() do return >> some >> >> >> info >> >> >> >> but not >> >> >> >> findService(). >> >> >> >> >> >> >> >> I gave privileged access to my webapp as well. >> >> >> >> >> >> >> >> Can someone shed some light on this behavior? >> >> >> >> >> >> >> >> Thanks! >> >> >> >> Sathija. >> >> >> >> >> >> >> >> >> >> >> >> >> >> - >> >> >> >> To start a new topic, e-mail: users@tomcat.apache.org >> >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > When we invent time, we invent death. >> >> >> > >> >> >> >> >> >> >> >> >> >> >> >> >> - >> >> >> To start a new topic, e-mail: users@tomcat.apache.org >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > When we invent time, we invent death. >> >> > >> >> >> >> >> >> >> >> - >> >> To start a new topic, e-mail: users@tomcat.apache.org >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > -- >> > When we invent time, we invent death. >> > >> >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > When we invent time, we invent death. > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieving tomcat realm from org.apache.catalina.Server object
where you set your web context parameter? On 10/14/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: Nope, nothing in the logs. But I have a feeling its something to do with permissions. I've given privilged access to the webapp, cant think of anything else. Another weird thing is, whether I set the context's privileged="true" or "false" it behaves the same way I am using Tomcat 5.5 , has anything changed since earlier versions in this regard? > Is there any error info in log files? Would it be permission problem? ... > make sure all needed tomcat libs are readable by your webapp ... > > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> yes, it does look ok except for the findServices(). >> In fact, as I mentioned earlier i tried calling >> server.getGlobalNamingResources(), getPort(), getInfo() on the server >> and they all seem to return the right stuff. >> Its just the services. >> >> I've set privileged="true" on my webapp context. >> >> Can't figure out if I missed anything else. >> >> >> > is the server instance ok? >> > >> > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> >> >> I've tried that too. >> >> findServices() returns an array of length 0. >> >> >> >> >> >> >> >> > I dont see any problem, >> >> >>In fact, server.findServices() always returns an empty array of >> >> services. >> >> >>But my server.xml does define a Catalina service. >> >> > try to use findServices() and get first service of the service array >> and >> >> see >> >> > if still null ... >> >> > >> >> > >> >> > >> >> > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> Hello, >> >> >> >> >> >> I would like to retrieve the tomcat realm object from the Server >> >> object. >> >> >> Below is the code snippet I use ... >> >> >> >> >> >> __ >> >> >> >> >> >> Server server = ServerFactory.getServer(); >> >> >> Service service = server.findService("Catalina"); >> >> >> Engine engine = (Engine) service.getContainer(); >> >> >> //engine.getRealm(); >> >> >> >> >> >> Host host = (Host) engine.findChild(engine.getDefaultHost()); >> >> >> Context context = (Context) host.findChild("enetaware"); >> >> >> Realm realm = context.getRealm(); >> >> >> ___ >> >> >> >> >> >> But at line 2 here server.findService returns a null. >> >> >> In fact, server.findServices() always returns an empty array of >> >> services. >> >> >> But my server.xml does define a Catalina service. >> >> >> >> >> >> Other methods like server.getGlobalNamingResources() do return some >> >> info >> >> >> but not >> >> >> findService(). >> >> >> >> >> >> I gave privileged access to my webapp as well. >> >> >> >> >> >> Can someone shed some light on this behavior? >> >> >> >> >> >> Thanks! >> >> >> Sathija. >> >> >> >> >> >> >> >> >> >> - >> >> >> To start a new topic, e-mail: users@tomcat.apache.org >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > When we invent time, we invent death. >> >> > >> >> >> >> >> >> >> >> - >> >> To start a new topic, e-mail: users@tomcat.apache.org >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > -- >> > When we invent time, we invent death. >> > >> >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > When we invent time, we invent death. > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- When we invent time, we invent death.
Re: Retrieving tomcat realm from org.apache.catalina.Server object
Nope, nothing in the logs. But I have a feeling its something to do with permissions. I've given privilged access to the webapp, cant think of anything else. Another weird thing is, whether I set the context's privileged="true" or "false" it behaves the same way I am using Tomcat 5.5 , has anything changed since earlier versions in this regard? > Is there any error info in log files? Would it be permission problem? ... > make sure all needed tomcat libs are readable by your webapp ... > > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> yes, it does look ok except for the findServices(). >> In fact, as I mentioned earlier i tried calling >> server.getGlobalNamingResources(), getPort(), getInfo() on the server >> and they all seem to return the right stuff. >> Its just the services. >> >> I've set privileged="true" on my webapp context. >> >> Can't figure out if I missed anything else. >> >> >> > is the server instance ok? >> > >> > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> >> >> I've tried that too. >> >> findServices() returns an array of length 0. >> >> >> >> >> >> >> >> > I dont see any problem, >> >> >>In fact, server.findServices() always returns an empty array of >> >> services. >> >> >>But my server.xml does define a Catalina service. >> >> > try to use findServices() and get first service of the service array >> and >> >> see >> >> > if still null ... >> >> > >> >> > >> >> > >> >> > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> Hello, >> >> >> >> >> >> I would like to retrieve the tomcat realm object from the Server >> >> object. >> >> >> Below is the code snippet I use ... >> >> >> >> >> >> __ >> >> >> >> >> >> Server server = ServerFactory.getServer(); >> >> >> Service service = server.findService("Catalina"); >> >> >> Engine engine = (Engine) service.getContainer(); >> >> >> //engine.getRealm(); >> >> >> >> >> >> Host host = (Host) engine.findChild(engine.getDefaultHost()); >> >> >> Context context = (Context) host.findChild("enetaware"); >> >> >> Realm realm = context.getRealm(); >> >> >> ___ >> >> >> >> >> >> But at line 2 here server.findService returns a null. >> >> >> In fact, server.findServices() always returns an empty array of >> >> services. >> >> >> But my server.xml does define a Catalina service. >> >> >> >> >> >> Other methods like server.getGlobalNamingResources() do return some >> >> info >> >> >> but not >> >> >> findService(). >> >> >> >> >> >> I gave privileged access to my webapp as well. >> >> >> >> >> >> Can someone shed some light on this behavior? >> >> >> >> >> >> Thanks! >> >> >> Sathija. >> >> >> >> >> >> >> >> >> >> - >> >> >> To start a new topic, e-mail: users@tomcat.apache.org >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > When we invent time, we invent death. >> >> > >> >> >> >> >> >> >> >> - >> >> To start a new topic, e-mail: users@tomcat.apache.org >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > -- >> > When we invent time, we invent death. >> > >> >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > When we invent time, we invent death. > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieving tomcat realm from org.apache.catalina.Server object
Is there any error info in log files? Would it be permission problem? ... make sure all needed tomcat libs are readable by your webapp ... On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: yes, it does look ok except for the findServices(). In fact, as I mentioned earlier i tried calling server.getGlobalNamingResources(), getPort(), getInfo() on the server and they all seem to return the right stuff. Its just the services. I've set privileged="true" on my webapp context. Can't figure out if I missed anything else. > is the server instance ok? > > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> I've tried that too. >> findServices() returns an array of length 0. >> >> >> >> > I dont see any problem, >> >>In fact, server.findServices() always returns an empty array of >> services. >> >>But my server.xml does define a Catalina service. >> > try to use findServices() and get first service of the service array and >> see >> > if still null ... >> > >> > >> > >> > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> >> >> Hello, >> >> >> >> I would like to retrieve the tomcat realm object from the Server >> object. >> >> Below is the code snippet I use ... >> >> >> >> __ >> >> >> >> Server server = ServerFactory.getServer(); >> >> Service service = server.findService("Catalina"); >> >> Engine engine = (Engine) service.getContainer(); >> >> //engine.getRealm(); >> >> >> >> Host host = (Host) engine.findChild(engine.getDefaultHost()); >> >> Context context = (Context) host.findChild("enetaware"); >> >> Realm realm = context.getRealm(); >> >> ___ >> >> >> >> But at line 2 here server.findService returns a null. >> >> In fact, server.findServices() always returns an empty array of >> services. >> >> But my server.xml does define a Catalina service. >> >> >> >> Other methods like server.getGlobalNamingResources() do return some >> info >> >> but not >> >> findService(). >> >> >> >> I gave privileged access to my webapp as well. >> >> >> >> Can someone shed some light on this behavior? >> >> >> >> Thanks! >> >> Sathija. >> >> >> >> >> >> - >> >> To start a new topic, e-mail: users@tomcat.apache.org >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > -- >> > When we invent time, we invent death. >> > >> >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > When we invent time, we invent death. > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- When we invent time, we invent death.
Re: Retrieving tomcat realm from org.apache.catalina.Server object
yes, it does look ok except for the findServices(). In fact, as I mentioned earlier i tried calling server.getGlobalNamingResources(), getPort(), getInfo() on the server and they all seem to return the right stuff. Its just the services. I've set privileged="true" on my webapp context. Can't figure out if I missed anything else. > is the server instance ok? > > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> I've tried that too. >> findServices() returns an array of length 0. >> >> >> >> > I dont see any problem, >> >>In fact, server.findServices() always returns an empty array of >> services. >> >>But my server.xml does define a Catalina service. >> > try to use findServices() and get first service of the service array and >> see >> > if still null ... >> > >> > >> > >> > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> >> >> Hello, >> >> >> >> I would like to retrieve the tomcat realm object from the Server >> object. >> >> Below is the code snippet I use ... >> >> >> >> __ >> >> >> >> Server server = ServerFactory.getServer(); >> >> Service service = server.findService("Catalina"); >> >> Engine engine = (Engine) service.getContainer(); >> >> //engine.getRealm(); >> >> >> >> Host host = (Host) engine.findChild(engine.getDefaultHost()); >> >> Context context = (Context) host.findChild("enetaware"); >> >> Realm realm = context.getRealm(); >> >> ___ >> >> >> >> But at line 2 here server.findService returns a null. >> >> In fact, server.findServices() always returns an empty array of >> services. >> >> But my server.xml does define a Catalina service. >> >> >> >> Other methods like server.getGlobalNamingResources() do return some >> info >> >> but not >> >> findService(). >> >> >> >> I gave privileged access to my webapp as well. >> >> >> >> Can someone shed some light on this behavior? >> >> >> >> Thanks! >> >> Sathija. >> >> >> >> >> >> - >> >> To start a new topic, e-mail: users@tomcat.apache.org >> >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > >> > >> > -- >> > When we invent time, we invent death. >> > >> >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > When we invent time, we invent death. > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieving tomcat realm from org.apache.catalina.Server object
is the server instance ok? On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: I've tried that too. findServices() returns an array of length 0. > I dont see any problem, >>In fact, server.findServices() always returns an empty array of services. >>But my server.xml does define a Catalina service. > try to use findServices() and get first service of the service array and see > if still null ... > > > > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> Hello, >> >> I would like to retrieve the tomcat realm object from the Server object. >> Below is the code snippet I use ... >> >> __ >> >> Server server = ServerFactory.getServer(); >> Service service = server.findService("Catalina"); >> Engine engine = (Engine) service.getContainer(); >> //engine.getRealm(); >> >> Host host = (Host) engine.findChild(engine.getDefaultHost()); >> Context context = (Context) host.findChild("enetaware"); >> Realm realm = context.getRealm(); >> ___ >> >> But at line 2 here server.findService returns a null. >> In fact, server.findServices() always returns an empty array of services. >> But my server.xml does define a Catalina service. >> >> Other methods like server.getGlobalNamingResources() do return some info >> but not >> findService(). >> >> I gave privileged access to my webapp as well. >> >> Can someone shed some light on this behavior? >> >> Thanks! >> Sathija. >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > When we invent time, we invent death. > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- When we invent time, we invent death.
Re: Retrieving tomcat realm from org.apache.catalina.Server object
I've tried that too. findServices() returns an array of length 0. > I dont see any problem, >>In fact, server.findServices() always returns an empty array of services. >>But my server.xml does define a Catalina service. > try to use findServices() and get first service of the service array and see > if still null ... > > > > On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: >> >> Hello, >> >> I would like to retrieve the tomcat realm object from the Server object. >> Below is the code snippet I use ... >> >> __ >> >> Server server = ServerFactory.getServer(); >> Service service = server.findService("Catalina"); >> Engine engine = (Engine) service.getContainer(); >> //engine.getRealm(); >> >> Host host = (Host) engine.findChild(engine.getDefaultHost()); >> Context context = (Context) host.findChild("enetaware"); >> Realm realm = context.getRealm(); >> ___ >> >> But at line 2 here server.findService returns a null. >> In fact, server.findServices() always returns an empty array of services. >> But my server.xml does define a Catalina service. >> >> Other methods like server.getGlobalNamingResources() do return some info >> but not >> findService(). >> >> I gave privileged access to my webapp as well. >> >> Can someone shed some light on this behavior? >> >> Thanks! >> Sathija. >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > When we invent time, we invent death. > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieving tomcat realm from org.apache.catalina.Server object
I dont see any problem, In fact, server.findServices() always returns an empty array of services. But my server.xml does define a Catalina service. try to use findServices() and get first service of the service array and see if still null ... On 10/13/06, Sathija Pavuluri <[EMAIL PROTECTED]> wrote: Hello, I would like to retrieve the tomcat realm object from the Server object. Below is the code snippet I use ... __ Server server = ServerFactory.getServer(); Service service = server.findService("Catalina"); Engine engine = (Engine) service.getContainer(); //engine.getRealm(); Host host = (Host) engine.findChild(engine.getDefaultHost()); Context context = (Context) host.findChild("enetaware"); Realm realm = context.getRealm(); ___ But at line 2 here server.findService returns a null. In fact, server.findServices() always returns an empty array of services. But my server.xml does define a Catalina service. Other methods like server.getGlobalNamingResources() do return some info but not findService(). I gave privileged access to my webapp as well. Can someone shed some light on this behavior? Thanks! Sathija. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- When we invent time, we invent death.
Retrieving tomcat realm from org.apache.catalina.Server object
Hello, I would like to retrieve the tomcat realm object from the Server object. Below is the code snippet I use ... __ Server server = ServerFactory.getServer(); Service service = server.findService("Catalina"); Engine engine = (Engine) service.getContainer(); //engine.getRealm(); Host host = (Host) engine.findChild(engine.getDefaultHost()); Context context = (Context) host.findChild("enetaware"); Realm realm = context.getRealm(); ___ But at line 2 here server.findService returns a null. In fact, server.findServices() always returns an empty array of services. But my server.xml does define a Catalina service. Other methods like server.getGlobalNamingResources() do return some info but not findService(). I gave privileged access to my webapp as well. Can someone shed some light on this behavior? Thanks! Sathija. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]