You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

A base configuration file named struts-default.xml is included in the struts2.jar file. This file may be included at the top of your struts.xml file to include the standard configuration settings without having to copy them. Here's an example:

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
    <include file="struts-default.xml"/>

    <package name="default" extends="struts-default">
    ...
    </package>
</struts>

The contents of struts-default.xml are here:

Error formatting macro: snippet: java.lang.NullPointerException

This file defines all of the default bundled results and interceptors and many interceptor stacks which you can use either as-is or as a basis for your own application-specific interceptor stacks. Notice the name of the package is "struts-default".

  • No labels