Beginner Java Servlets / JSP / JPA

Beginner Java Servlets, JSP,  JPA

Prerequisites:

You should be on the Advanced Java level

Intended Audience:

This Beginner Java Servlets and JSP course is intended for people who have basic Java skills up to our Advanced Java level, no web programming experience is needed. Learn how to develop robust Java Web applications based on Servlets and JSP’s with a Tomcat server.

After this course you should be able to

  • Know how Java Servlets and JSP’s work together in a Java Web App.
  • Understand how Tomcat and Netbeans facilitates Java Servlet Web App Development.
  • Code and test JavaServer Pages that use scriptlets, expressions, the implicit request object, the ServletContext object, page directives, and JSP comments.
  • Code and test servlets that perform data input and storage.
  • Use the web.xml file for an application to map a servlet to a URL pattern.
  • Write debugging data for a servlet to either the console or a log file.
  • Use the MVC pattern to develop web applications so servlets control the processing and JSPs handle the presentation.
  • Provide for server-side data validation in your applications.
  • Use include files in your JSPs at compile-time or runtime.
  • Use the web.xml file to set initialization parameters and use your servlets to get the parameters.
  • Use the web.xml file to implement custom error handling.
  • Provide for session tracking by using both cookies and URL encoding.
  • Provide for parameter passing by using URL rewriting or hidden fields.
  • Test your web applications with cookies enabled and with cookies disabled.
  • Write a utility class that includes a static method for getting a specific cookie from a user’s browser.
  • Create business classes that are JavaBeans.

Course Contents

Day 1

WEB APPLICATIONS

  • A typical example
  • Components of a Web App
  • Static vs. Dynamic
  • Overview of (Servlets, JSF, Spring Framework)
  • Intro to Servlets/JSP development
  • Software used for developing Java Web Apps
  • Software Components
  • Architecture
  • Standard Directories and Files
  • Software for Developing Java Web Apps
  • WebServers
  • Database Servers
  • Deployment Tools

MVC

  • Model 1
  • Model 2 (MVC)
  • An example MVC Servlet App
  • UI, HTML, CSS
  • Servlet
  • Web.XML or Annotations?
  • User Class
  • JSP for the 2nd page

NETBEANS AND TOMCAT

  • How to use the NetBeans IDE
  • HTML, JSP files
  • Java Classes
  • Servlets
  • XML files like Web.XML
  • More NetBeans IDE Features

HTML5 AND CSS3

  • HTML5 elements
  • HTML5 Semantic Elements
  • Div and Span
  • Cross-Browser Compatibility
  • Links, Images, Tables
  • CSS styles
  • CSS Selectors
  • CSS Rule Sets and Comments
  • CSS for table formatting
  • HTML Forms
  • Text Boxes, Buttons, Check Boxes, Radio Buttons
  • Combo Boxes, List Boxes

SERVLETS

  • Creating and mapping a Servlet
  • Requesting a Servlet
  • Servlet Skills
  • Data Validation
  • Web.xml
  • Servlet methods
  • Servlet Errors

 

Day 2

JSP’s

  • EL and JSTL
  • Coding a JavaBean
  • Using EL to get attributes and JavaBean properties
  • Enabling the core JSTL Library
  • Using the JSTL if tag
  • How to use JSP tags
  • Directives, Scriptlets, Expressions
  • Comments in JSP’s
  • Standard JSP tags in JavaBeans
  • useBean
  • getProperty
  • setProperty
  • Including fles in a JSP
  • Common JSP errors

 

Day 3

SESSIONS AND COOKIES

  • Session tracking with HTTP
  • Session tracking in Java
  • Why an app needs session tracking
  • Getting and Setting session attributes
  • More methods of the session object
  • Thread-safe access to the session object
  • Creating and using cookies
  • Viewing and deleting cookies
  • Four methods for working with cookies
  • A utility class for working with cookies
  • URL rewriting
  • Using hidden fields to pass parameters
  • A Music Download Application
  • User Interface
  • File structure
  • web.xml
  • JSP’s
  • Servlets

EXPRESSION LANGUAGE

  • Advantages and Disadvantages
  • Using the dot operator to work with arrays and lists
  • Using EL to specify scope
  • How to use the dot operator to work with arrays and lists
  • How to use the dot operator to access nested properties
  • Using the [] operator to access attributes
  • Working with other implicit EL objects
  • Working with other EL operators
  • How to disable EL
  • How to disable scripting

 

Day 4

  • How to use the JSP Standard Tag Library
    • (JSTL)
    • An introduction to JSTL
    • JSTL Libraries
    • Making the JSTL Jar fiiles available to your application
    • Coding the taglib directive
    • Coding a JSTL Tag
    • Viewing the documentation for a library
    • How to work with the JSTL core library
    • out, forEach, forTokens
    • Attributes for looping
    • if, choose, url tags
    • More tags
    • The Cart Web application
    • User Interface
    • Business Classes
    • Servlets and JSP’s

CUSTOM JSP TAGS

  • How to code a custom tag that doesn’t have a body
  • How to code a custom tag that has a body
  • How to code a custom tag that has attributes
  • How to code a custom tag that reiterates its body
  • How to work with scripting variables
  • Classes, methods and fields for working with custom tags

 

Day 5

  • How to use MySQL as the database management system
  • An introduction to MySQL
  • How to work with the MySQL Workbench
  • Database Connections
  • The SQL statements for data manipulation
  • SQL Commands Overview

JDBC

  • How to use JDBC to work with a database
  • Database drivers
  • Connecting to a Database
  • Returning a Result Set
  • Retrieve Data from a Result Set
  • Insert, update, delete data
  • Prepared Statements
  • An SQL Gateway Application
  • How to work with connection pooling
  • The Email List application

JPA

  • Introduction
  • A summary of JPA implementation
  • Entities and the Entity Manager
  • Configuring the Netbeans IDE to work with JPA
  • Configuring a Persistence unit
  • JPA Entities
  • Coding the class for an entity
  • Using getter and field annotations
  • Coding relationships between entities
  • Working with dates and times
  • Retrieving data
  • Getting an Entity Manager Factory
  • Retrieving an entity by primary key
  • Retrieving multiple entities
  • Retrieving a single entity
  • Insert, update or delete a single entity
  • Update or delete multiple entities
  • A complete JPA class
  • Methods to modify date
  • Methods to retrieve data
  • Transaction management
 

 

Duration and pricing

  • Full-time over 5 days (R9995)
  • Part-time over 4 weeks (2 nights per week, 3 hour sessions) (R11995)
  • Part-time over 8 Saturdays, 3 hour sessions (R11995)
  • Please note : For part-time courses we do not have a fixed schedule and you will be placed on a waiting list until we get a group of 4+ together. Please book with no dates on the bookings form. This will automatically put you on the waiting list. We will confirm with you as soon as we have a part-time group together.
  • Distance-learning over up to 3 months (R9995)
  • International exams are not included in the course price.
  • Prices exclude Vat for Vat-registered companies

Certificate

  1. Upon completion of this course we will issue you with attendance certificate to certify your attendance and / or completion of the prescribed minimum examples.
  2. You may sit for our competency assessment test and on passing you will obtain our competency certificate.
  3. Our competency assessment can be booked and taken by someone who has not attended the course at a cost of R950.

Bookings

You can download the course registration form on our home page or by clicking here

Brochure

You may download a pdf copy of this page by clicking on the pdf icon at the top of the page.

Questions

Please email us

Schedule

On the calendar below. If your browser doesn’t display the calendar below, please click on this link or try using Google Chrome, alternatively please enquire via our Contact Us page.

Leave a Comment

Or