BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

JSP tutorial for beginners with examples – Java Server Pages

Java Server Pages (JSP) is a server side technology for developing dynamic web pages. This is mainly used for implementing presentation layer (GUI Part) of an application. A complete JSP code is more like a HTML with bits of java code in it. JSP is an extension of servlets and every JSP page first gets converted into servlet by JSP container before processing the client’s request.

Below are the links of tutorial shared on JSP. If you are beginner then read them in the given sequence to understand the technology in a better way.

Overview

  • Introduction to JSP
  • JSP life cycle

Elements of JSP

Directives

JSP directives are used for controlling the processing of a JSP page. Directives provide information to the server on how the page should be processed.

  • Page and Taglib directive – Page directive and it’s attributes in detail along with the introduction of taglib directive.
  • Include Directive – Includes the page to the current page during JSP to servlet translation.
  • Include directive with parameters – This guide will help you learn how to pass parameters and their values to another page while using include directive.

Scriptlets

We can use java code in JSP using scriptlets. The JSP container moves the scipetlet content into the _jspService() method which is available to the server during processing of the request.

Scriptlet tutorial – It will help you learn how to use scriptlet in JSP.

Action Tags

They are used for performing an action during request processing phase of JSP life cycle.

  • Action tags introduction – An introduction to all the available action tags in JSP
  • Include action tag – This tag is used for including a file to the current JSP during request processing (dynamically).
  • Include action tag with parameters – <jsp:include> and <jsp:param> example for passing parameters while including another page to the current page.
  • forward action tag – It is used for redirecting the request to another page.
  • useBean, setProperty and getProperty action tags – Learn how to use bean class in JSP.

Expressions

Expression tag – Mainly used for displaying the content on the browser by sending back the result to client through response object.

Declarations

Declaration tag – Learn how to declare variables and methods in JSP.

JSP Implicit Objects

These objects are created by JSP container while translating the JSP page to Servlet. These objects are present inside service methods so we can directly use them without declaration.

  • Introduction to implicit objects
  • out implicit object
  • request implicit object
  • response implicit object
  • session implicit object
  • application implicit object
  • exception implicit object
  • pageContext implicit object
  • config implicit object

Expression language(EL) in JSP

Expression language(EL) – We can easily access the data of variables, bean components and expressions using Expression language. Must read tutorial for JSP beginners.

Exception handling

Exception handling in JSP –  A complete tutorial to learn exception handling in JSP. We have shared two methods to handle exceptions.

Custom Tags

  • Custom tags in JSP
  • How to access the body of custom tags

To find out more tutorials on JSP refer the archive here.

More tutorials »

JSTL tutorial

Comments

  1. Md. Rashedul Hasan says

    October 12, 2014 at 8:20 AM

    For learning JSP.

    Reply
  2. Saikiran says

    September 11, 2015 at 1:03 PM

    I really liked this tutorial very much .It helped me to understand JSP clearly thank you so much

    Reply
  3. V.Pavithra says

    September 21, 2015 at 10:53 AM

    Its very useful please keep on serving others

    Reply
  4. Sindhu says

    December 10, 2015 at 2:12 PM

    Very useful tutorial…. Extensive coverage of topics… Thank you so much… U r a great author… Keep up the good work…

    Reply
  5. Peter says

    May 3, 2016 at 8:01 AM

    It has really helped me start understanding Java. Do you have a tutorial on Java destructors?

    Reply
    • A Nony Mouse says

      May 28, 2016 at 2:47 PM

      You mean Constructors? There is no such thing as a Destructor in Java.

      Reply
  6. kiranmayee says

    June 9, 2016 at 4:48 PM

    Hi Sir,

    Thanks for all your tutorials… But please write some tutorials on Hibernate.

    Regards.
    Kiran

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2012 – 2022 BeginnersBook . Privacy Policy . Sitemap