Table of contents

Setting it up
   Download login application template
   Set it up in tomcat
   Test it
   
Basic Features
	A login page
	Successful login
	Invaid login
	Redirected login

Advanced features
	Going to a target url after the login happens
	Using a master page	
	
Patrs of the application
	Master page
	welcome page
	login page
	home page
	
Role of the authentication plug in
	Using trivial authentication
	Using db authentication
	Writing your own authentication

Using pre-fabricated parts
	Using AspireLoginPart
	Using LoginValidator
	
Writing a login page
	Create a web form with userid and password
	Obtaining the page from aspire
	Submitting the page for validation
	Dealing with the response
    login page source code (link)
    properties file for login page

Handling the submit on the server side
	validating the userid and password
	redirecting to the welcome page if successful
	redirecting to the same page if the login fails
    transferring the viewstate

Tightening the login process
	Rejecting url's if not logged in
    Transferring to target urls

Specifying a master page

Introduction

This article describes the process of writing a web application using Aspire and any servlet API compliant application server such as Tomcat. There are two goals for this login application. The first is to describe how this login application is built in detail. The second goal of the application is to provide a working application that you can take home and built a more specialized application for yourself.

Nature of the login application

You can look at the completed application by using the followign link

Access the login application

This application demonstrate the following

  1. You can go to a public web page with in the application without logging in
  2. when you go this public web page, you will have a button inviting you to login as the system knows that you are not logged in
  3. On Public web page you have three options
    1. Go to a private web page. If you choose this you will be prompted for a login.
    2. Go to a login page using the login button. If you chose this you will be taken to the login page
    3. Go to a public page.
  4. On the login page you can login using any user name and password called "aspire". If you type any other password you get an error page
  5. Once you login you will be taken to the private page.
  6. On the private page you will see that you are logged in and an option to logout
  7. From the private page you can go to the public page
  8. This time on the public page you won't see the login button but instead a logout button
  9. Clicking on the logout button will log you off and take you to the login screen
  10. Now if you go to the public page you will see that you are logged out and a login option button is shown