Overview, Architecture, and Lifecycle of JSP Flashcards

1
Q

JSP

A

Java Server Pages

  • a technology that is used to develop dynamic web pages by inserting Java code into the HTML pages (by making special JSP tags).
  • a server-side programming technology that enables the creation of a dynamic, platform-independent method for building a web-based application
  • a dynamic web technology based on servlet container and Java EE specification
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

JSP vs JavaScript

A

JavaScript can generate HTML dynamically on the client but hardly interact with the webserver to perform complex tasks like database access and image processing etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

JSP container

A
  • JSP engine to process JSP pages

- it provides the runtime environment and other services a JSP needs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

JSP Processing

A
  1. a browser sends an HTTP request
  2. the web server recognizes it is for a JSP page and forwards it to a JSP engine (.jsp vs .html)
  3. the JSP engine loads the JSP page and converts it into a servlet content (demo.jsp -> demo_jsp.java)
  4. the JSP engine compiles the servlet into an executable class (demo_jsp.class) and forwards it to a servlet engine
  5. the servlet engine loads the servlet class and executes it. The output is passed on to the webserver
  6. the webserver forwards the HTTP response to the browser
  7. the browser handles the HTML page inside the HTTP response.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Java servlets

A
  • Java programs that run on the Java-enabled webserver or application server
  • they handle complex requests obtained from the webserver
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

JSP lifecycle

A

the process from its creation until the destruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly