Unexpected Redirect to https
Hi, I'm using Tomcat 4.1.29 on XP Home. I trying to configure Form based authentication with a DataSource based Realm. I've followed the server and web.xml given in the examples supplied with Tomcat. When I try to access my protected index.jsp the request gets redirected to the https port, as follows: Authenticator[/FlatMate]: Security checking request GET /FlatMate/jsp/index.jspAuthenticator[/FlatMate]: Checking constraint 'SecurityConstraint[Protected Area]' against GET /jsp/index.jsp -- trueAuthenticator[/FlatMate]: Subject to constraint SecurityConstraint[Protected Area]Authenticator[/FlatMate]: Calling checkUserData()Authenticator[/FlatMate]: Redirecting to https://localhost:8443/FlatMate/jsp/index.jspAuthenticator[/FlatMate]: Failed checkUserData() test Any help would be appreciated. Regards, Alan Halley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unexpected Redirect to https
- Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, December 18, 2003 3:26 PM Subject: Re: Unexpected Redirect to https Hi Thanks for responding. The security-constraints are security-constraint display-nameExample Security Constraint/display-name web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/jsp/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Security roles referenced by this web application -- role-nametomcat/role-name role-namerenter/role-name /auth-constraint user-data-constraint descriptiondummy/description transport-guarantee/ /user-data-constraint /security-constraint Alan On 12/18/2003 12:20 PMnbsp;Alan Halley wrote: Hi, I'm using Tomcat 4.1.29 on XP Home. I trying to configure Form based authentication with a DataSource based Realm. I've followed the server and web.xml given in the examples supplied with Tomcat. When I try to access my protected index.jsp the request gets redirected to the https port, as follows: Authenticator[/FlatMate]: Security checking request GET /FlatMate/jsp/index.jsp Authenticator[/FlatMate]: Checking constraint 'SecurityConstraint[Protected Area]' against GET /jsp/index.jsp -- true Authenticator[/FlatMate]: Subject to constraint SecurityConstraint[Protected Area] Authenticator[/FlatMate]: Calling checkUserData() Authenticator[/FlatMate]: Redirecting to https://localhost:8443/FlatMate/jsp/index.jsp Authenticator[/FlatMate]: Failed checkUserData() test Hi Alan, it's impossible to say what's going on without seeing the security-constraints xml. Post it here and maybe someone can help. Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MBeans and DataSOurceRealm
Hi I'm trying to configure a DataSourceRealm on Tomcat 4.1.29. Despite my best efforts I keep getting my best efforts I keep getting INFO: Initializing Coyote HTTP/1.1 on port 8080ServerLifecycleListener: createMBeans: MBeanExceptionjava.lang.Exception: ManagedBean is not found with DataSourceRealm at org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:642) at org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Serve and later in the startup sequence 15-Dec-2003 11:10:10 org.apache.jk.server.JkMain startINFO: Jk running ID=0 time=0/50 config=C:\Program Files\Apache Group\jakarta-tomcat-4.1.29\conf\jk2.propertiesServerLifecycleListener: destroyMBeans: Throwablejavax.management.InstanceNotFoundException: MBeanServer cannot find MBean with ObjectName Catalina:type=Valve,sequence=7549020,path=/FlatMate,host=localhost,service=Tomcat-Standalone at mx4j.server.MBeanServerImpl.findMBeanMetaData(MBeanServerImpl.java:528) at mx4j.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:1165) at org.apache.catalina.mbeans.MBeanUtils.destroyMBean(MBeanUtils.java:2289) Any suggestions will be greatly appreciated. Alan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDBCRealm Question
Hi I am getting strange error when I try to use JDCRealm. I running Tomcat 4 from within Forte. The error is Catalina.start: LifecycleException: Exception opening database connection: java.sql.SQLException: org.gjt.mm.mysql.Driver LifecycleException: Exception opening database connection: java.sql.SQLException: org.gjt.mm.mysql.Driver at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615) I'm sure that my JDBCrealm is configured correctly. Here is the relevant section of the server.xml Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost:3306/diamond?user=alan;password=xxx; userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name/ Any help would be gratefully appreciated. Alan Halley
Re: JDBCRealm Question
Hi Rick I'm still getting the same eror. My context in server.xml is as follows Context path= docBase=D:\forteprojects\tomcat401_base\webapps\diamond debug=99 Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost/diamond connectionName=alan connectionPassword=xxx userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name/ Valve className=org.netbeans.modules.web.monitor.catalina.MonitorValve / InstanceListenerorg.netbeans.modules.web.monitor.catalina.DispatchListener /InstanceListener Logger className=org.apache.catalina.logger.FileLogger prefix=localhost__log. suffix=.txt timestamp=true / /Context Alan - Original Message - From: Rick Fincher [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, October 08, 2002 3:32 PM Subject: Re: JDBCRealm Question Hi Alan, Try using connectionName and connectionPassword rather than passing that info in the URL. Tomcat is probably sticking a user= and password= onto the end of your url resulting in: jdbc:mysql://localhost:3306/diamond?user=alan;password=xxx?user=;passw ord= which blows up when it tries to get a connection. The realm tag should look like: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost:3306/diamond connectionName=alan connectionPassword=xxx userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name/ Hope that helps, Rick - Original Message - From: Alan Halley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 08, 2002 9:55 AM Subject: JDBCRealm Question Hi I am getting strange error when I try to use JDCRealm. I running Tomcat 4 from within Forte. The error is Catalina.start: LifecycleException: Exception opening database connection: java.sql.SQLException: org.gjt.mm.mysql.Driver LifecycleException: Exception opening database connection: java.sql.SQLException: org.gjt.mm.mysql.Driver at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615) I'm sure that my JDBCrealm is configured correctly. Here is the relevant section of the server.xml Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://localhost:3306/diamond?user=alan;password=xx x; userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name/ Any help would be gratefully appreciated. Alan Halley -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]