Examples of WGARequestInformation


Examples of de.innovationgate.wgpublisher.log.WGARequestInformation

    }

    private void dispatchStaticTmlRequest(WGPRequestPath path, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception {

        // do not static requests
        WGARequestInformation info = (WGARequestInformation) request.getAttribute(WGARequestInformation.REQUEST_ATTRIBUTENAME);
        if (info != null) {
            info.setType(WGARequestInformation.TYPE_STATIC);
        }

        // Fetch the database
        WGDatabase database = path.getDatabase();
        String contentKey = path.getContentKey();
View Full Code Here

Examples of de.innovationgate.wgpublisher.log.WGARequestInformation

  /* (Kein Javadoc)
   * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
   */
  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    WGARequestInformation info = new WGARequestInformation();
    try {
      info.setStartTime(System.currentTimeMillis());
      request.setAttribute(WGARequestInformation.REQUEST_ATTRIBUTENAME, info);
     
      _wgaFilterChain.init(request, chain);                 
     
      _currentRequests.put(request, info);
     
          // F000037B2
          if (_core.getCharacterEncoding() != null) {
              request.setCharacterEncoding(_core.getCharacterEncoding());
              // B000041DA
              response.setCharacterEncoding(_core.getCharacterEncoding());           
          }
                 
         
         HttpServletResponse wrappedResponse =  new FinalCharacterEncodingResponseWrapper((HttpServletResponse)response);     
        
         if (((HttpServletRequest)request).getMethod().equalsIgnoreCase("GET")) {
            HttpServletRequest wrappedRequest = new GETRequestWrapper((HttpServletRequest)request, _core.getCharacterEncoding());
            _wgaFilterChain.doFilter(wrappedRequest, wrappedResponse);
         } else {
            _wgaFilterChain.doFilter(request, wrappedResponse);
         }
       
         info.setStatusCode(((FinalCharacterEncodingResponseWrapper)wrappedResponse).getStatusCode());
         info.setStatusMessage(((FinalCharacterEncodingResponseWrapper)wrappedResponse).getStatusMessage());        
    }
    catch (ServletException e) {
      info.setStatusCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        info.setStatusMessage(e.getMessage());
        throw e;
    }
    finally {
      info.setEndTime(System.currentTimeMillis())
         try {
        WGALoggerWrapper logger = _core.getAccessLogger();
           if (logger != null) {
             logger.logRequest(request);
           }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.