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

Appendix A. Struts Configuration

The two main configuration files in a Struts application are the struts.xml and the struts.properties files. The former registers interceptors and result types as well as maps action with action classes and results. The latter specifies other aspects of the application, such as the default theme and whether or not the application is in development mode. This appendix is a complete guide to writing the two configuration files.

The struts.xml File

A struts.xml file always contains this DOCTYPE element, which indicates that it complies with the type definitions specified in the struts-2.0.dtd file.

<LINELENGTH>90</LINELENGTH>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> ...

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