What is the difference between ServletContext and ServletActionContext

Please tell me what is the difference between ServletActionContext and ServletContext ? ServletContext shared between all servlets and actions, and is the ServletActionContext specific to the action or is it also common to all actions?

+6
source share
2 answers

These are different things. ServletContext is associated with the servlet, ActionContext is associated with the Struts 2 action, ServletActionContext extends ActionContext , but basically it is a utility class.

If you want to know what the action context is .

+2
source

ServletConfig Object:

  • This is one of our Servlet class objects.
  • The servlet container creates this either during server startup or during web application deployment based on the Servlet configuration made in the web-xml file
  • This is the object of the container supplied in the servlet container, which provides a java class that implements java.servlet.ServletCongfig (I).
0
source

Source: https://habr.com/ru/post/950415/


All Articles