Beginning Servlets and JSP

Beginning Servlets and JSP

Pre-requisite:

Knowledge of Java syntax, HTML, SQL and working programming experience with any procedural or object-oriented language.

Duration:

40 hours

Objectives:

Servlet basics

  • HTTP basics.
  • GET and POST.
  • Cookies.
  • Content types (MIME).
  • Basic servlet API.
  • HttpServlet.
  • doGet() and doPost().
  • HttpServletResponse. getWriter(). setContentType().
  • Handling form data
  • HttpServletRequest.
    • getParameter().
    • getParameterValues().
    • getParameterNames().
    • Uploading files.

Servlet Life Cycle and servlet set up

  • Web application structure.
  • directory structure
  • Deployment descriptors (web.xml file).
  • Setting up web application
  • init().
  • destroy().

Session.

  • getSession().
  • HttpSession.
  • getAttribute(). setAttribute(). removeAttribute().
  • invalidate().
  • setMaxInactiveInterval().

Forwarding requests

  • RequestDispatcher
  • forward().

Jsp Basics

  • JSP page structure
  • How JSP Pages are converted to servlets
  • Expressions (<%=…%>)
  • Scriplets (<%… %>)
  • Implicit objects
  • request
  • response
  • out
  • session
  • pageContext. Scope of the attributes.
  • Bean tags
  • jsp:useBean
  • jsp:setProperty
  • jsp:getProperty
  • Error page. Exception handling.
  • JSP includes.

(Java Training)