Class RequestContext
RequestContext aggregates state about the current request.-  Field SummaryFieldsModifier and TypeFieldDescriptionISCHttpServletRequestinstance for the current request.jakarta.servlet.http.HttpServletResponseHttpServletResponseinstance associated with this request
-  Method SummaryModifier and TypeMethodDescriptionstatic RequestContextinstance(jakarta.servlet.jsp.PageContext pageContext) Creates aRequestContextfrom a JSPPageContext.static RequestContextinstance(jakarta.servlet.ServletContext servletContext, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Creates aRequestContextfrom a ServletContext, ServletRequest and ServletResponse.static RequestContextinstance(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Creates aRequestContextfrom aServletRequestandServletResponse.static RequestContextinstance(jakarta.servlet.Servlet servlet, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Creates aRequestContextfrom aServlet,HttpServletRequestandHttpServletResponse.static RequestContextinstance(jakarta.servlet.Servlet servlet, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Writer out) static voidsetCacheControlHeader(jakarta.servlet.http.HttpServletResponse response, String value) Sets the Cache-Control HTTP response header directlyvoidsetCacheControlHeader(String value) Sets the Cache-Control HTTP response header directlyvoidsetCachePolicy(CachePolicy... directives) Sets the Cache-Control HTTP response headerstatic voidsetCachePolicy(jakarta.servlet.http.HttpServletResponse response, CachePolicy... directives) Sets the Cache-Control HTTP response header
-  Field Details-  requestISCHttpServletRequestinstance for the current request.
-  responsepublic jakarta.servlet.http.HttpServletResponse responseHttpServletResponseinstance associated with this request
 
-  
-  Method Details-  instanceCreates aRequestContextfrom a JSPPageContext.- Parameters:
- pageContext- the page context to use for creating the RequestContext
- Returns:
- the new RequestContext
- Throws:
- Exception
- See Also:
 
-  instancepublic static RequestContext instance(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) throws Exception Creates aRequestContextfrom aServletRequestandServletResponse.- Parameters:
- request- the ServletRequest
- response- the ServletResponse
- Returns:
- the new RequestContext
- Throws:
- Exception
- See Also:
 
-  instancepublic static RequestContext instance(jakarta.servlet.Servlet servlet, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws Exception Creates aRequestContextfrom aServlet,HttpServletRequestandHttpServletResponse.- Parameters:
- servlet- the servlet
- request- the HttpServletRequest
- response- the HttpServletResponse
- Throws:
- Exception
- See Also:
 
-  instancepublic static RequestContext instance(jakarta.servlet.Servlet servlet, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Writer out) throws Exception - Parameters:
- servlet- the Servlet
- request- the HttpServletRequest
- response- the HttpServletResponse
- out- the output writer
- Returns:
- the new RequestContext
- Throws:
- Exception
- See Also:
 
-  instancepublic static RequestContext instance(jakarta.servlet.ServletContext servletContext, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) throws Exception Creates aRequestContextfrom a ServletContext, ServletRequest and ServletResponse.Important Note 
 Before we explain the benefits of creating your own RequestContext please take note that only one instance of this must be created and passed along during a requests life-cycle. In normal circumstances one will be created through theIDACallservlet and there will be no need for you to handle this explicitly.A typical use case for explicitly creating a RequestContext is is you've implemented your own standalone servlet which does not extend IDACalland you require the servlet request/response to be available further down the request chain such as in a DMI call you might issue from your servlet. This could be useful when passing session related data down to your DMI implementations for instance. Once you've created a RequestContext you simply set it on yourDSRequestorRPCRequestusingsetContext(requestContext).- Parameters:
- servletContext- the servlet context.
- request- the servlet request.
- response- the servlet response.
- Returns:
- a RequestContext.
- Throws:
- Exception
- See Also:
 
-  setCachePolicySets the Cache-Control HTTP response header- Parameters:
- directives- an array of- CachePolicyresponse directives
- Throws:
- Exception
 
-  setCachePolicypublic static void setCachePolicy(jakarta.servlet.http.HttpServletResponse response, CachePolicy... directives) Sets the Cache-Control HTTP response header- Parameters:
- response-- HttpServletResponseto set header to
- directives- an array of- CachePolicyresponse directives
 
-  setCacheControlHeaderSets the Cache-Control HTTP response header directly- Parameters:
- value-- Stringof response directives
- Throws:
- Exception
 
-  setCacheControlHeaderpublic static void setCacheControlHeader(jakarta.servlet.http.HttpServletResponse response, String value) Sets the Cache-Control HTTP response header directly- Parameters:
- response-- HttpServletResponseto set header to
- value-- Stringof response directives
 
 
-