-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Erik,
Erik Rumppe wrote: > I get the login screen correctly but then everytime I try to log in I > get the Error page. Do you get the login error page ("login failed"), or do you get a Tomcat error page with a stack trace, etc.? > HELP!!!! Here is my server.xml file: > > <?xml version="1.0" encoding="UTF-8"?> > <Context docBase="/data/_b/TestSite" path="/TestSite"> You server.xml should not start with a <Context> element. Is this context.xml by any chance? It is not legal to use the "docBase" or "path" attributes in <Context> in context.xml, so remove them. This probably isn't your problem, but it will probably become a different problem later. > Resource name="jdbc/lostAndFoundDB" auth="Container" > maxActive="100" maxIdle="30" maxWait="10000" > username="[left blank]" password="[left blank]" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/lostAndFound?autoReconnect=true" > logAbandoned="true" removeAbandoned="true" > removeAbandonedTimeout="60" type="javax.sql.DataSource" /> This element doesn't start with a <. Was that just a copy-paste error? Also, don't use "autoReconnect=true", regardless of the Tomcat guide. That parameter has been deprecated from the Connector/J driver and considered unsuitable for production use. Use validationQuery="SELECT 1" in your <Resource> element instead. > <Realm className="org.apache.catalina.realm.JDBCRealm" Since you are defining a DataSource above, why not use DataSourceRealm? That way, your logins use the same connection pool as your other connections. > debug="99" > driverName="com.mysql.jdbc.Driver" > connectionURL="jdbc:mysql://localhost:3306/lostAndFound?user=[left > blank]&password=[left blank]" > userTable="UserPass" userNameCol="Username" userCredCol="Password" > userRoleTable="UserRole" roleNameCol="Rolename" /> > </Context> > > Currently I am trying to use the JDBCRealm but I have also tried this > using the DataSourceRealm and get the exact same results. You will also need to add this attribute to your <Realm> if you want to use a DataSourceRealm: localDataSource="true" > <!-- Database connection information for connection pooling > <res-ref-name>jdbc/testSite</res-ref-name>--> > <res-ref-name>jdbc/lostAndFoundDB</res-ref-name> This configuration is incorrect. <res-ref-name> is only legal within a <resource-ref> element. Check the DTD or Schema and correct this. I have found that Tomcat does not need <resource-ref> elements for DataSources that have been defined in a webapp's context.xml file. Note that you never "testSite" anywhere. Check all that stuff I found and see if your problem still exists. I suspect that the missing < is the most likely problem. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAki5d6gACgkQ9CaO5/Lv0PDisgCfSXm6xCQqyIQld0eL+8E5s+HA Ce4An36Q2pggr91Q4nF3dpvwlRTdytGs =pcPG -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]