Helen,

You don't need a servlet to do this, the j2ee container takes care of this
for you. The key thing is the parameter names in the form.

Notice that in the example below, the action is "j_security_check" ... this
is the containers security bit. You never provide a link to the page like
this:

 <a href="mylogin.html" ><p> This link won't work!</p> </a>

But you provide a link like this:

 <a href="/controledpartofthesite/animaginarypagethatdoesntneedtoexist"
><p>This link will log me in</p></a>


In the various j2ee deployment descriptors, you refer to the login form
below, as well as an error page, and the "/controledpartofthesite"...you may
also make some of the other assets such as ejbs,jsp's, or even specific
methods of an ejb "controled" in the deployment descriptors. The container
will always check to see if the user is "in" the proper role (ie, they have
logged in), and if they are "out" of the proper role, the login page below
will be presented.


Regards,

The elephantwalker

Here is an example login form:

      <form action="j_security_check" method=post>
      <table>
      <tr>
       <td align="center" >
       <table border="0">
       <tr>
        <td><b>User ID:</b></td>
        <td>
          <input type="text" size="15" name="j_username" value="j2ee">
        </td>
       </tr>
       <tr>
        <td><b>Password:</b></td>
         <td>
          <input type="password" size="15" name="j_password" value="j2ee">
        </td>
       </tr>
       <tr>
        <td></td>
        <td align="right">
         <input type="image" border="0" src="/images/button_submit.gif"
name="submit">
        </td>
       </tr>
       <tr>
       <td><br></td>
       </tr>
      <tr>
       <td colspan="3" align="center">
       </td>
       </tr>
     </table>
      </td>
        </tr>
      </table>
    </form>

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Helen Zhao
Sent: Friday, April 20, 2001 3:14 PM
To: Orion-Interest
Subject: FORM authentication method


Hi all,

I am trying to use FORM authentication method in
Orion, My question is what is the security checking
servlet I should submit the login information to?
Does anybody has any experience with FORM login?

thanks,
Helen

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/


Reply via email to