300 likes | 388 Views
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.
E N D
J2EE Web FundamentalsLesson 7JSP Instructor: Dr. SegunAdekile
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
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
What is a JSP? • A JSP is a servlet
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.