Action Statics Changed

There were numerous constants declared in the Action class. Those static constants have been moved to a new class called org.apache.struts.Globals, shown in Example A-1.

Example A-1. The new Globals class

package org.apache.struts; import java.io.Serializable; public class Globals implements Serializable { public static final String ACTION_SERVLET_KEY = "org.apache.struts.action.ACTION_SERVLET"; public static final String APPLICATION_KEY = "org.apache.struts.action.MODULE"; public static final String CANCEL_KEY = "org.apache.struts.action.CANCEL"; public static final String MODULE_KEY = "org.apache.struts.action.MODULE"; public static final String DATA_SOURCE_KEY = "org.apache.struts.action.DATA_SOURCE"; public static final String ERROR_KEY = "org.apache.struts.action.ERROR"; public static final String EXCEPTION_KEY = "org.apache.struts.action.EXCEPTION"; public static final String FORM_BEANS_KEY = "org.apache.struts.action.FORM_BEANS"; public static final String FORWARDS_KEY = "org.apache.struts.action.FORWARDS"; public static final String LOCALE_KEY = "org.apache.struts.action.LOCALE"; public static final String MAPPING_KEY = "org.apache.struts.action.mapping.instance"; public static final String MAPPINGS_KEY = "org.apache.struts.action.MAPPINGS"; public static final String MESSAGE_KEY = "org.apache.struts.action.ACTION_MESSAGE"; public static final String MESSAGES_KEY = "org.apache.struts.action.MESSAGE"; public static final String MULTIPART_KEY = "org.apache.struts.action.mapping.multipartclass"; ...

Get Programming Jakarta Struts, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.