Class GenericWebAppController

    • Field Detail

      • SESSION_SESSION_MANAGER

        protected static final java.lang.String SESSION_SESSION_MANAGER
        The key to use for the Session Manager.
        See Also:
        Constant Field Values
      • _pageManager

        protected PageManager _pageManager
        Deprecated.
        Get the pageManager from AppContext.getPageManager() or directly from the ConfigurationFilesCache.
        This used to be the instance of the PageManager used by this Controller. The Controller would initialized this instance in the initializeApp method, keep a reference and then assign it to the AppContext on every request.

        Now all configuration files are cached by the ConfigurationFilesCache, so if you need to access the page config, you can get a reference (based on the file path) from this Cache. The AppContextImpl will automatically try to get the PageManager from the Cache if a PageManager is not explicitly set.
      • _globalAppContext

        protected AppContext _globalAppContext
      • _messagesManager

        protected MessagesManager _messagesManager
        Deprecated.
        Get the pageManager from BeanContext.getMessagesManager() or directly from the ConfigurationFilesCache.
        This used to be the instance of the MessagesManager used by this Controller. The Controller would initialized this instance in the initializeApp method, keep a reference and then assign it to the AppContext on every request.

        Now all configuration files are cached by the ConfigurationFilesCache, so if you need to access the page config, you can get a reference (based on the file path) from this Cache. The AppContextImpl will automatically try to get the MessagesManager from the Cache if a PageManager is not explicitly set.
      • _styleCatalog

        protected StyleCatalog _styleCatalog
        Deprecated.
        Get the style catalog from BeanContext.getStyleCatalog() or directly from the ConfigurationFilesCache.
        This used to be the instance of the StyleCatalog used by this Controller. The Controller would initialized this instance in the initializeApp method, keep a reference and then assign it to the AppContext on every request.

        Now all configuration files are cached by the ConfigurationFilesCache, so if you need to access the style catalog, you can get a reference (based on the file path) from this Cache. The AppContextImpl will automatically try to get the StyleCatalog from the Cache if a StyleCatalog is not explicitly set.
      • _defaultEvent

        protected int _defaultEvent
      • _reloadConfigFiles

        protected boolean _reloadConfigFiles
      • _configServletPath

        protected java.lang.String _configServletPath
      • _xhrJSP

        protected java.lang.String _xhrJSP
        Since:
        MicroStrategy Web 9.0.1
      • _iframeJSP

        protected java.lang.String _iframeJSP
      • _iserverPollingFreq

        protected java.lang.String _iserverPollingFreq
      • _servletPath

        protected java.lang.String _servletPath
        Deprecated.
        This variable should be marked private and will be removed in future versions of the product. You can call BeanContext.getServletPath() instead.
      • _pageConfigLastModified

        protected long _pageConfigLastModified
        Deprecated.
        the pageConfig will take care itself to reload if necessary.
      • _styleCatalogLastModified

        protected long _styleCatalogLastModified
        Deprecated.
        the styleCatalog will take care itself to reload if necessary.
      • _messagesLastModified

        protected long _messagesLastModified
        Deprecated.
        MessagesBundle will take care themselves to reload if necessary.
    • Constructor Detail

      • GenericWebAppController

        public GenericWebAppController()
    • Method Detail

      • initializeApp

        public void initializeApp​(ContainerServices cs)
        Description copied from interface: AppController
        Initialize our web application. Save all persistent data structures back into the implementation class as private data members.
      • processRequest

        public boolean processRequest​(RequestState reqState)
        Description copied from interface: AppController
        Handle an incoming HTTP Request. The state of the incoming request is saved back into the RequestState object for later review by the controller.
        Returns:
        boolean
      • getDefaultURLLink

        protected java.lang.String getDefaultURLLink​(ServletWebComponent servletWebComponent)
      • errorAfterRedirect

        public void errorAfterRedirect​(RequestState reqState,
                                       java.lang.Exception e)
        Description copied from interface: AppController
        Inform the application that the request has failed inside the redirected page
      • getPage

        public java.lang.String getPage​(RequestState reqState)
        Description copied from interface: AppController
        Get the page to redirect to. Must handle the case that an error was found before redirection. In such a case, the page returned should be an error page.
        Returns:
        String
      • getBaseURL

        public java.lang.String getBaseURL​(ContainerServices cs)
        Description copied from interface: AppController
        Returns the root name to use on event links and as the action of the forms generated by the application
        Returns:
        String
      • newExternalSecurity

        public ExternalSecurity newExternalSecurity()
        Description copied from interface: AppController
        Creates new instance of the ExternalSecurity component to be used for authenticating and authorizing users on each of their requests.
        Returns:
        new instance of the ExternalSecurity component.
      • terminateApp

        public void terminateApp()
        Description copied from class: AppControllerImpl
        Subclasses that override this method should invoke this via super.terminateApp to ensure threads and other application related resources are cleaned up properly.
        Specified by:
        terminateApp in interface AppController
        Overrides:
        terminateApp in class AppControllerImpl
      • createNewAppContext

        public AppContext createNewAppContext​(ContainerServices cs,
                                              boolean externalApp)
        Creates a new AppContextInstance.
        Parameters:
        cs - The ContainerServices instance of the caller.
        externalApp - If this is being called from an external application (one other than MicroStrategy Web), then the following properties are set on the new instance:
        • styleCatalog
        • pageManager
        • messagesManager
        This allows the external application to reuse the settings of the MicroStrategy Web application.
      • getLastModifiedTime

        protected long getLastModifiedTime​(AppContext appContext,
                                           java.lang.String param)
        Deprecated.
        No longer used by the MicroStrategy Web controllers.
        Gets teh last modified time of a resource.
        Parameters:
        appContext - The AppContext to use for resolving resource parameters.
        param - The name of the resource to check.
        Returns:
        A long value for the last modified time.
      • addStandardCacheHeaders

        protected void addStandardCacheHeaders​(ContainerServices cs)
      • extractParameterFromURL

        public java.lang.String extractParameterFromURL​(java.lang.String url,
                                                        java.lang.String parameterName)
      • validateRandomNum

        protected void validateRandomNum​(ContainerServices cs,
                                         AppContext appContext)
                                  throws WebException
        Checks if validateRandNum token contains correct value if CSRF protection is enabled Places results in CSRFError httpsession attribute Enforcement of CSRFError httpsession attribute is in ServletEventHandlerImpl
        Parameters:
        cs -
        appContext -
        Throws:
        WebException