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

4.4 Custom Actions

JSP supports user-defined tags or Custom Actions according to the tag extension mechanism defined by the JSP specification. Custom actions have access to all the information from the Request and Response objects, and can use variables in the session. A set of custom actions is called a Tag Library or Taglib.

As Struts is simply a set of custom actions, it makes sense to know how they are created.

Before going into details we’ll run through a simple example. We’ll create a small action that displays the date according to the user’s local convention (refer to Chapter 12 for more on this topic).

Custom actions are usually developed and deployed in JAR files. In our case though, we will be using the class files compiled from our source ...

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