A.4 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";     public static final String PLUG_INS_KEY =         "org.apache.struts.action.PLUG_INS";     public static final String REQUEST_PROCESSOR_KEY =         "org.apache.struts.action.REQUEST_PROCESSOR";     public static final String SERVLET_KEY =         "org.apache.struts.action.SERVLET_MAPPING";     public static final String TRANSACTION_TOKEN_KEY =         "org.apache.struts.action.TOKEN";              public static final String XHTML_KEY =         "org.apache.struts.globals.XHTML"; }



Programming Jakarta Struts
Programming Jakarta Struts, 2nd Edition
ISBN: 0596006519
EAN: 2147483647
Year: 2003
Pages: 180

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net