> From: Frank Burns [mailto:francisbu...@gmail.com] > Subject: Web app using JDBCRealm runs on Tomcat 5.5.20 but will not run > on Tomcat 6.0.26 ... > > the context that I use in the server.xml of each Tomcat
Let's get the <Context> element straightened out first. You should not be placing <Context> elements in server.xml; although it works (if you're careful), it is extremely poor practice. The <Context> element should be in the app's META-INF/context.xml file, without any docBase or path attributes. If you don't want to keep the <Context> element with the webapp, place the webapp outside of Tomcat's directory structure, and put the <Context> element in conf/Catalina/[hostName]/[appName].xml, with a docBase attribute pointing to the app's location, but without a path attribute. > Here it is for Tomcat 6.0.26. > > <Context path="/sfpfulladmin" > docBase="C:\SoftwareDevelopment\apache-tomcat-6.0.26\webapps\sfpfulladmin" Move the <Context> element and get rid of the path and docBase, as noted above. > debug="0"> The debug attribute hasn't been used for years. > <Realm > className="org.apache.catalina.realm.JDBCRealm" > driverName="com.mysql.jdbc.Driver" > connectionURL="jdbc:mysql://127.0.0.1:3306/ppadminsite" > connectionName="frank" > connectionPassword="burns" > userTable="SFP_USER" > userNameCol="USERNAME" > userCredCol="PASSWORD" > userRoleTable="USER_ROLE_ASSOCIATION" > roleNameCol="PARENT_ROLE_NAME" /> The JDBCRealm is a poor choice due to inherent design issues (e.g., single-thread, no DB connection pooling). Much better to use a DataSourceRealm: http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#DataSourceRealm Where is the MySQL JDBC driver jar located? It should be in Tomcat's lib directory (and nowhere else) if using a DataSourceRealm; for a JDBCRealm, the jar can be in either Tomcat's lib directory or the app's WEB-INF/lib directory, but not both. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org