tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jill Han" <jill....@alverno.edu>
Subject form based authentication
Date Wed, 22 Apr 2009 14:46:06 GMT
I tried to use form based authentication with JNDIRealm.  What I want to
accomplish is to have the two applications with the same realm be
authenticated once. It seems the tomcat ignored the realm. I have to
login twice. For example: when I login to http://localhost:8080/app1
successfully, then change the url to http://localhost:8080/app2, the
login page will be prompted again. I hope I describe my issue clearly.

Here is the snippet of web.xml for the app1 and app2

..

  <login-config>

    <auth-method>FORM</auth-method>

    <realm-name>FACRES</realm-name>  

    <form-login-config>

                <form-login-page>/login.jsp</form-login-page>

                <form-error-page>/error.html</form-error-page>

    </form-login-config>

  </login-config> 

 

  <security-role>

    <role-name>CN=FacultyStaff,OU=Groups,OU=EMP,DC=AC</role-name>

  </security-role>

..

 

Here is the login.jsp

<html>

  <head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>Login Page</title>

  </head>

  <body>

  <form method="POST" action="j_security_check" >

                <input type="text" name="j_username">

                <br>

                <input type="password" name="j_password">

                <br>

                <input type="submit"> 

  </form>

  </body>

</html>

 

Your help will be appreciated very much as always.

 

Jill


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message