What is a JSP and what is it used for?

  • JSP (Java Server Pages) is an alternate way of creating servlets
    • JSP is written as ordinary HTML, with a little Java mixed in
    • The Java is enclosed in special tags, such as <% ... %>
    • The HTML is known as the template text
  • JSP files must have the extension .jsp
    • JSP is translated into a Java servlet, which is then compiled
    • Servlets are run in the usual way
    • The browser or other client sees only the resultant HTML. 
  • JSP are used for
    • Create dynamic web content (HTML, XML, ...) for a Web Application
    • Make it easier/cleaner to mix static HTML parts with dynamic Java servlet code

Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email