Interface WebContext

All Known Implementing Classes:
J2EContext

public interface WebContext
This is interface for J2E context wrapper
Author:
Yuriy Movchan 11/14/2014
  • Method Details

    • getRequestParameter

      String getRequestParameter(String name)
      Return a request parameter
      Parameters:
      name -
      Returns:
      the request parameter
    • getRequestParameters

      Map<String,String[]> getRequestParameters()
      Return all request parameters
      Returns:
      all request parameters
    • getRequestHeader

      String getRequestHeader(String name)
      Return a request header
      Parameters:
      name -
      Returns:
      the request header
    • setSessionAttribute

      void setSessionAttribute(String name, Object value)
      Save an attribute in session
      Parameters:
      name -
      value -
    • getSessionAttribute

      Object getSessionAttribute(String name)
      Get an attribute from session
      Parameters:
      name -
      Returns:
      the session attribute
    • setRequestAttribute

      void setRequestAttribute(String name, Object value)
      Save an attribute in request
      Parameters:
      name -
      value -
    • getRequestAttribute

      Object getRequestAttribute(String name)
      Get an attribute from request
      Parameters:
      name -
      Returns:
      the request attribute
    • getRequestMethod

      String getRequestMethod()
      Return the request method
      Returns:
      the request method
    • writeResponseContent

      void writeResponseContent(String content) throws IOException
      Write some content in the response
      Parameters:
      content -
      Throws:
      IOException
    • setResponseHeader

      void setResponseHeader(String name, String value)
      Add a header to the response
      Parameters:
      name -
      value -
    • getServerName

      String getServerName()
      Return the server name
      Returns:
      the server name
    • getServerPort

      int getServerPort()
      Return the server port
      Returns:
      the server port
    • getScheme

      String getScheme()
      Return the scheme
      Returns:
      the scheme
    • getFullRequestURL

      String getFullRequestURL()
      Return the full URL (with query string) the client used to request the server
      Returns:
      the Url
    • sendRedirect

      void sendRedirect(String location) throws IOException
      Throws:
      IOException
    • getSession

      jakarta.servlet.http.HttpSession getSession(boolean create)