HttpSevlet의 Request와 Response 표시하기
doPost ( HttpServletRequest request, HttpServletResponse response ) { ... LOGGER.debug("#HttpServletRequest############################################################"); Enumeration headerNames = request.getHeaderNames(); while(headerNames.hasMoreElements()){ String name = (String)headerNames.nextElement(); String value = request.getHeader(name); LOGGER.debug("ServletRequest : " + name + " : " + value); } LOGGER.debug("#~HttpServletRequest###########################################################"); LOGGER.debug("#HttpServletResponse############################################################"); Collection<String> resheaderNames = response.getHeaderNames(); for (String headerName : resheaderNames) { Collection<String> values = response.getHeaders(headerName); LOGGER.debug("ServletResponse : " + headerName + " : " +values); } LOGGER.debug("#~HttpServletResponse###########################################################"); } |