# Deprecated API

## Contents

- Deprecated Interfaces
- Deprecated Classes
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors

- Deprecated Interfaces
  Interface and Description
  org.apache.struts2.interceptor.ApplicationAware please use `ApplicationAware` instead
  org.apache.struts2.interceptor.CookiesAware please use `CookiesAware` instead
  org.apache.struts2.interceptor.HttpParametersAware please use `ParametersAware` instead
  org.apache.struts2.interceptor.ParameterAware please use `ParametersAware` instead
  org.apache.struts2.interceptor.PrincipalAware please use `PrincipalAware` instead
  org.apache.struts2.interceptor.RequestAware please use `ParametersAware` instead
  org.apache.struts2.util.ServletContextAware please use `ServletContextAware` instead
  org.apache.struts2.interceptor.ServletRequestAware please use `ServletRequestAware` instead
  org.apache.struts2.interceptor.ServletResponseAware please use `ServletResponseAware` instead
  org.apache.struts2.interceptor.SessionAware use `SessionAware`

- Deprecated Classes
  Class and Description
  com.opensymphony.xwork2.util.reflection.ReflectionProviderFactory inject RefectionProvider directly
  com.opensymphony.xwork2.inject.util.Strings

- Deprecated Fields
  Field and Description
  com.opensymphony.xwork2.ActionContext.ACTION_INVOCATION scope will be narrowed to "private", use helper methods instead
  com.opensymphony.xwork2.ActionContext.ACTION_NAME scope will be narrowed to "private", use helper methods instead
  com.opensymphony.xwork2.ActionContext.APPLICATION scope will be narrowed to "private", use helper methods instead
  com.opensymphony.xwork2.ActionContext.CONTAINER scope will be narrowed to "private", use helper methods instead
  com.opensymphony.xwork2.ActionContext.CONVERSION_ERRORS scope will be narrowed to "private", use helper methods instead
  com.opensymphony.xwork2.ActionContext.LOCALE scope will be narrowed to "private", use helper methods instead
  com.opensymphony.xwork2.ActionContext.PARAMETERS scope will be narrowed to "private", use helper methods instead
  com.opensymphony.xwork2.ActionContext.SESSION scope will be narrowed to "private", use helper methods instead
  org.apache.struts2.StrutsConstants.STRUTS_ENABLE_OGNL_EVAL_EXPRESSION as of 6.0.0. Use `StrutsConstants.STRUTS_OGNL_ENABLE_EVAL_EXPRESSION` instead.
  org.apache.struts2.StrutsConstants.STRUTS_ENABLE_OGNL_EXPRESSION_CACHE as of 6.0.0. Use `StrutsConstants.STRUTS_OGNL_ENABLE_EXPRESSION_CACHE` instead.
  org.apache.struts2.StrutsConstants.STRUTS_LOG_MISSING_PROPERTIES as of 6.0.0. Use `StrutsConstants.STRUTS_OGNL_LOG_MISSING_PROPERTIES` instead.
  org.apache.struts2.StrutsConstants.STRUTS_MAPPER_ACTION_PREFIX_CROSSNAMESPACES it will be removed soon, please refactor your application
  org.apache.struts2.StrutsConstants.STRUTS_OBJECTFACTORY_SPRING_ENABLE_AOP_SUPPORT
  com.opensymphony.xwork2.conversion.TypeConverter.TYPE_CONVERTER_CONTEXT_KEY
  com.opensymphony.xwork2.ActionContext.VALUE_STACK scope will be narrowed to "private", use helper methods instead

- Deprecated Methods
  Method and Description
  org.apache.struts2.interceptor.csp.CspSettings.addCspHeaders(HttpServletResponse) use `CspSettings.addCspHeaders(HttpServletRequest, HttpServletResponse)` instead
  org.apache.struts2.views.util.UrlHelper.buildParametersString(Map<String, Object>, StringBuilder, String) since Struts 6.1.0, use `QueryStringBuilder` instead
  org.apache.struts2.views.util.DefaultUrlHelper.buildParametersString(Map<String, Object>, StringBuilder, String) since Struts 6.1.0, use `QueryStringBuilder` instead
  org.apache.struts2.views.util.DefaultUrlHelper.buildParametersString(Map<String, Object>, StringBuilder, String, boolean) since Struts 6.1.0, use `DefaultUrlHelper.buildParametersString(Map, StringBuilder, String)`
  com.opensymphony.xwork2.inject.util.Strings.capitalize(String)
  com.opensymphony.xwork2.util.StrutsLocalizedTextProvider.clearDefaultResourceBundles() used only in tests
  org.apache.struts2.views.util.DefaultUrlHelper.decode(String) since 6.1.0, use `UrlDecoder` directly, use `Inject` to inject a proper instance
  org.apache.struts2.views.util.DefaultUrlHelper.decode(String, boolean) since 6.1.0, use `UrlDecoder` directly, use `Inject` to inject a proper instance
  org.apache.struts2.views.util.DefaultUrlHelper.encode(String) since 6.1.0, use `UrlEncoder` directly, use `Inject` to inject a proper instance
  org.apache.struts2.ServletActionContext.getContext() Use `ServletActionContext.getActionContext()` instead
  com.opensymphony.xwork2.util.StrutsLocalizedTextProvider.localeFromString(String, Locale) please use `LocaleUtils.toLocale(String)`
  org.apache.struts2.views.util.UrlHelper.parseQueryString(String, boolean) since 6.1.0, use `QueryStringParser` directly, use `Inject` to inject a proper instance
  org.apache.struts2.views.util.DefaultUrlHelper.parseQueryString(String, boolean) since 6.1.0, use `QueryStringParser` directly, use `Inject` to inject a proper instance
  com.opensymphony.xwork2.ActionContext.setActionInvocation(ActionInvocation) use `ActionContext.withActionInvocation(ActionInvocation)` instead
  org.apache.struts2.dispatcher.mapper.DefaultActionMapper.setAllowActionCrossNamespaceAccess(String) since 6.1.0 - please refactor your application to avoid using this functionality
  org.apache.struts2.interceptor.ApplicationAware.setApplication(Map<String, Object>) please use `ApplicationAware.withApplication(Map)` instead
  com.opensymphony.xwork2.ActionContext.setApplication(Map<String, Object>) use `ActionContext.withApplication(Map)` instead
  org.apache.struts2.views.jsp.ui.AbstractUITag.setClass(String) Use `AbstractUITag.setCssClass(String)` instead
  com.opensymphony.xwork2.ActionContext.setContainer(Container) use `ActionContext.withContainer(Container)` instead
  com.opensymphony.xwork2.ActionContext.setConversionErrors(Map<String, ConversionData>) use `ActionContext.withConversionErrors(Map)` instead
  org.apache.struts2.interceptor.CookiesAware.setCookiesMap(Map<String, String>) please use `CookiesAware.withCookies(Map)` instead
  com.opensymphony.xwork2.ActionContext.setLocale(Locale) use `ActionContext.withLocale(Locale)` instead
  com.opensymphony.xwork2.ActionContext.setName(String) use `ActionContext.withActionName(String)` instead
  org.apache.struts2.interceptor.HttpParametersAware.setParameters(HttpParameters) please use `ParametersAware.withParameters(HttpParameters)` instead
  org.apache.struts2.interceptor.PrincipalAware.setPrincipalProxy(PrincipalProxy) please use `PrincipalAware.withPrincipalProxy(PrincipalProxy)` instead
  org.apache.struts2.interceptor.RequestAware.setRequest(Map<String, Object>) please use `ParametersAware.withParameters(HttpParameters)` instead
  org.apache.struts2.util.ServletContextAware.setServletContext(ServletContext) please use `ServletContextAware.withServletContext(ServletContext)` instead
  org.apache.struts2.interceptor.ServletRequestAware.setServletRequest(HttpServletRequest) please use `ServletRequestAware.withServletRequest(HttpServletRequest)`
  org.apache.struts2.interceptor.ServletResponseAware.setServletResponse(HttpServletResponse) please use `ServletResponseAware.withServletResponse(HttpServletResponse)` instead
  org.apache.struts2.interceptor.SessionAware.setSession(Map<String, Object>) please use `SessionAware.withSession(Map)`
  com.opensymphony.xwork2.ActionContext.setSession(Map<String, Object>) use `ActionContext.withSession(Map)` instead
  com.opensymphony.xwork2.ActionContext.setValueStack(ValueStack) Use `ActionContext.withValueStack(ValueStack)` instead

- Deprecated Constructors
  Constructor and Description
  com.opensymphony.xwork2.config.impl.AbstractMatcher(PatternMatcher<?>) use @{link `AbstractMatcher(PatternMatcher, boolean)` instead
  com.opensymphony.xwork2.validator.DelegatingValidatorContext(Class) will be removed, do not use!
  com.opensymphony.xwork2.ognl.OgnlUtil() It is recommended to utilize the {@link OgnlUtil#OgnlUtil(com.opensymphony.xwork2.ognl.ExpressionCacheFactory, com.opensymphony.xwork2.ognl.BeanInfoCacheFactory) method instead.
  org.apache.struts2.config.StrutsXmlConfigurationProvider(boolean)

Copyright © 2000–2022 Apache Software Foundation. All rights reserved.