tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ostad, James" <JOs...@geneseeisd.org>
Subject JDBCRealm problem
Date Wed, 26 Nov 2003 17:22:49 GMT
Hi everyone,
Hope everyone will have a great TG Day.

Problem: I am not able to login successfully. It keeps failing.

Structure: using JDBCRealm + form authentication

database property: match exactly as explained in tomcat documentation
for setting up JDBCRealm

I am including three things:

1-server.xml part for realm setup
2-web.xml of the web apps
3-errorlog file is the error log I get when I attempt to use jdbcrealm.
 
you will find them in this email accordingly.

Any help will be appreciated.


server.xml**************************

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" 
	driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
	
connectionURL="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=us
ers;User=image;Password=image"
	userTable="users" userNameCol="username" userCredCol="userpass"
	userRoleTable="userroles" roleNameCole="rolename"
  	/>

web.xml*************************

<web-app>

 <context-param>
       <param-name>jdbcDriver</param-name>
 
<param-value>com.microsoft.jdbc.sqlserver.SQLServerDriver</param-value>
    </context-param>
    <context-param>
       <param-name>jdbcURL</param-name>
 
<param-value>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=imag
e</param-value>
    </context-param>
    <context-param>
       <param-name>jdbcUserName</param-name>
       <param-value>image</param-value> <!-- no user name -->
    </context-param>
    <context-param>
       <param-name>jdbcPassword</param-name>
       <param-value>image</param-value> <!-- no password -->
    </context-param>
    <context-param>
       <param-name>minimumConnections</param-name>
       <param-value>1</param-value>
    </context-param>
    <context-param>
       <param-name>maximumConnections</param-name>
       <param-value>5</param-value>
    </context-param>
    <listener>
       <listener-class>web.InitializeConnectionPool</listener-class>
    </listener>
    <!-- END: Initialization of the WebApp Connection Pool -->

      <servlet-name>gateway</servlet-name>
 <display-name>Gateway</display-name>
    <description>Entry to CRC</description>
  <jsp-file>/Gateway.jsp</jsp-file>
  </servlet>
  <servlet>
  <servlet-name>crcForm</servlet-name>
 <display-name>crcForm</display-name>
    <description>Form to request data</description>
  <jsp-file>/Forms/crcForm.jsp</jsp-file>
  </servlet>
  <servlet-mapping>
    <servlet-name>gateway</servlet-name>
    <url-pattern>/Gateway</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>crcForm</servlet-name>
    <url-pattern>/form</url-pattern>
  </servlet-mapping>
          <session-config>
        <session-timeout>
            20
        </session-timeout>
    </session-config>
 <error-page>
        <exception-type>util.sql.ConnNotAvailException</exception-type>
        <location>/error/server_busy.html</location>
    </error-page>
    <error-page>
        <exception-type>util.sql.ShuttingDownException</exception-type>
        <location>/error/server_shutdown.html</location>
    </error-page>
   
    <security-constraint>
    <web-resource-collection>
      <web-resource-name>RestrictedResources</web-resource-name>
           <url-pattern>/form</url-pattern>
      <http-method>POST</http-method>
      <http-method>GET</http-method>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
    </auth-constraint>
  </security-constraint>
  <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
      <form-login-page>/login/login.jsp</form-login-page>
      <form-error-page>/login/error.jsp</form-error-page>
    </form-login-config>
  </login-config>
  <security-role>
    <description>A simple restricted-access user role.</description>
    <role-name>admin</role-name>
  </security-role>
 
</web-app>

errorlogfile*****************************************


some of you would like to have all errors, some don't. So I attached the
error logfile.


Thanks,

James Ostad
Application Developer/Analyst
TMS Department
Ex. 4457
E-mail: jostad@geneseeisd.org


Out---> (3)

Mime
View raw message