O'Reilly logo

Struts 2 Design and Programming: A Tutorial by Budi Kurniawan

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 26. Zero Configuration

Struts configuration is easy, but it is possible not to have to configure at all. In other words, zero configuration. Instead of mapping actions and results in the struts.xml file, you annotate the action class. And if you’re tired of annotating, you can use the CodeBehind plug-in to handle that for you.

Note

Appendix C, “Annotations” explains annotations.

This chapter explains zero configuration and the CodeBehind plug-in.

Conventions

Since you will not have a configuration file if you decide to go the zero configuration way, you will need to tell Struts how to find your action classes. You do this by telling Struts the Java packages of the action classes used in your application by including, in your web.xml file, an ...

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