tomcat-5 jndi
Hi, I´ve been reading examples and the mailing list, but I can´t configure correctly Tomcat 5.0.28 with Oracle 9, I´m a bit desperate. I think I´ve tried everything. this is what I got: in my Tomcat 5.0\common\lib folder I´ve got ojdbc14.jar --- Tomcat 5.0\conf\server.xml: --- ?xml version='1.0' encoding='utf-8'? Server Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase type=org.apache.catalina.UserDatabase/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true port=8080 redirectPort=8443 maxSpareThreads=75 maxThreads=150 minSpareThreads=25 /Connector Connector port=8009 protocol=AJP/1.3 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443 /Connector Engine defaultHost=localhost name=Catalina Host appBase=webapps name=localhost Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_log. suffix=.txt timestamp=true/ Resource name=jdbc/bddesa auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/bddesa parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@10.0.100.6:1521:bddesa/value /parameter parameter nameusername/name value*/value /parameter parameter namepassword/name value*/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Host Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm/ /Engine /Service /Server --- Tomcat 5.0\webapps\ROOT\WEB-INF\web.xml --- ?xml version=1.0 encoding=ISO-8859-1? !-- Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description
Tomcat 5/JNDI Realm Port 989
Hello All, I'm a total newbie to this stuff, but I think I have an easy question for everyone... I'm trying to get Tomcat 5 to use Basic Authentication using a JNDI Realm to our corporate LDAP server. Our server allows read access on port 389 and bind access on port 989. Here's the issue. If I set the port to 389 and restart Tomcat, the logs appear to connect ok, and my web.xml configuration must be right because I get prompted for a login/password by the browser. But, it fails because I'm on port 989. Naturally, I change the port to 989, but I can no longer anonymously bind so the context never gets loaded. Here's my realm config: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://my.ldap.server:389; userBase=ou=people,ou=mycompany,o=world userSearch=(ExtShortName=({0}) userRoleName=cn roleSearch=(uniqueMember={0}) / Net, is there anyway to specify a connection port and a bind port? I can't find it anywhere. I know it's not a password/digest/ldap server issue because a wrote a test class with my ID Password set and was able to authenticate without an issue to port 989... Any help would be greatly appreciated! Thanks John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Bug in jndi implementation : Tomcat 5 - jndi problem
Howdy, It's not a bug in the tomcat implementation -- tomcat does not have an external JNDI provider, while most full J2EE servers like the ones you mention do. So you can't connect to tomcat's JNDI contexts from outside the tomcat JVM. Please don't jump to conclusions without asking ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Frank Renaers [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 3:04 AM To: [EMAIL PROTECTED] Subject: Bug in jndi implementation : Tomcat 5 - jndi problem Hi, I assume it's a bug in the Tomcat jndi implementation, because my test is successfull when I use another jndi - implementation (Weblogic, Websphere, ...) Greetings, Frank -Original Message- From:Frank Renaers Sent:woensdag 10 december 2003 11:58 To: [EMAIL PROTECTED] Subject: Tomcat 5 - jndi problem Hi, Is it possible to browse the Tomcat jndi context from within another vm. I wrote a small junit test to test this, but it always fails !! It always throws a javax.naming.NameNotFoundException: Name java:comp is not bound in this Context My jndi.properties contains the following settings : java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory java.naming.provider.url=http://localhost:8080 My conf.xml : !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ /GlobalNamingResources My test : public void testDataSource() throws Exception { // Obtain our environment naming context javax.naming.Context initCtx = new javax.naming.InitialContext(); javax.naming.Context envCtx = (javax.naming.Context) initCtx.lookup(java:comp/env/simpleValue); } } Thanks, Frank Renaers This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 - jndi problem
Hi, Is it possible to browse the Tomcat jndi context from within another vm. I wrote a small junit test to test this, but it always fails !! It always throws a javax.naming.NameNotFoundException: Name java:comp is not bound in this Context My jndi.properties contains the following settings : java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory java.naming.provider.url=http://localhost:8080 My conf.xml : !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ /GlobalNamingResources My test : public void testDataSource() throws Exception { // Obtain our environment naming context javax.naming.Context initCtx = new javax.naming.InitialContext(); javax.naming.Context envCtx = (javax.naming.Context) initCtx.lookup(java:comp/env/simpleValue); } } Thanks, Frank Renaers