Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Aware Interfaces


Struts 2 Aware interfaces are used to put information into the request, response, context or session object.

The action class must implement these interfaces to store information so that it can be retrieved from other action class.

The four aware interfaces are:

  1. org.apache.struts2.interceptor.SessionAware
  2. org.apache.struts2.util.ServletContextAware
  3. org.apache.struts2.interceptor.ServletRequestAware
  4. org.apache.struts2.interceptor.ServletResponseAware

What is next?

ServletActionContext classHere, we will learn how to get request, response, context and session objects from another action class.

SessionAware Interface exampleHere, we will how to store and get information from the session scope.

ServletContextAware Interface exampleHere, we will how to store and get information from the application scope.

Comments

comments