Class EncodingVelocityResult

  • All Implemented Interfaces:
    com.opensymphony.xwork2.Result, Serializable, org.apache.struts2.StrutsStatics

    public class EncodingVelocityResult
    extends com.atlassian.xwork.results.ProfiledVelocityResult
    Struts Velocity result that adds automatic HTML entity encoding support to the result context if the final content type is "text/html".
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.apache.struts2.result.StrutsResultSupport

        DEFAULT_PARAM, DEFAULT_URL_ENCODING, parseLocation
      • Fields inherited from interface org.apache.struts2.StrutsStatics

        ACTION_MAPPING, HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION, STRUTS_PORTLET_CONTEXT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.velocity.context.Context createContext​(org.apache.struts2.views.velocity.VelocityManager velocityManager, com.opensymphony.xwork2.util.ValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String location)  
      void doExecute​(String location, com.opensymphony.xwork2.ActionInvocation invocation)  
      • Methods inherited from class com.atlassian.xwork.results.ProfiledVelocityResult

        getTemplate
      • Methods inherited from class org.apache.struts2.views.velocity.result.VelocityResult

        getContentType, getEncoding, setDefaultEncoding, setVelocityManager
      • Methods inherited from class org.apache.struts2.result.StrutsResultSupport

        conditionalParse, conditionalParseCollection, execute, getLastFinalLocation, getLocation, setEncode, setLocation, setParse
    • Constructor Detail

      • EncodingVelocityResult

        public EncodingVelocityResult()
    • Method Detail

      • createContext

        protected org.apache.velocity.context.Context createContext​(org.apache.struts2.views.velocity.VelocityManager velocityManager,
                                                                    com.opensymphony.xwork2.util.ValueStack stack,
                                                                    javax.servlet.http.HttpServletRequest request,
                                                                    javax.servlet.http.HttpServletResponse response,
                                                                    String location)
        Overrides:
        createContext in class org.apache.struts2.views.velocity.result.VelocityResult
      • doExecute

        public void doExecute​(String location,
                              com.opensymphony.xwork2.ActionInvocation invocation)
                       throws Exception
        Overrides:
        doExecute in class com.atlassian.xwork.results.ProfiledVelocityResult
        Throws:
        Exception