O'Reilly logo

Learning Jakarta Struts 1.2: a concise and practical tutorial by Stephan Wiesner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Controller and Templates

At this point, the shop lacks the structure for well-regulated navigation through the site. Individual JSP pages are connected to each other, but they can be accessed only if you know their names. This chapter will bring order to all this chaos. A central servlet takes on the role of captain. We will also implement menus and a consistent page layout with the help of Struts templates, known as Tiles.

9.1 Consistent Layout without Struts

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required