Get HttpServletResponse Struts 2

Get HttpServletResponse Struts 2

There two ways you could access HttpServletResponse Struts 2 by using ServletActionContext or by implementing ServletResponseAware interface and implements its setServletResponse method.

  • Using┬áServletActionContext:

  • Access this method:

Get HttpServletResponse Struts 2

  • By implementing ServletResponseAware interface

  • Access this method:

Get HttpServletResponse Struts 2

  • For more details about struts 2 annotation please visit its official site here

Leave a Reply

Your email address will not be published. Required fields are marked *