com.interface21.web.servlet.handler
Class SimpleUrlHandlerMapping

java.lang.Object
  |
  +--com.interface21.context.support.ApplicationObjectSupport
        |
        +--com.interface21.web.servlet.handler.AbstractHandlerMapping
              |
              +--com.interface21.web.servlet.handler.AbstractUrlHandlerMapping
                    |
                    +--com.interface21.web.servlet.handler.SimpleUrlHandlerMapping
All Implemented Interfaces:
ApplicationContextAware, HandlerMapping, Ordered

public class SimpleUrlHandlerMapping
extends AbstractUrlHandlerMapping

Implementation of the HandlerMapping interface to map from URLs to request handler beans.

Mappings are set via the "mappings" property, in a form accepted by the java.util.Properties class, like as follows:
/welcome.html=ticketController /show.html=ticketController
The syntax is PATH=HANDLER_BEAN_NAME. If the path doesn't begin with a /, one is prepended.

Supports direct matches (given "/test" -> registered "/test") and "*" matches (given "/test" -> registered "/t*").

Author:
Rod Johnson, Juergen Hoeller
See Also:
DispatcherServlet

Fields inherited from class com.interface21.web.servlet.handler.AbstractHandlerMapping
logger
 
Constructor Summary
SimpleUrlHandlerMapping()
           
 
Method Summary
 void initApplicationContext()
          Subclasses can override this for custom initialization behavior.
 void setMappings(java.util.Properties mappings)
          Set mappings from a properties object.
 
Methods inherited from class com.interface21.web.servlet.handler.AbstractUrlHandlerMapping
getHandlerInternal, initHandler, lookupHandler, registerHandler, setAlwaysUseFullPath
 
Methods inherited from class com.interface21.web.servlet.handler.AbstractHandlerMapping
getDefaultHandler, getHandler, getOrder, setDefaultHandler, setInterceptors, setOrder
 
Methods inherited from class com.interface21.context.support.ApplicationObjectSupport
getApplicationContext, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.interface21.context.ApplicationContextAware
setApplicationContext
 

Constructor Detail

SimpleUrlHandlerMapping

public SimpleUrlHandlerMapping()
Method Detail

setMappings

public void setMappings(java.util.Properties mappings)
Set mappings from a properties object. This property must be set to configure this object.
Parameters:
mappings - properties
See Also:
Properties

initApplicationContext

public void initApplicationContext()
Description copied from class: ApplicationObjectSupport
Subclasses can override this for custom initialization behavior. Gets called by setApplicationContext() after setting the context instance.
Overrides:
initApplicationContext in class ApplicationObjectSupport


Rod Johnson and Spring contributors 2001-2003.