Single logo
  • Courses
  • Blog
  • About
Join on SkoolJoin on Skool
  1. Blog
  2. /
  3. JSP and Servlets

Topic

JSP and Servlets

How Java web apps work underneath: Servlets, JSP, sessions and the MVC pattern.

19 posts·3 sections

Start here

Start with: Servlets and JSP
Sections
Servlets6JSP7MVC6
Section 16 posts

Servlets

  1. 01
    Servlets and JSP: What a Servlet Container Does and How a JSP Becomes a Servlet

    A JSP looks like HTML with a little Java, yet Tomcat runs it as a servlet. See what a servlet container does for each request, what the generated hello_jsp.java looks like, what a .war holds, and Tomcat vs TomEE.

  2. 02
    Set Up Tomcat 11 and a Maven Web Project in IntelliJ IDEA

    Set JAVA_HOME, install Tomcat 11 on a free port, create a Jakarta EE web application with Maven in IntelliJ IDEA, read its folders and pom.xml, and run it on Tomcat.

  3. 03
    The Servlet Request Lifecycle: @WebServlet, web.xml, init, doGet and destroy

    A servlet is a Java class that answers a URL. Follow one request through Tomcat, map servlets with @WebServlet and web.xml, build a page from a list, and watch init, doGet and destroy run.

  4. 04
    Servlet Request Parameters, and Forward vs Redirect

    Read ?name=Emma with getParameter, then hand a request on two ways: a forward keeps one request and its attributes, a redirect makes the browser ask again and the attribute is gone.

  5. 05
    Run a Java Web App in Docker: Tomcat 11 With One Compose Command

    Run a servlet project without installing Tomcat: one docker compose command builds the WAR with Maven on Java 25, starts Tomcat 11 in a container, and serves the app on localhost:8090.

  6. 06
    Sessions, Cookies and Filters in Java Servlets: Log In Once, Stay Logged In

    HTTP treats every request as a stranger. A session on the server, a JSESSIONID cookie in the browser and one LoginFilter on /* let you log in once and keep every page behind the login.

Section 27 posts

JSP

  1. 07
    Servlets and JSP: What a Servlet Container Does and How a JSP Becomes a Servlet

    A JSP looks like HTML with a little Java, yet Tomcat runs it as a servlet. See what a servlet container does for each request, what the generated hello_jsp.java looks like, what a .war holds, and Tomcat vs TomEE.

  2. 08
    JSP Scripting: Expressions, Scriptlets, Declarations, Comments and Includes

    The JSP tags you'll read in older Java web apps: expressions, scriptlets, declarations, page imports, two kinds of comment, and the include directive versus the jsp:include action, each shown with what Tomcat turns it into.

  3. 09
    JavaBeans and JSP Scopes: Page, Request, Session and Application

    A Student bean filled from a form with jsp:useBean and setProperty, then one Counter class kept in four scopes. Three visits, two browsers and an include page show exactly who sees which number.

  4. 10
    JSP Expression Language Step by Step: ${...} for Beans, Maps, Lists, Params and Scopes

    Expression Language prints a value in a JSP with ${...} and no Java on the page. Read a Student bean, a price map, a tag list and ?city=Boston, run small checks, and see the order EL searches the scopes.

  5. 11
    JSTL Core Tags: c:set, c:out, c:if, c:choose and c:forEach

    Five JSTL core tags let a JSP decide and repeat with no Java on the page. Add the jars to pom.xml, then use c:set, c:out (and see why it is safer than plain EL), c:if, c:choose and c:forEach on three orders.

  6. 12
    JSTL Functions and Formatting: fn:length, fn:toUpperCase, fn:contains, fmt:formatNumber and fmt:formatDate

    Raw values in, friendly values out: fn:length counts three students, fn:toUpperCase and fn:contains work on text, and fmt turns 1234.5 into $1,234.50 and a Date into 19 October 2026, in the browser's language.

  7. 13
    Maintaining and Migrating Legacy JSP With AI: Explain the Page, Refactor to a DAO, Servlet and JSTL, Then Move It to React

    One tangled orders.jsp glues the status into SQL, opens a connection it never closes, mixes Java into HTML and styles inline. Three prompts explain it, refactor it to a DAO, a servlet and an EL plus JSTL page, and migrate the table to React 19 with TypeScript. The review catches two draft bugs: a javax taglib URI and an unescaped customer name.

Section 36 posts

MVC

  1. 14
    MVC and the Front Controller With Servlets and JSP

    A Book model, a BookController servlet and a books.jsp view behind WEB-INF show MVC in plain Java. Then one servlet on /app/* becomes a front controller, the idea Spring's DispatcherServlet grew from.

  2. 15
    Forms With JSP and Servlets: Handle the POST and Validate on the Server

    Post a sign-up form straight to a JSP and anything gets accepted. Post it to a servlet instead: doPost checks name and email, forwards back with errors and the typed values, or on to the welcome page.

  3. 16
    Mini App With Servlets and JSP: Login, Logout and a Shared Web Template

    Four pages and one template: a login form that posts to a servlet, a session that remembers the user, a filter that guards home.jsp and account.jsp, and a logout that ends it, plus when each step forwards or redirects.

  4. 17
    SQLite and a JDBC Connection Pool in a Java Web App

    A whole database in one file, studyeasy.db, and a Java web app that talks to it: one HikariCP pool, a @WebListener that opens it and runs schema.sql at startup, and a /db-check servlet that borrows a connection.

  5. 18
    Users CRUD With Servlets and JSP, Part 1: Add and List Through a DAO

    Fill an empty users table from a form and list every row: UserController picks the page, UserDao holds all the SQL, SaveUserServlet inserts and redirects, and a JSTL table shows the rows. Plus why every value goes in as a ?.

  6. 19
    Users CRUD With Servlets and JSP, Part 2: Update and Delete

    Edit and Delete links on every row: one form does add and edit with a hidden id, a confirm page asks before deleting, and only a POST changes the database, then redirects back to the list.

Sections
  1. 1.Servlets6
  2. 2.JSP7
  3. 3.MVC6
Community · Free to join
Single logo

StudyEasy AI Community

Hosted onSkool

Learn AI engineering, share what you build, and connect with other learners.

  • Free resources: lesson files, notebooks and code

  • Ask questions and join engineering discussions

  • Meet real people learning and building with AI

Join free on Skool

Single logo

Empowering Education, One Course at a Time

About
About usContact us
Legal
Terms of UsePrivacy Policy

© 2026 StudyEasy Organization. All rights reserved.