Class GetPageContext.PageContext

java.lang.Object
ortus.boxlang.web.bifs.GetPageContext.PageContext
Enclosing class:
GetPageContext

public class GetPageContext.PageContext extends Object
Fake PageContext class to provide common methods since we are NOT in a servlet container
  • Constructor Details

    • PageContext

      public PageContext(ortus.boxlang.runtime.context.IBoxContext context)
  • Method Details

    • getResponse

      public GetPageContext.PageContext getResponse()
      Returns the current context object. This method is provided for backward compatibility
      Returns:
    • getRequest

      public GetPageContext.PageContext getRequest()
      Returns the current request object. This method is provided for backward compatibility
      Returns:
    • setHeader

      public void setHeader(String name, String value)
      Sets a response header. If the response has already been started, this method does nothing.
      Parameters:
      name -
      value -
    • setContentType

      public void setContentType(String value)
      Sets the response content type header. If the response has already been started, this method does nothing.
      Parameters:
      value -
    • setStatus

      public void setStatus(Double code, String text)
    • setStatus

      public void setStatus(Double code)
    • setStatus

      public void setStatus(int code, String text)
      Sets the response status code and message. If the response has already been started, this method does nothing.
      Parameters:
      code -
      text -
    • setStatus

      public void setStatus(int code)
      Sets the response status code.
      Parameters:
      code -
    • getStatus

      public int getStatus()
      Returns the current response status code. This method is provided for backward compatibility
      Returns:
    • reset

      public void reset()
      Clears the response buffer, if any, and resets the response status code and headers.
    • clearBuffer

      public void clearBuffer()
      Clears the response buffer, if any, and resets the response status code and headers. This method is provided for backward compatibility
    • resetHTMLHead

      public void resetHTMLHead()
      Clears the response buffer, if any, and resets the response status code and headers.
    • getOut

      public GetPageContext.PageContext getOut()
      Returns the current PageContext object. This method is provided for backward compatibility
      Returns:
    • hasFamily

      public Boolean hasFamily()
    • getRequestURL

      public StringBuffer getRequestURL()
      Returns the request URL as a StringBuffer. This is the full URL
      Returns:
    • getContentType

      public String getContentType()
    • addHeader

      public void addHeader(String name, String value)
      Adds a response header to the response. If the response has already been committed, this method does nothing.
      Parameters:
      name -
      value -
    • getResponseHeaderMap

      public Map<String,String[]> getResponseHeaderMap()
      Returns a map of all the response headers.
      Returns:
    • getResponseHeader

      public String getResponseHeader(String name)
      Returns the value of the specified response header as a String.
      Parameters:
      name -
      Returns:
    • getRequestHeaderMap

      public Map<String,String[]> getRequestHeaderMap()
      Returns a map of all the request headers.
      Returns:
    • getRequestHeader

      public String getRequestHeader(String name)
      Returns the value of the specified request header as a String.
      Parameters:
      name -
      Returns:
    • getHeader

      public String getHeader(String name)
      Alias for getRequestHeader - for compat
      Parameters:
      name -
      Returns:
    • isCommitted

      public boolean isCommitted()
      Returns a boolean indicating if the response has been committed. A committed response has already had its status code and headers written.
      Returns:
      a boolean indicating if the response has been committed