Package com.sun.enterprise.deployment.web

Examples of com.sun.enterprise.deployment.web.MimeMapping


     */
    protected static void configureMimeMapping(WebModule webModule,
                                               WebBundleDescriptor wmd) {
                                                       
        Enumeration enumeration = wmd.getMimeMappings();
        MimeMapping mimeMapping;
        while (enumeration.hasMoreElements()){
            mimeMapping = (MimeMapping)enumeration.nextElement();
            webModule.addMimeMapping(mimeMapping.getExtension(),
                                     mimeMapping.getMimeType());           
        }
                                                       
    }
View Full Code Here


    public void addMimeMapping(MimeMapping mimeMapping) {
        // always override
        // Since Set.add API doesn't replace
        // remove the element first if it's already contained
  for (Iterator itr = getMimeMappingsSet().iterator(); itr.hasNext();) {
      MimeMapping mm = (MimeMapping) itr.next();
      if (mm.getExtension().equals(mimeMapping.getExtension())) {
    getMimeMappingsSet().remove(mm);  
                break;
      }
        }
  this.getMimeMappingsSet().add(mimeMapping);
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.web.MimeMapping

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.