Vinod sir struts 2 part 3

2,086 views
2,019 views

Published on

Struts 2 Validation & Integrating Tiles Plugin

Published in: Education, Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,086
On SlideShare
0
From Embeds
0
Number of Embeds
30
Actions
Shares
0
Downloads
116
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Vinod sir struts 2 part 3

  1. 1. Prof. Vinod Pillai.vinodthebest@gmail.comhttp://vinodthebest.wordpress.comwww.youtube.com/vinodthebest
  2. 2. Part – IIIApplicationDevelopment Prof. Vinod Pillai 2
  3. 3. Part – III : Struts 2 UI Tags &Integrating Tiles.  Validation  Using validate () Method  XML File Validation.  Struts 2 UI Tags.  Integrating Tiles Plug-in in Struts 2.  HttpServletRequest, HttpServletResponse, ServletContext & HttpSession. Prof. Vinod Pillai 3
  4. 4. 6“Validation – Using validate () Method & XML”Our Goal : To create a Struts2 application with an index page. If user clicks the Login Button without entering the Username or Password then it should display message appropriately error message. Prof. Vinod Pillai 4
  5. 5. Final Structure: Prof. Vinod Pillai 5
  6. 6. Index.jsp: Prof. Vinod Pillai 6
  7. 7. Struts.xml: Prof. Vinod Pillai 7
  8. 8. Action Class: Prof. Vinod Pillai 8
  9. 9. Welcome.jsp: Prof. Vinod Pillai 9
  10. 10. Second Option : XML File Validation Prof. Vinod Pillai 10
  11. 11. Final Structure: Prof. Vinod Pillai 11
  12. 12. LoginAction-validation.xml : Prof. Vinod Pillai 12
  13. 13. Action Class : Prof. Vinod Pillai 13
  14. 14. 7Our Goal : “ User Form ” To create a Struts2 application with an index page. If user clicks the Login Button it will redirect him to Welcome page where some field values are coming from Action Class variable & some major Form Fields. Prof. Vinod Pillai 14
  15. 15. Action Class : Prof. Vinod Pillai 15
  16. 16. Welcome.jsp: Prof. Vinod Pillai 16
  17. 17. 8Our Goal : “Integrating Tiles Plug-in” To create a Struts2 application with an index page. As user clicks the Login Button it will redirect him to Welcome page which having a common design layout which will be common for all the pages. Prof. Vinod Pillai 17
  18. 18. Final Structure: Prof. Vinod Pillai 18
  19. 19. MainLayout.jsp: Prof. Vinod Pillai 19
  20. 20. Header.jsp:Menu.jsp: Prof. Vinod Pillai 20
  21. 21. tiles.xml: Prof. Vinod Pillai 21
  22. 22. Index.jsp: Prof. Vinod Pillai 22
  23. 23. Struts.xml: Prof. Vinod Pillai 23
  24. 24. FirstPage.jsp:SecondPage.jsp: Prof. Vinod Pillai 24
  25. 25. 8&9“HttpServletRequest, HttpServletResponse, ServletContext & HttpSession” Our Goal :  Getting ServletContext Object.  Getting HttpServletRequest Object.  Getting HttpServletResponse Object.  Getting HttpSession Object. Prof. Vinod Pillai 25
  26. 26. ApplicationAware/ServletContext: Prof. Vinod Pillai 26
  27. 27. SessionAware/HttpSession: Prof. Vinod Pillai 27
  28. 28. ServletRequestAware/HttpServletRequest: Prof. Vinod Pillai 28
  29. 29. ServletResponseAware : Prof. Vinod Pillai 29
  30. 30. Part – III : Struts 2 UI Tags &Integrating Tiles.  Validation  Using validate () Method  XML File Validation.  Struts 2 UI Tags.  Integrating Tiles Plug-in in Struts 2.  HttpServletRequest, HttpServletResponse, ServletContext & HttpSession. Prof. Vinod Pillai 30
  31. 31. Part – IIICompleted Prof. Vinod Pillai 31
  32. 32. Thank Youvinodthebest@gmail.com Prof. Vinod Pillai 32

×