PDA

View Full Version : Regarding bean id configuration for SimpleUrlHandlerMapping


ardent
Jun 8th, 2008, 11:55 PM
For example consider the configuration
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlH andlerMapping">
<property name="mappings">
<props>
<prop key="abc.htm">abcController</prop>
</props>
</property>
</bean>

<bean id="filterMapping" class="org.springframework.web.servlet.handler.SimpleUrlH andlerMapping">
<property name="mappings">
<props>
<prop key="abc.htm">loginControllerId</prop>
</props>
</property>
<property name="interceptors">
<list>
<ref bean="abcInterceptor"/>
</list>
</property>
</bean>


COnsider i have these two beans declared in the main configuraton xml which is asdf-servlet.xml. Is it mandatory to have bean ids as urlMapping and filterMapping?? can i give any different name in the place of urlMapping and filterMapping.