Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

MappingHandlerFactory Class

MappingHandleryFactory allows for full Spring-managed <httpHandlers> configuration. It uses regular expressions for url matching.

For a list of all members of this type, see MappingHandlerFactory Members .


[Visual Basic]
Public Class MappingHandlerFactory
    Inherits AbstractHandlerFactory
public class MappingHandlerFactory : AbstractHandlerFactory

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


The example below shows, how to map all url requests to spring and let MappingHandlerFactory resolve urls to container-managed IHttpHandlerFactory or IHttpHandler objects.

// web.config

  <!-- map all requests to spring (just for demo - don't do this at home!) -->
  <add verb="*" path="*.*" type="Spring.Web.Support.MappingHandlerFactory, Spring.Web" />

// spring-objects.config

<object type="Spring.Web.Support.MappingHandlerFactoryConfigurer, Spring.Web">
  <property name="HandlerMap">
          <entry key="\.ashx$" value="standardHandlerFactory" />
          <!-- map any request ending with *.whatever to standardHandlerFactory -->
          <entry key="\.whatever$" value="specialHandlerFactory" />

<object name="standardHandlerFactory" type="Spring.Web.Support.DefaultHandlerFactory, Spring.Web" />

<object name="specialHandlerFactory" type="MySpecialHandlerFactoryImpl" />


Namespace: Spring.Web.Support

Assembly: Spring.Web (in Spring.Web.dll)

See Also

MappingHandlerFactory Members | Spring.Web.Support Namespace | IHttpHandlerFactory | IHttpHandler | HandlerMap | MappingHandlerFactoryConfigurer