You can get Request and Response object in Web Dynpro Java using this:
IWDProtocolAdapter adapter = WDProtocolAdapter.getProtocolAdapter();
HttpServletRequest request =
(HttpServletRequest) adapter.getRequestObject().getProtocolRequest();
HttpServletResponse response =
(HttpServletResponse) adapter.getResponseObject().getProtocolResponse();
IWDProtocolAdapter adapter = WDProtocolAdapter.getProtocolAdapter();
HttpServletRequest request =
(HttpServletRequest) adapter.getRequestObject().getProtocolRequest();
HttpServletResponse response =
(HttpServletResponse) adapter.getResponseObject().getProtocolResponse();