title: restrict user to authenticate before viewing pages using spring security java
body: <p>I am new to Spring framework and Spring security. I am developing an application using google app engine. I am trying to authenticate the user but cant able to achieve it. My problems here are</p>
  
  <ol>
  <li>I need to restrict the all the user to type the URL in the browser and to see the pages. If they want to access such pages I need to navigate them to the warning page.</li>
  <li>An user can access the application only if he is authenticated with the application. If not authenticated the login page should be navigated.</li>
  <li>I need to write a custom login authenticated page where in the page i should authenticate them if given credentials are perfect then we can navigate them to the main page.</li>
  <li>In the custom login authentication page we should write the database logic to get the credentials from the db and authenticate. And if the user is not registered with the application then we should navigate them to the registration page with a default message.</li>
  </ol>
  
  <p>Please any one can give me the default application with this requirements.</p>
  
  <p>Thanks and Regards,
  Sree</p>