Package com.tivoli.am.fim.fedmgr2.page
Class TemplateContextResponse
java.lang.Object
com.tivoli.am.fim.fedmgr2.page.TemplateContextResponse
This class is used as a template context response object.
Some request context is also included under
templateContext.request
This includes:
- HTTP Method
- Request path
- Headers
- Request parameters
- The query string
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
TemplateContextResponse
public TemplateContextResponse()
-
-
Method Details
-
write
Send content to the output streamExample templateContext.response.body.write("Hello") A macro can be retrieved and displayed to the output stream templateContext.macros["@TIMESTAMP@"]
- Parameters:
message
- message to be displayed
-
setHeader
Set response headerExample To set the response header Content-Type templateContext.response.setHeader("Content-Type","application/json")
- Parameters:
key
- header keyvalue
- header value
-
sendRedirect
Set response redirect urlExample To set the response redirect url templateContext.response.sendRedirect("https://www.ibm.com")
- Parameters:
url
- redirect url
-
setStatus
public void setStatus(int code) Set response status codeExample To set the response status code templateContext.response.setStatus(400)
- Parameters:
code
- status code
-