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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleUrlHandlerMapping
public SimpleUrlHandlerMapping()
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.