August 2018
Intermediate to advanced
314 pages
8h 9m
English
Here, we have the abstract class AbstractCommand, which includes the abstract execute method. All implementations of this command extend AbstractCommand, which is an abstract class:
package com.rhuan.action.Command;import javax.servlet.ServletException;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;public abstract class AbstractCommand { public abstract void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException ;}
In the following block of code, we have the PdfCommand class. This is a subclass of AbstractCommand that implements the logic to download a PDF file:
import javax.servlet.ServletException;import javax.servlet.http.HttpServletRequest ...
Read now
Unlock full access