What is JSP (Java Server Pages)?

JSP - Java server pages.

JSP is programming language(environment) to develop dynamic web pages.
  • Developed by Sun Microsystems
  • Works on both IIS (Internet Information System) and Apache (Commonly Tomcat used)
  • .jsp files are compiled into Java Servlets by a JSP compiler on JSP Servlet engine.
  • .jsp files are parsed once and used forever.
  • <%! ... %> is used for variable and method declarations.
  • scriptlet: <% ... %> tags, any valid Java code is called scriptlet.
  • <% -- my comment -- %> or <% /* my Comment */%>
  • <%= expression ... %> - we do not use (;) at this
  • <%@ directives ... %> : directives give special information about the page to the JSP engine.
  • JSTL - JSP Standard tag library
Advantages:
  • Multiplatform
  • Component reuse by using Javabeans + EJB
  • advantages of Java

Execution steps of .jsp files

  • send .jsp file to JSP Servlet engine
  • parse .jsp file
  • generate servlet source code
  • compile servlet source code into class
  • instantiate servlate
  • send HTML (servlet output) to client
reference

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.