Let’s start by creating a new context shop5
, as a copy of shop4
.
First, we will develop our own controller servlet and then look at possibilities offered by Struts. This will give us a thorough understanding of the controller’s function and will highlight particular problems such as having to restart the context after each modification in the configuration file. You should view the first part as the theoretical background (despite the purely practical approach) that precedes the actual work in the second part.
This is the first question we should consider. It is definitely possible to create a main menu, perhaps with HTML frames, that allows all JSP pages to be accessed via direct links. We can also connect individual pages with each other directly, for instance, in the way BookView.jsp
follows Book.jsp
. This approach is certainly simple and
sensible for small and straightforward pages, but for large projects, it could easily lead...