Accessibility
 
Home > Products > UltraDev > Support > Building Common Applications
Dreamweaver UltraDev Icon Macromedia Dreamweaver UltraDev Support Center - Building Common Applications
Authenticating the user

After adding an HTML form to the log-in page, you add UltraDev's Log In User server behavior to verify that the user name and password submitted by the form are valid. If they are valid, the user is redirected to the application's start page (info.jsp, the owner information page, in this case). If the user name and password are invalid, the user is sent back to the log-in page (in this case) to try again.

To add the Log In User server behavior:

1 In the Server Behaviors panel (Window > Server Behaviors), you click the plus (+) button and choose User Authentication > Log In User from the pop-up menu.
The Log In User dialog box appears.
2 You specify the form and the two form fields owners use to enter their user name and password.
3 You specify the database table, SHAREHOLDERS, and the columns, USER_ID and PWD, containing the user names and passwords of the owners.
The server behavior compares the user name and password submitted by the form against the values in these columns.
4 You specify the page to open, info.jsp, if the log-in succeeds.
5 You specify the page to open, login.jsp, if the log-in fails.
6 You accept the default restriction option that is selected: Username and Password.
7 You click OK to add the server behavior to the log-in page.
When run, the Log In User server behavior creates a session variable called MM_Username that stores the owner's user name for the length of the user's session. For more information on session variables, see the Support Center article, Using session variables in your Web applications.

Next, you add a server behavior to the other pages of the owner module to check whether the person requesting the page has logged in successfully. The next section describes how to accomplish this task.

To Table of Contents Back to Previous document Forward to next document