'Creates SimpleHandlers from servlet and filter mappings in web.xml.'

def MakeServletPatternsIntoHandlers(self):

    handler_patterns = []
    has_jsps = self.has_jsps
    if self.fall_through:
        return [handler.SimpleHandler('/*', {'type': 'dynamic'})]
    for pattern in self.patterns:
        if pattern.endswith('.jsp'):
            has_jsps = True
        else:
            new_handler = handler.SimpleHandler(pattern, {'type': 'dynamic'})
            handler_patterns.append(new_handler)
            handler_patterns += self.CreateHandlerWithoutTrailingStar(new_handler)
    if (has_jsps or self.app_engine_web_xml.vm):
        handler_patterns.append(handler.SimpleHandler('*.jsp', {'type': 'dynamic'}))
    handler_patterns.append(handler.SimpleHandler('/_ah/*', {'type': 'dynamic'}))
    return handler_patterns
