1 / 29

J2EE Web Fundamentals Lesson 7 JSP

J2EE Web Fundamentals Lesson 7 JSP. Instructor: Dr. Segun Adekile. Outline. Objectives Course Text Book Basham, Bryan; Sierra, Kathy; Bates, Bert (2012-10-30). Head First Servlets and JSP (Kindle Location 1349). O'Reilly Media. Kindle Edition. Using JSP: Being a JSP. Objectives. Agenda.

herve
Download Presentation

J2EE Web Fundamentals Lesson 7 JSP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. J2EE Web FundamentalsLesson 7JSP Instructor: Dr. SegunAdekile

  2. Outline • Objectives • Course Text Book • Basham, Bryan; Sierra, Kathy; Bates, Bert (2012-10-30). Head First Servlets and JSP (Kindle Location 1349). O'Reilly Media. Kindle Edition. • Using JSP: • Being a JSP

  3. Objectives

  4. Agenda • Introduction • Why JSPs? • What is a JSP? • Page Directive • JSP Element: Expressions • JSP Element: Declarations • Implicit Objects • Comments • Standard Actions • Expression Language • JSTL • Custom Tag Development

  5. Why JSPs?

  6. What is a JSP? • A JSP is a servlet

  7. What is a JSP? • In the end, a JSP is just a servlet • Your JSP eventually becomes a full-fledged servlet running in your web app. • It’s a lot like any other servlet, except that the servlet class is written for you — by the Container. • The Container takes what you’ve written in your JSP, translates it into a servlet class source (. java) file, then compiles that into a Java servlet class. • After that, it’s just servlets all the way down, and the servlet runs in exactly the same way it would if you’d written and compiled the code yourself. • In other words, the Container loads the servlet class, instantiates and initializes it, makes a separate thread for each request, and calls the servlet’s service() method.

  8. A Simple JSP

  9. Page Directive

  10. Expressions

  11. Declarations

  12. Declarations

  13. Declarations

  14. Declarations

  15. Generated Servlet

  16. Generated Servlet

  17. Implicit Objects

  18. Comments

  19. API for JSP Servlet

  20. Lifecycle of a JSP

  21. Lifecycle of a JSP

  22. Initializing JSP

  23. Attributes in a JSP

  24. Three Directives

  25. Page Directive attributes

  26. Page Directive attributes

  27. Scriptlets considered harmful?

  28. Expression Language

  29. Recap

More Related