Package org.mortbay.jetty

Examples of org.mortbay.jetty.MimeTypes


            next = new ComponentContextHandler(next, this.componentContext);
            webAppContext.setTwistyHandler(next);

            lifecycleChain = (AbstractImmutableHandler) next;
        }
        MimeTypes mimeTypes = new MimeTypes();
        mimeTypes.setMimeMap(mimeMap);
        webAppContext.setMimeTypes(mimeTypes);

        this.server = server;
        this.application = application;
        this.objectName = objectName;
View Full Code Here


        next = new ComponentContextHandler(next, enc);
        next = new InstanceContextHandler(next, unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator);
        lifecycleChain = (AbstractImmutableHandler) next;
        webAppContext.setHandler(next);

        MimeTypes mimeTypes = new MimeTypes();
        mimeTypes.setMimeMap(mimeMap);
        webAppContext.setMimeTypes(mimeTypes);
       
        this.server = server;
        this.application = application;
        this.objectName = objectName;
View Full Code Here

      final HttpServletResponse httpResponse = (HttpServletResponse) response;

      // Infer the content type based on the path of the request.
      String path = ((HttpServletRequest)request).getRequestURI();
      ContextHandler.SContext sContext = (ContextHandler.SContext)config.getServletContext();
      MimeTypes mimes = sContext.getContextHandler().getMimeTypes();
      Buffer mimeBuffer = mimes.getMimeByExtension(path);
      String mime = mimeBuffer != null ? mimeBuffer.toString() : "text/html";

      // If it is HTML (default), force the character set to utf-8.
      // This is to avoid the following security issue:
      // http://openmya.hacker.jp/hasegawa/security/utf7cs.html
View Full Code Here

     * URI. Returns null if unknown.
     */
    private String inferMimeType(ServletRequest request) {
      String path = ((HttpServletRequest)request).getRequestURI();
      ContextHandler.SContext sContext = (ContextHandler.SContext)config.getServletContext();
      MimeTypes mimes = sContext.getContextHandler().getMimeTypes();
      Buffer mimeBuffer = mimes.getMimeByExtension(path);
      return (mimeBuffer == null) ? null : mimeBuffer.toString();
    }
View Full Code Here

            //install another component context handler for the lifecycle chain
            next = new ComponentContextHandler(next, this.componentContext);
            lifecycleChain = (AbstractImmutableHandler) next;
        }
        MimeTypes mimeTypes = new MimeTypes();
        mimeTypes.setMimeMap(mimeMap);
        webAppContext.setMimeTypes(mimeTypes);

        this.server = server;
        this.application = application;
        this.objectName = objectName;
View Full Code Here

                current_thread.setContextClassLoader(_classLoader);
            }
           

            if (_mimeTypes==null)
                _mimeTypes=new MimeTypes();
           
            old_context=__context.get();
            __context.set(_scontext);
           
            if (_errorHandler==null)
View Full Code Here

            next = new ComponentContextHandler(next, this.componentContext);
            webAppContext.setTwistyHandler(next);

            lifecycleChain = (AbstractImmutableHandler) next;
        }
        MimeTypes mimeTypes = new MimeTypes();
        mimeTypes.setMimeMap(mimeMap);
        webAppContext.setMimeTypes(mimeTypes);

        this.server = server;
        this.application = application;
        this.objectName = objectName;
View Full Code Here

                current_thread.setContextClassLoader(_classLoader);
            }
           

            if (_mimeTypes==null)
                _mimeTypes=new MimeTypes();
           
            old_context=(SContext)__context.get();
            __context.set(_scontext);
           
            if (_errorHandler==null)
View Full Code Here

     */
    private String inferMimeType(ServletRequest request) {
      String path = ((HttpServletRequest)request).getRequestURI();
      ContextHandler.SContext sContext =
        (ContextHandler.SContext)config.getServletContext();
      MimeTypes mimes = sContext.getContextHandler().getMimeTypes();
      Buffer mimeBuffer = mimes.getMimeByExtension(path);
      return (mimeBuffer == null) ? null : mimeBuffer.toString();
    }
View Full Code Here

     * URI. Returns null if unknown.
     */
    private String inferMimeType(ServletRequest request) {
      String path = ((HttpServletRequest)request).getRequestURI();
      ContextHandler.SContext sContext = (ContextHandler.SContext)config.getServletContext();
      MimeTypes mimes = sContext.getContextHandler().getMimeTypes();
      Buffer mimeBuffer = mimes.getMimeByExtension(path);
      return (mimeBuffer == null) ? null : mimeBuffer.toString();
    }
View Full Code Here

TOP

Related Classes of org.mortbay.jetty.MimeTypes

Copyright © 2018 www.massapicom. 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.