A servlet can then inject and call this EJB:
@WebServlet("/hello") public class HelloServlet extends HttpServlet protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException resp.setContentType("text/html"); PrintWriter out = resp.getWriter(); out.println("<h1>Hello from Servlet</h1>"); java for the web with servlets jsp and ejb pdf
@WebServlet("/book") public class BookingServlet extends HttpServlet @EJB private BookingService bookingService; protected void doPost(...) bookingService.bookTicket(user, seat); A servlet can then inject and call this