request « Seam « JSF Q&A





1. Emulating several JSF request in unit test    seamframework.org

2. Non JSF request. Injected hibernateSession is NULL.    seamframework.org

public void doPost( final HttpServletRequest request, final HttpServletResponse response) throws ServletException{ new ContextualHttpServletRequest() { @Override public void process() { HttpSession session = request.getSession(); ServerResponse res = null; String reqType = request.getHeader(ServerDefinitions.REQUEST_TYPE); System.out.println("----------- reqType: "+reqType); String contentLen = request.getHeader(ServerDefinitions.CONTENT_LENGTH); System.out.println("Request content Length :" + contentLen); String sessID = request.getHeader(ServerDefinitions.SESSION_ID); is = request.getInputStream(); byte[] by = new byte[BUFFER_SIZE]; int noOfBytes = 0; StringBuffer ...