Class ServletResponse

    • Field Detail

      • value

        protected String value
      • contentType

        protected String contentType
      • encoding

        protected String encoding
      • binValue

        protected byte[] binValue
      • forceDownload

        protected boolean forceDownload
      • httpStatusCode

        protected int httpStatusCode
    • Method Detail

      • setValue

        public void setValue​(String value)
      • getType

        public EResponseType getType()
        Specified by:
        getType in interface IServletResponse
        Returns:
        The type of response, such as whether a plain text or binary file should be returned, or a redirect should be performed.
      • setBinValue

        public void setBinValue​(byte[] binValue)
        Setter des byteValue
        Parameters:
        binValue - Byte-Array der zu setzende binValue
      • isForceDownload

        public boolean isForceDownload()
        Description copied from interface: IServletResponse
        Specified by:
        isForceDownload in interface IServletResponse
        Returns:
        If true, attempts to prevent browsers from showing the binary content inline. If false, the browser may show the content inline, which is useful for PDF, image or plain text files. Please note that support for this differs between browsers.
      • setForceDownload

        public void setForceDownload​(boolean forceDownload)
      • setEncoding

        public void setEncoding​(String encoding)
      • getHttpStatusCode

        public int getHttpStatusCode()
        Specified by:
        getHttpStatusCode in interface IServletResponse
        Returns:
        The HTTP status code of the HTTP response.
      • setHttpStatusCode

        public void setHttpStatusCode​(int httpStatusCode)
      • getContentType

        public String getContentType()
        Description copied from interface: IServletResponse
        Applies only when IServletResponse.getType() is set to EResponseType.SHOW_FILE:

        Must return the content type (=mime type) that is to be sent along with the binary data. When this is either null or blank, an attempt is made to guess the content type from the binary data. Please note that this may fail to determine the actual content type, you should always provide a content type.

        Specified by:
        getContentType in interface IServletResponse
        Returns:
        The content type of the binary data.
      • setContentType

        public void setContentType​(String contentType)
      • setSessionAttributes

        public void setSessionAttributes​(Map<String,​Serializable> sessionAttributes)
      • setHttpHeader

        public void setHttpHeader​(Map<String,​String> httpHeader)
        Parameters:
        httpHeader - the httpHeader to set
      • addHttpHeader

        public void addHttpHeader​(String name,
                                  String value)
        Adds an HTTP header with the given name. When a value exists already for that name, it is overwritten.
        Parameters:
        name - Name of the header.
        value - Value of the header.