Interface Environment

    • Field Detail

      • SESSION_TOKEN_VARIABLE

        static final String SESSION_TOKEN_VARIABLE
        The URL/Post variable that will store the session token. The session token is used to prevent Cross-site request forgery (CSRF) attacks.
        See Also:
        Constant Field Values
      • STEP_VARIABLE

        static final String STEP_VARIABLE
        The URL/Post variable that will store the step number. The step number is used to identify the request is from the most currently rendered view.
        See Also:
        Constant Field Values
      • STEP_ACTION_VARIABLE

        @Deprecated
        static final String STEP_ACTION_VARIABLE
        Deprecated.
        portal specific
        The URL/Post variable that will store the action step number. The action step number is used to identify the request is still related to the current action step.
        See Also:
        Constant Field Values
      • TARGET_ID

        static final String TARGET_ID
        The URL/Post variable that will identify a specific wcomponent to process the request. A request that includes this variable is called a targeted request. Targeted requests are used to return document content such as image data and PDFs. It is also used to support AJAX regions. Targeted requests are handled by the WContentHelperServlet.
        See Also:
        Constant Field Values
      • THEME_RESOURCE_PATH_NAME

        static final String THEME_RESOURCE_PATH_NAME
        The name of the theme path that indicates a theme resource has been requested.
        See Also:
        Constant Field Values
      • UNIQUE_RANDOM_PARAM

        static final String UNIQUE_RANDOM_PARAM
        The URL query string parameter variable name that is used to ensure that the URL appears unique to the browser. This is used to prevent caching of PDFs, TR5s etc by the client.
        See Also:
        Constant Field Values
    • Method Detail

      • getPostPath

        String getPostPath()
        Gets the relative URL path to which this WComponent application should post its requests.

        Examples of what this method may return:

        Servlet
        /app
        Returns:
        the relative URL path to which this WComponent application should post its requests.
      • setPostPath

        void setPostPath​(String postPath)
        Sets the relative URL path to which this WComponent application should post its requests.
        Parameters:
        postPath - the post path.
      • getWServletPath

        String getWServletPath()
        Gets the URL path for the WComponent support servlets, which handle serving content for Targetable WComponents, AJAX and data lists. There needs to be a servlet (WServlet) deployed to serve Targetable content. This method returns the URL to that servlet.

        Examples of what this method may return:

        Servlet
        /app
        Returns:
        the URL path suitable for serving the content of Targetable wcomponents.
      • getAppHostPath

        String getAppHostPath()
        Gets the base URL under which web applications are hosted. This AppHostPath can be used to create url links to applications that have been given fixed relative names.
        Returns:
        the base URL under which web applications are hosted.
      • getThemePath

        String getThemePath()
        Gets the base URL under which the web content for the Theme is hosted. Web content is static content such as css, js, html, and image files.
        Returns:
        the base URL under which the web content for the Theme is hosted.
      • getBaseUrl

        String getBaseUrl()
        Get the base url at which this web application is hosted.

        Implementations ensure that this method returns a URL WITHOUT a trailing slash, as in above example.

        Returns:
        the base url at which this web application is hosted.
      • getHostFreeBaseUrl

        String getHostFreeBaseUrl()
        Get the "host-free" part of the base url for this web application. Eg, if the base url is http://localhost:8080/visas, then the "host-free" part is "/visas".
        Returns:
        Get the "host-free" part of the base url for this web application.
      • getAppId

        @Deprecated
        String getAppId()
        Deprecated.
        no longer used. Use WApplication.getIdName() instead.
        Get a unique "app" id. This is intended to help with portals where multiple applications are present in the one document. The app id will be a machine generated unique identifier, but must not contain the character WComponent.ID_CONTEXT_SEPERATOR.
        Returns:
        the unique application id for this application.
      • getSessionToken

        String getSessionToken()
        Gets the session token. This is intended to make sure the request is for the correct session.
        Returns:
        the session token.
      • setSessionToken

        void setSessionToken​(String sessionToken)
        Sets the session token.
        Parameters:
        sessionToken - the session token.
      • getStep

        int getStep()
        Gets the page step number. This is intended to make sure the request being processed is on the correct step.
        Returns:
        the page step number.
      • setStep

        void setStep​(int step)
        Sets the step page number.
        Parameters:
        step - the step number.
      • getActionStep

        @Deprecated
        int getActionStep()
        Deprecated.
        portal specific
        Gets the page action step number. This is intended to make sure the request being processed is on the correct action step.
        Returns:
        the page action step number.
      • setActionStep

        @Deprecated
        void setActionStep​(int actionStep)
        Deprecated.
        portal specific
        Sets the page action step number.
        Parameters:
        actionStep - the step action number.
      • getHiddenParameters

        Map<String,​String> getHiddenParameters()
        Return a Map containing the hidden parameters that are needed for the WServlet to work correctly. Amongst these are the step number and the window id. This map may be mutated (ie, a new Map instance is created and returned). The map may have additional variables added, and it may be turned into a path using WebUtilities.getPath(java.lang.String, java.util.Map<java.lang.String, java.lang.String>)
        Returns:
        a Map containing the hidden parameters required by WServlet.
      • setFormEncType

        void setFormEncType​(String enctype)
        Sets the form encoding type, e.g. "multipart/form-data" when there are files being uploaded.
        Parameters:
        enctype - the encoding type.
      • getFormEncType

        String getFormEncType()
        Returns:
        the form encoding type.
      • getUserAgentInfo

        UserAgentInfo getUserAgentInfo()
        Returns:
        Details about the client browser.