Simple Login Th

  • Published on
    01-Sep-2014

  • View
    2.764

  • Download
    3

Embed Size (px)

DESCRIPTION

login form Grails Grails

Transcript

  • Grails login/logout Simple tutorial http://khomkrit.wordpress.com
  • Part I View
  • > grails create-app simple-login controller user login logout > grails create-controller user
  • index.gsp grails-app/views/user/ Directory
  • Login index.gsp
  • Login index.gsp style form username password
  • Login form
  • Login HTML form Grails HTML form action request
  • Login request action login controller ? controller Grails form request controller index.gsp /grails-app/user/ directory request user controller
  • Login controller request
  • Grails Application > grails run-app http://localhost:8080/simple-login/user
  • form Login Grails action
  • action ? login.gsp action login action login request form
  • Part II Action
  • Tip , domain controller , restart web server restart web server controller action domain
  • action action controller request controller user action name UserController.groovy action login
  • controller controller /grails-app/controllers/
  • controller UserController.groovy action login
  • controller http://localhost:8080/simple-login/user/ login
  • controller Grails 404 ! ?
  • action Grails action request http://localhost:8080/ simple-login/user/login, action login user controller Grails login.gsp / grails-app/views/user/ render !
  • controller login.gsp Grails render client method render Grails render client
  • controller http://localhost:8080/simple-login/user/ login
  • controller Grails :)
  • controller logic login login session client logic
  • Part III logic login
  • login login parameter params code
  • login login username admin password pass login login
  • login user login Grails redirect user login (/user/ index) flash flash flash
  • flash flash redirect login (index.gsp)
  • flash redirect action index Grails index.gsp grails-app/ views/user/ directory. flash message action index index.gsp
  • flash ${flash.message} login ${}
  • flash login login flash message
  • session login
  • Logout action logout logout session.user logout
  • Loginuser login logic login link logout ,
  • login :
  • login link logout
  • login HTML controller Grails controller
  • Check Point! login login link logout form login login form login login flash message
  • Grails CSS include CSS Grails class=message
  • flash.message
  • style /web-app/ css/ resource /web-app/images/ web-app/js/
  • Layout template Filter Tag Library Service URL Mapping
  • Thank You Font: 2005_iannnnnGMO - http://www.f0nt.com