Previous Topic: HttpServletResponseNext Topic: Messages


Access Method

To use the HttpServletResponse object

  1. Design an External Action Block (EAB).
  2. Use the EAB in the Pstep or Action Block where access to the response is desired.
  3. Design the views and attributes to hold the information needed to set the request.
  4. Generate the EAB.
  5. Add the following in the EAB method where user code is expected:
    User written code should be inserted here.
    HttpServletResponse res = (HttpServletResponse)
    (iefRuntimeParm2.getResponse());
    
  6. As an example, to set a cookie, do the following:
    Cookie myCookie = new Cookie (name,value);
    res.addCookie(myCookie);
    
  7. Compile the application.