Access servlet container
Scooter allows controller class to access servlet container directly by just doing a static import of the ActionControl class in the controller.
import static com.scooterframework.web.controller.ActionControl.*;
Actually since the methods are static, you can access servlet container from virtually any classes or JSP views.
The following methods are available:
public static HttpServletRequest getHttpServletRequest(); public static HttpServletResponse getHttpServletResponse(); public static ServletContext getServletContext(); //Get data from different scopes public static Object getFromGlobalData(String key); public static Object getFromContextData(String key); public static Object getFromSessionData(String key); public static Object getFromRequestData(String key) public static Object getFromParameterData(String key); public static Object getFromThreadData(String key); //Set data to different scopes public static void storeToGlobal(String key, Object obj); public static void storeToContext(String key, Object obj); public static void storeToSession(String key, Object obj); public static void storeToRequest(String key, Object obj); public static void storeToThread(String key, Object obj); //Remove data from different scopes public static void removeFromGlobalData(String key); public static void removeFromContextData(String key); public static void removeFromSessionData(String key); public static void removeFromRequestData(String key); public static void removeFromThreadData(String key); public static void remove(String key);