You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Barney Hamish <Ha...@ect-telecoms.de> on 2002/05/07 18:08:21 UTC

RE: help, JDBCRealm, Why Need to authenticate three times to logi n

If I were you I'd check the error logs or the jvm.stdout or whatever. It
could be that there is a problem creating the connection to the database to
authenticate the user. If this is the case there should be error messages
indicating problems connecting to the database.

-----Original Message-----
From: Eddie Bush [mailto:ekbush@swbell.net]
Sent: Tuesday, May 07, 2002 5:58 PM
To: Tomcat Users List
Subject: Re: help, JDBCRealm, Why Need to authenticate three times to
login


I'm hardly a guru, so you probably want to investigate further.  However, it
looks to me like your login page is protected by your security constraint.
I don't know if that's the problem.  I do know that my login page is outside
of my url pattern and I just have to log in one time.

Regards,

Eddie

----- Original Message -----
From: "Hillel Bilman" <hi...@mail.co.za>
To: <to...@jakarta.apache.org>
Sent: Tuesday, May 07, 2002 12:50 AM
Subject: help, JDBCRealm, Why Need to authenticate three times to login


> Dear Tomcat Users
>
> I've installed tomcat v4.03 with JDBCRealm
> When you login incorrectly you go to the error
> page however if you login correctly you need to
> login three times before you can get to the
> index.jsp.
>
> Thanks for any assistance
>
>
> my web.xml is:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE web-app
>   PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.3//EN"
>
> "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
>
> <web-app>
>
> <session-config>
> <session-timeout>2</session-timeout>
> </session-config>
>
>   <security-constraint>
>       <web-resource-collection>
>          <web-resource-name>
>             WebInterface
>          </web-resource-name>
>          <url-pattern>/login/*</url-pattern>
>          <http-method>GET</http-method>
>          <http-method>POST</http-method>
>       </web-resource-collection>
>       <auth-constraint>
>          <role-name>manager</role-name>
>          <role-name>customer</role-name>
>       </auth-constraint>
>    </security-constraint>
>        <form-login-config>
>        <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>
>
> server.xml:
>
>  <Realm
> className="org.apache.catalina.realm.JDBCRealm"
> debug="99"
>
> driverName="org.postgresql.Driver"
>
>
connectionURL="jdbc:postgresql://localhost/catalina?user=dbuser;password=dbp
as
> s"
>                 userTable="users"
> userNameCol="user_name" userCredCol="user_pass"
>              userRoleTable="user_roles"
> roleNameCol="role_name"/>
>
> <DefaultContext reloadable="true"/>
>           <Context path="/interface"
> docBase="bulkinterface" debug="0"
>         reloadable="true" crossContext="true">
>         <Logger
> className="org.apache.catalina.logger.FileLogger"
>
> prefix="localhost_interface." suffix=".txt"
>                 timestamp="true"/>
>          </Context>
>
> I've Switched off default Memory Realm
>
> The login.jsp I've used is from the examples:
>
> <html>
> <head>
> <title>Login Page for Examples</title>
> <body bgcolor="white">
> <form method="POST" action='<%=
> response.encodeURL("j_security_check") %>' >
>   <table border="0" cellspacing="5">
>     <tr>
>       <th align="right">Username:</th>
>       <td align="left"><input type="text"
> name="j_username"></td>
>     </tr>
>     <tr>
>       <th align="right">Password:</th>
>       <td align="left"><input type="password"
> name="j_password"></td>
>     </tr>
>     <tr>
>       <td align="right"><input type="submit"
> value="Log In"></td>
>       <td align="left"><input type="reset"></td>
>     </tr>
>   </table>
> </form>
> </body>
> </html>
>
> Best Regards
>
> Hillel Bilman
> Manager HZB Technologies
> mailto:hillel@mail.co.za
> cell:0832300002
> tel:(011)4436164
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>